Step Seven: Identifying Key Structures of High-Level Languages
Overview
Research of execution algorithms implemented in programs written in high-level languages traditionally starts with the reconstruction of the key structures of the source language — functions, local and global variables, branches, loops, etc. This makes the disassembler listing more readable and considerably simplifies its analysis.
Present-day disassemblers are rather intelligent, and perform the lion's share of work when recognizing the key structures. In particular, IDA Pro successfully copes with the identification of standard library functions, local variables addressed via the ESP register, CASE branches, etc. However, IDA occasionally makes mistakes, thus misleading the code digger. In addition, its high cost sometimes justifies using a different disassembler. For example, people studying an assembler (and the best way to learn about it is to disassemble someone else's programs) can hardly afford IDA Pro.
Certainly, there are more fish in the sea than IDA. DUMPBIN, for example, is a part of the regular SDK delivery — why not use it, if it comes down to it? Of course, if there's nothing better on hand, DUMPBIN will do; but in this case, you'll have to forget about the disassembler's intelligence and use your own brain.
We'll first get acquainted with nonoptimizing compilers. The analysis of their code is rather simple and quite comprehensible, even for programming newbies. Then, having mastered the disassembler, we'll proceed to more complex things — to optimizing compilers that generate artful and intricate code.
Friday, September 18, 2009
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment