cmpdismcmpdism is a special command line–based disassembler that can compare two binaries for altered code. Given two binary files, it disassembles them and prints special markers indicating which instructions have been added, removed, or changed. What makes it useful is that it can ignore changes that result solely from reassembling/recompiling, e.g. altered code offsets, and spot out only the actual changes. This was originally created to aid in the development of the Un-Worked Designs patches (especially Magic Knight Rayearth). Additionally, the program provides a generic framework for this comparative disassembly task, allowing modules for new instruction sets to be added to the program with minimal work. Currently, the following architectures are supported:
Warning: This program consumes tremendous amounts of memory. This is partly due to the fact that I wrote it in C instead of C++ as an experiment (discovering why vtables exist in the process), but mostly due to lazy program design (the input files are disassembled entirely before processing them, instead of disassembling only the "window" needed for comparison). I'd suggest not feeding it more than a megabyte or so at a time unless your system is well equipped. |