Reconstructing C/C++ Code
Explore how to reconstruct C and C++ programs from disassembled assembly and pseudocode. Learn the process of interpreting address calculations, pointer assignments, and arithmetic operations to transform mixed assembly into readable C/C++ code.
Reconstructing mixed assembly / pseudocode code
Let’s reconstruct the line-by-line pseudocode, shown as comments against the assembly language code.
This code calculates the effective address of a, which it stores in register %rax. It then assigns the %rax register value to the integer pointer pa. We do the same process for b and store the %rax register value to the integer pointer pb.
The code snippet above assigns 1 to the indirect ...