REC - Reverse Engineering Compiler Examples
REC Home | User's Manual
This page has links to several examples that show the output files produced by the REC decompiler.
The examples are also available for download from the download page.
Files with symbolic information |
---|
The quality of the output greatly depends on the amount of symbolic information contained in the file being decompiled, or provided by the user via a .cmd file. The following examples show the output of REC for the example program (hd.c) compiled with GNU's gcc compiler and the -g option:
Take a look at the dumpline(), hexdump() and main() functions.
Files optimized, with symbolic information |
---|
When decompiling an optimized program, the output begins to deteriorate. More registers are present in the decompiled source, and the control flow is more complex, due to many optimization techniques applied by the compiler.
However, the decompiled output is still readable, thanks mainly to the presence of symbolic information and local variable information. The following examples show the output of REC for the example program (hd.c) compiled with GNU's gcc compiler and the -g -O option:
Files optimized, without symbolic information |
---|
Without symbolic information, and with the optimizer turned on, the quality of the decompiled source is even worse, but still acceptable. This is the kind of output that you can expect to get when decompiling commercial applications.
This output should be your starting point. By manually adding symbolic information (via a .cmd file and prototype files), you can expect the quality of the output to improve significantly. The following examples show the output of REC for the example program (hd.c) compiled with GNU's gcc compiler and the -O option:
Copyright © 1998 - 2007 Backer Street Software -- All right reserved.
Last revised on 15 Nov. 1998