Reverse Engineering for Beginners

(avery) #1

CHAPTER 36. FIBONACCI NUMBERS CHAPTER 36. FIBONACCI NUMBERS


mov eax, DWORD PTR _a$[ebp]
add eax, DWORD PTR _b$[ebp]
push eax
mov ecx, DWORD PTR _b$[ebp]
push ecx
call _fib
add esp, 12
$LN2@fib:
pop ebp
ret 0
_fib ENDP


_main PROC
push ebp
mov ebp, esp
push OFFSET $SG2647
call DWORD PTR impprintf
add esp, 4
push 20
push 1
push 1
call _fib
add esp, 12
xor eax, eax
pop ebp
ret 0
_main ENDP


We will illustrate the stack frames with this.

Free download pdf