23.03.2013 Views

Quick introduction to reverse engineering for beginners

Quick introduction to reverse engineering for beginners

Quick introduction to reverse engineering for beginners

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

et 0<br />

_main ENDP<br />

Nothing very special, as we see.<br />

GCC 4.4.1 emitting almost the same code, with small difference:<br />

main proc near ; DATA XREF: _start+17<br />

var_20 = dword ptr -20h<br />

var_4 = dword ptr -4<br />

loc_8048465:<br />

push ebp<br />

mov ebp, esp<br />

and esp, 0FFFFFFF0h<br />

sub esp, 20h<br />

mov [esp+20h+var_4], 2 ; i initializing<br />

jmp short loc_8048476<br />

mov eax, [esp+20h+var_4]<br />

mov [esp+20h+var_20], eax<br />

call f<br />

add [esp+20h+var_4], 1 ; i increment<br />

loc_8048476:<br />

cmp [esp+20h+var_4], 9<br />

jle short loc_8048465 ; if i

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!