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.

loc_804840A:<br />

loc_804842E:<br />

loc_804843D:<br />

loc_8048443:<br />

loc_8048444:<br />

mov eax, [ebp+var_8]<br />

movzx eax, byte ptr [eax]<br />

test al, al<br />

jz short loc_804842E<br />

mov eax, [ebp+var_C]<br />

movzx eax, byte ptr [eax]<br />

test al, al<br />

jz short loc_804842E<br />

mov eax, [ebp+var_8]<br />

movzx edx, byte ptr [eax]<br />

mov eax, [ebp+var_C]<br />

movzx eax, byte ptr [eax]<br />

cmp dl, al<br />

jz short loc_8048402<br />

mov eax, [ebp+var_C]<br />

movzx eax, byte ptr [eax]<br />

test al, al<br />

jnz short loc_804843D<br />

mov eax, [ebp+var_4]<br />

jmp short locret_8048453<br />

add [ebp+var_4], 1<br />

jmp short loc_8048444<br />

nop<br />

locret_8048453:<br />

leave<br />

retn<br />

f endp<br />

4.1.5 Task 1.5<br />

mov eax, [ebp+var_4]<br />

movzx eax, byte ptr [eax]<br />

test al, al<br />

jnz short loc_80483F4<br />

mov eax, 0<br />

This task is rather on knowledge than on reading code.<br />

The function is taken from OpenWatcom. Compiled in MSVC 2010 with /Ox flag.<br />

_DATA SEGMENT<br />

COMM __v:DWORD<br />

_DATA ENDS<br />

PUBLIC __real@3e45798ee2308c3a<br />

131

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

Saved successfully!

Ooh no, something went wrong!