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:00541050 arg_0 = dword ptr 4<br />

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

.text:00541050 arg_8 = byte ptr 0Ch<br />

.text:00541050<br />

.text:00541050 mov eax, [esp+arg_4]<br />

.text:00541054 mov ecx, [esp+arg_0]<br />

.text:00541058 mov al, cube64[eax+ecx*8]<br />

.text:0054105F mov cl, [esp+arg_8]<br />

.text:00541063 shr al, cl<br />

.text:00541065 and al, 1<br />

.text:00541067 retn<br />

.text:00541067 get_bit endp<br />

.text:00541067<br />

.text:00541067 ;<br />

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

.text:00541068 align 10h<br />

.text:00541070<br />

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

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

.text:00541070<br />

.text:00541070<br />

.text:00541070 rotate1 proc near ; CODE XREF:<br />

rotate_all_with_password+8E<br />

.text:00541070<br />

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

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

.text:00541070<br />

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

.text:00541073 push ebx<br />

.text:00541074 push ebp<br />

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

.text:00541079 push esi<br />

.text:0054107A push edi<br />

.text:0054107B xor edi, edi ; EDI is loop1 counter<br />

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

.text:00541081<br />

.text:00541081 first_loop1_begin: ; CODE XREF: rotate1+2E<br />

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

.text:00541083<br />

.text:00541083 first_loop2_begin: ; CODE XREF: rotate1+25<br />

.text:00541083 push ebp ; arg_0<br />

.text:00541084 push esi<br />

.text:00541085 push edi<br />

.text:00541086 call get_bit<br />

.text:0054108B add esp, 0Ch<br />

.text:0054108E mov [ebx+esi], al ; s<strong>to</strong>re <strong>to</strong> internal array<br />

.text:00541091 inc esi<br />

.text:00541092 cmp esi, 8<br />

.text:00541095 jl short first_loop2_begin<br />

.text:00541097 inc edi<br />

.text:00541098 add ebx, 8<br />

.text:0054109B cmp edi, 8<br />

.text:0054109E jl short first_loop1_begin<br />

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

149

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

Saved successfully!

Ooh no, something went wrong!