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.

.text:005412FC mov esi, offset cube64<br />

.text:00541301 add ebx, 40h<br />

.text:00541304 cmp ebp, eax<br />

.text:00541306 rep movsd<br />

.text:00541308 jl short loc_5412D1<br />

.text:0054130A mov edx, [esp+10h+Src]<br />

.text:0054130E push edx ; Memory<br />

.text:0054130F call _free<br />

.text:00541314 add esp, 4<br />

.text:00541317 pop edi<br />

.text:00541318 pop esi<br />

.text:00541319 pop ebp<br />

.text:0054131A pop ebx<br />

.text:0054131B retn<br />

.text:0054131B decrypt endp<br />

.text:0054131B<br />

.text:0054131B ;<br />

---------------------------------------------------------------------------<br />

.text:0054131C align 10h<br />

.text:00541320<br />

.text:00541320 ; =============== S U B R O U T I N E<br />

=======================================<br />

.text:00541320<br />

.text:00541320<br />

.text:00541320 ; int __cdecl crypt_file(int Str, char *Filename, int password)<br />

.text:00541320 crypt_file proc near ; CODE XREF: _main+42<br />

.text:00541320<br />

.text:00541320 Str = dword ptr 4<br />

.text:00541320 Filename = dword ptr 8<br />

.text:00541320 password = dword ptr 0Ch<br />

.text:00541320<br />

.text:00541320 mov eax, [esp+Str]<br />

.text:00541324 push ebp<br />

.text:00541325 push offset Mode ; "rb"<br />

.text:0054132A push eax ; Filename<br />

.text:0054132B call _fopen ; open file<br />

.text:00541330 mov ebp, eax<br />

.text:00541332 add esp, 8<br />

.text:00541335 test ebp, ebp<br />

.text:00541337 jnz short loc_541348<br />

.text:00541339 push offset Format ; "Cannot open input file!\n"<br />

.text:0054133E call _printf<br />

.text:00541343 add esp, 4<br />

.text:00541346 pop ebp<br />

.text:00541347 retn<br />

.text:00541348 ;<br />

---------------------------------------------------------------------------<br />

.text:00541348<br />

.text:00541348 loc_541348: ; CODE XREF: crypt_file+17<br />

.text:00541348 push ebx<br />

.text:00541349 push esi<br />

.text:0054134A push edi<br />

.text:0054134B push 2 ; Origin<br />

.text:0054134D push 0 ; Offset<br />

157

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

Saved successfully!

Ooh no, something went wrong!