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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

or eax, edx<br />

retn<br />

f endp<br />

4.1.8 Task 1.8<br />

Compiled in MSVC 2010 with /O1 option 1 :<br />

_a$ = 8 ; size = 4<br />

_b$ = 12 ; size = 4<br />

_c$ = 16 ; size = 4<br />

?s@@YAXPAN00@Z PROC ; s, COMDAT<br />

mov eax, DWORD PTR _b$[esp-4]<br />

mov ecx, DWORD PTR _a$[esp-4]<br />

mov edx, DWORD PTR _c$[esp-4]<br />

push esi<br />

push edi<br />

sub ecx, eax<br />

sub edx, eax<br />

mov edi, 200 ; 000000c8H<br />

$LL6@s:<br />

push 100 ; 00000064H<br />

pop esi<br />

$LL3@s:<br />

fld QWORD PTR [ecx+eax]<br />

fadd QWORD PTR [eax]<br />

fstp QWORD PTR [edx+eax]<br />

add eax, 8<br />

dec esi<br />

jne SHORT $LL3@s<br />

dec edi<br />

jne SHORT $LL6@s<br />

pop edi<br />

pop esi<br />

ret 0<br />

?s@@YAXPAN00@Z ENDP ; s<br />

4.1.9 Task 1.9<br />

Compiled in MSVC 2010 with /O1 option:<br />

tv315 = -8 ; size = 4<br />

tv291 = -4 ; size = 4<br />

_a$ = 8 ; size = 4<br />

_b$ = 12 ; size = 4<br />

_c$ = 16 ; size = 4<br />

?m@@YAXPAN00@Z PROC ; m, COMDAT<br />

push ebp<br />

mov ebp, esp<br />

push ecx<br />

push ecx<br />

mov edx, DWORD PTR _a$[ebp]<br />

push ebx<br />

1 /O1: minimize space<br />

135

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

Saved successfully!

Ooh no, something went wrong!