It's a legal definition. You knwo that something's wrong and understand the concepts of right and wrong as defined by the majority. You know there is also a law against it (beyond the sense of moral rigthness/wrongness) and still disregard this law. Of coruse, there's still something unhinged deep inside you, but what's judged is the capacity to understand the norms and to decide whether to follow them or not. Also remember that good and evil aren't the same as sane or insane, or as intelligent and stupid.