Not being aware one is committing a crime is certainly not a definition of insanity under US law. Not understanding the consequences of a serious crime such as murder might be not guilty by reason of mental defect, but doing something illegal and simply not being aware its illegal is not remotely considered insanity.