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:005410A4 mov edi, 7 ; EDI is loop1 counter, initial<br />

state is 7<br />

.text:005410A9<br />

.text:005410A9 second_loop1_begin: ; CODE XREF: rotate1+57<br />

.text:005410A9 xor esi, esi ; ESI is loop2 counter<br />

.text:005410AB<br />

.text:005410AB second_loop2_begin: ; CODE XREF: rotate1+4E<br />

.text:005410AB mov al, [ebx+esi] ; value from internal array<br />

.text:005410AE push eax<br />

.text:005410AF push ebp ; arg_0<br />

.text:005410B0 push edi<br />

.text:005410B1 push esi<br />

.text:005410B2 call set_bit<br />

.text:005410B7 add esp, 10h<br />

.text:005410BA inc esi ; increment loop2 counter<br />

.text:005410BB cmp esi, 8<br />

.text:005410BE jl short second_loop2_begin<br />

.text:005410C0 dec edi ; decrement loop2 counter<br />

.text:005410C1 add ebx, 8<br />

.text:005410C4 cmp edi, 0FFFFFFFFh<br />

.text:005410C7 jg short second_loop1_begin<br />

.text:005410C9 pop edi<br />

.text:005410CA pop esi<br />

.text:005410CB pop ebp<br />

.text:005410CC pop ebx<br />

.text:005410CD add esp, 40h<br />

.text:005410D0 retn<br />

.text:005410D0 rotate1 endp<br />

.text:005410D0<br />

.text:005410D0 ;<br />

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

.text:005410D1 align 10h<br />

.text:005410E0<br />

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

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

.text:005410E0<br />

.text:005410E0<br />

.text:005410E0 rotate2 proc near ; CODE XREF:<br />

rotate_all_with_password+7A<br />

.text:005410E0<br />

.text:005410E0 internal_array_64= byte ptr -40h<br />

.text:005410E0 arg_0 = dword ptr 4<br />

.text:005410E0<br />

.text:005410E0 sub esp, 40h<br />

.text:005410E3 push ebx<br />

.text:005410E4 push ebp<br />

.text:005410E5 mov ebp, [esp+48h+arg_0]<br />

.text:005410E9 push esi<br />

.text:005410EA push edi<br />

.text:005410EB xor edi, edi ; loop1 counter<br />

.text:005410ED lea ebx, [esp+50h+internal_array_64]<br />

.text:005410F1<br />

.text:005410F1 loc_5410F1: ; CODE XREF: rotate2+2E<br />

.text:005410F1 xor esi, esi ; loop2 counter<br />

150

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

Saved successfully!

Ooh no, something went wrong!