Can someone link me to or post some code that is relevant to making a proxy for a directx game?

I want to intercept packets for viewing later.

I also know the packets are encrypted so I would have to decrypt them somehow.

Can anyone link me to some reading material on the subject?