Which of these two options is the best way to reveal this surprise?

For my story, I thought of two ways to reveal a surprise, and not sure which one is better.

The main character, a cop, is investigating a gang and finds out that one of the cop's he works with, his associated with the gang. That's the surprise for the main character, just not sure how he should find out.

The crooked cop though, wants to do the right thing, and develops a crisis of conscience, once things go too far, and tries to get evidence on the gang in which he can turn in, along with himself, to help bring the gang down, but wants to get evidence on them first before turning himself in.

Now their are two ways the main character can find out the cop he works with is associated with them.

1. He follows the gang leader on his own time to see if this guy is really the gang leader he suspects him to be. He realizes that while following the leader, the leader and the rest of the gang have lured him into a trap, cause they want to silence him for knowing too much and surveying them.

The bad cop is watching this as well to get dirt on them as well, and doesn't want the main character to be killed by the gang, so he runs in, to intervene and stop them. The main character is shot at by gang members, and shoots back while taking cover. He hits the bad cop, thinking he is one of them and then gets closer to him to see, only to find out that he just shot one of the cops he works with.

The bad cop tells the main character he came to save him. And the bad cop, knowing he might die from the gunshot wounds, tells the main character that he was part of the gang and also gives him some details about them that the main character can use to his advantage hopefully in bringing them down. The bad cop tells him this before he dies, hoping he would have done some good.

2. The main character finds out that the other cop is bad beforehand, while investigating the gang leaders past and comes across a connection between the two of them and how they knew each other from before, under past circumstances. He then suspects the bad cop might be working with the gang, as he doesn't believe it is just an innocent coincidence.

So the main character follows the gang leader to see what dirt he can get on him, but then is lured into the same trap. The bad cop is following the gang as well to get dirt on them, just like before, and he runs to intervene. The main character returns fire, while taking cover, like before, and sees the bad cop, but shoots him cause he thinks the bad cop, is with the gang and is likely a danger to him therefore. After shooting him, he comes over to disarm him and the bad cop tells the main character the exact same information before he dies.

So both scenarios are similar but with the difference being that in the first one, the main character finds out the surprise, cause the bad cop wants to do one good deed before he dies, and admits his complicity, along with the information... where as in the second scenario, the main character finds out beforehand through investigating the leader's past, and then shoots the cop thinking the cop came to harm him and not save him, as oppose to not seeing who it is and assuming it is one of the gang members.

But in the second scenario the bad cops, redemption may not be as redeeming, if the main character already knows he is bad and cannot admit his shame the same way therefore.