I've pretty much come to the conclusion that you don't understand code by reading it. Understanding someone else's code is almost always a reverse engineering exercise. It's often necessary to actually run the code repeatedly to understand it. This should really come as no surprise. It's likely that the guy that wrote the code didn't write it all at once, but rather wrote it in increments testing along the way. If he couldn't write it without testing every little bit, it's unlikely that you can read it without doing the same.