Yes, there are two fallacies in this argument. Premise 2 and 4. I will address them in order and attempt to address them to make a similar set of premises.
Firstly, Premise 2 contains a fallacy because one does not need to be insane to commit a heinous act. Here are a few clear examples where this premise is inaccurate; a sadistic who derives pleasure from the suffering of others, a desperate actor where the heinous act was the only option for survival, a devoted follower instructed by the authority commit the act. Since there are a wide range of motives that could drive someone to commit even the most heinous acts, the premise can't stand as is.
If instead, you look at your original Premises 1 and 2 as components of a single clause - defining Person A as insane - we can overcome this issue. Therefore, let's amend the original example to be the following:
1) Person A is insane
2) A sane understanding cannot be applied to the motivations of the insane.
3) A cause or catalyst cannot be ascribed to Person A's actions.
*NEW Premises 2 and 3 were modified so the actor, Person A, is the focus rather than an on-looker and the crime itself.
Examining the NEW Premise 3, there is a fallacy because the state of being insane may be considered cause and catalyst, which would refute the premise. However, I believe you are more focused on whether there is intentionality or responsibility of the actor. This is more difficult to distinguish because there are definitional complexities to it. It is dependent on whether you are talking about social judgment, legal distinction, or medical understanding.
Here are some additional questions that may help you unpack this idea.
Are you considering either legal or medical definitions of insanity?
Are you concerned with the ethical distinction of the insane compared to the sane, given an equally egregious offense?
What are the moral responsibilities and social expectations of an individual identified as insane?
Is someone who is not in control of their mental faculties responsible for their actions?
Is there a different consideration for someone, in an insane state, who acts in an ethical way in accordance with their insanity? If a person is suffering from a paranoid delusion and acts out in accordance with that delusion, are they ethically responsible?
i.e. Person A believes Person B is the devil, and killing the devil will save the world, is Person A acting ethically?