As a developer who has implemented software licensing (and have had them cracked), you can’t really prevent your software from being cracked by them finding and bytezapping your license tests, no matter how clever or spread they are. The crackers use tools like SoftIce which make this actually quite easy… they can find where the key gets put into memory, and run your program, and have the debugger stop at any instruction that accesses that memory. Boom, they just found one of your tests and they can no-op it with a byte zap. Even if you put in 20 seperate tests in 20 locations, they can find them all through this trick in minutes. (Yes, there’s a LOT you can do to make it harder, ranging from redundant decoy reads to the license info, to time-based decisions how to check, etc…)
Making your software uncrackable is a very very difficult job that I don’t think ANYONE has ever really succeeded with. Much more important for you though, you should put your priority on making your software un-keygen-able. A keygen is the real problem for developers. If your software is cracked, your next patch will have to be recracked and pirates will need to find and install the new crack… a hassle both for crackers and pirates. If there’s a keygen, pirates install and run your unmodified software directly, and your updates to the software will also work, and the cracker never has to do anything!
So, how do you prevent a keygen? The easiest way is with crypto, an RSA encoded key is pretty much The Answer, and not hard to do. The downside with RSA crypto is that the key will become too long to type, so you have to deal with license files or have your users do cut-and-paste of huge text strings. If you want your license code to be less than 50 typed digits, you have to do a lot (a real lot, a huge amount) more work to make the key encoding/decoding secure, mostly through tedious (not clever) obfuscication with the goal of boring the cracker.