View Single Post
Old Mar 6th, 2007, 3:06 PM   #8
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
Not really, and certainly not well, if a lot of extraneous information (symbols, etc.) weren't available in the file set one was decompiling. Imagine that you are presented with the assembly language,
ld a, 0x4357fb
add a, 1 
st 0x4357fb,a
That could have been generated by C, say, as "count += 1;", or by some other language as "day = day + 1;". This is the sort of thing a decompiler is faced with if code is compiled straight to an executable without benefit of having symbols and other debugging information passed along.

Furthermore, in simple embedded systems, particularly, data might be sandwiched right in with code. The data might be binary numbers, or a floating point representation, or text, or anything else. It still might occur in patterns that could be interpreted as a sequence of instructions.

Reverse engineering of non-trivial material, to be effective, takes as much information as one might dredge up, and a lot of competent human interpretation.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code.
Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers
DaWei is offline   Reply With Quote