LDasm project. LDasm is at best a passable disasembly tool (disasm.pl is FAR more useful), but it does come with a utility called ptrace, which allows you to view which instructions of a program actually execute. You can also give ptrace a list of addresses (for example, the list of functions found by disasm.pl) and have it step through those to show you which ones actually execute in your program.
Attacking FlexLM is an essay written in 1998 on attacking a specific form of hard copy protection. There are several other essays on that site, but most of them cover material that we cover above, but with specific example programs.