This answer was deleted by @0xC0000022L (presumably because it looks like a reply at first glance) but is actually an answer: https://reverseengineering.stackexchange.com/a/18315/2147
Everything after the first sentence there is a decent answer that should be posted.
Everything after the first sentence there is a decent answer that should be posted.