This topic will require knowledge in a lot of stuff programming for one, but also code caves, and assembly. However, detours are also a nice way of going about things.
Here are a few tutorials from a fantastic source, a great group of guys as well. A lot of stuff that I have learned comes directly from these guys:
[Only registered and activated users can see links. Click Here To Register...] [ Probably exactly what you need ]
[Only registered and activated users can see links. Click Here To Register...] [ Very brief .. the code explains for itself thought ]
[Only registered and activated users can see links. Click Here To Register...] [ Well explained tutorial on Detours ]
I would attach the items from this site, but these guys deserve the credit. However I am able to attach a great guide that was removed from the Internet due to the site dying.