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.

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

.text:0054129D cmp ebp, eax<br />

.text:0054129F rep movsd<br />

.text:005412A1 jl short loc_54126A<br />

.text:005412A3 pop edi<br />

.text:005412A4 pop esi<br />

.text:005412A5 pop ebp<br />

.text:005412A6 pop ebx<br />

.text:005412A7 retn<br />

.text:005412A7 crypt endp<br />

.text:005412A7<br />

.text:005412A7 ;<br />

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

.text:005412A8 align 10h<br />

.text:005412B0<br />

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

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

.text:005412B0<br />

.text:005412B0<br />

.text:005412B0 ; int __cdecl decrypt(int, int, void *Src)<br />

.text:005412B0 decrypt proc near ; CODE XREF: decrypt_file+99<br />

.text:005412B0<br />

.text:005412B0 arg_0 = dword ptr 4<br />

.text:005412B0 arg_4 = dword ptr 8<br />

.text:005412B0 Src = dword ptr 0Ch<br />

.text:005412B0<br />

.text:005412B0 mov eax, [esp+Src]<br />

.text:005412B4 push ebx<br />

.text:005412B5 push ebp<br />

.text:005412B6 push esi<br />

.text:005412B7 push edi<br />

.text:005412B8 push eax ; Src<br />

.text:005412B9 call __strdup<br />

.text:005412BE push eax ; Str<br />

.text:005412BF mov [esp+18h+Src], eax<br />

.text:005412C3 call __strrev<br />

.text:005412C8 mov ebx, [esp+18h+arg_0]<br />

.text:005412CC add esp, 8<br />

.text:005412CF xor ebp, ebp<br />

.text:005412D1<br />

.text:005412D1 loc_5412D1: ; CODE XREF: decrypt+58<br />

.text:005412D1 mov ecx, 10h<br />

.text:005412D6 mov esi, ebx<br />

.text:005412D8 mov edi, offset cube64<br />

.text:005412DD push 3<br />

.text:005412DF rep movsd<br />

.text:005412E1 mov ecx, [esp+14h+Src]<br />

.text:005412E5 push ecx<br />

.text:005412E6 call rotate_all_with_password<br />

.text:005412EB mov eax, [esp+18h+arg_4]<br />

.text:005412EF mov edi, ebx<br />

.text:005412F1 add ebp, 40h<br />

.text:005412F4 add esp, 8<br />

.text:005412F7 mov ecx, 10h<br />

156

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

Saved successfully!

Ooh no, something went wrong!