Function at 0x415640
Capabilities:
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x50
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x6c]
mov esi, dword [esp + 0x78]
lea eax, [edi + 7]
cdq
and edx, 7
add eax, edx
mov ebx, eax
mov eax, dword [esp + 0x74]
imul eax, esi
sar ebx, 3
add eax, 0x10
mov dword [esp + 0x2c], ebx
imul eax, ebx
push eax
call fcn.004146d0
mov dword [esp + 0x40], eax
mov dword [esp + 0x70], eax
mov eax, dword [esp + 0x6c]
mov ecx, dword [esp + 0x68]
cdq
and edx, 7
add esp, 4
add eax, edx
mov edx, dword [esp + 0x70]
sar eax, 3
test edx, edx
mov dword [esp + 0x20], ecx
mov dword [esp + 0x5c], eax
mov ebp, eax
je 0x4156ac
dec edi
imul edi, eax
mov dword [esp + 0x34], edi
jmp 0x4156b7
imul ebp, esi
mov dword [esp + 0x34], 0
test esi, esi
jle 0x4158d5
mov dword [esp + 0x38], esi
test eax, eax
jle 0x4158a5
mov dword [esp + 0x30], eax
test ebx, ebx
mov dword [esp + 0x18], 0
jle 0x415886
lea eax, [ebp + ebp]
lea esi, [ebp + ebp*2]
sub esi, eax
lea edi, [ebp*8]
mov dword [esp + 0x4c], esi
lea esi, [ebp*4]
sub esi, eax
mov edx, ebp
mov dword [esp + 0x50], esi
lea esi, [ebp + ebp*4]
sub esi, eax
sub edi, ebp
mov dword [esp + 0x54], esi
lea esi, [ebp + ebp*2]
shl esi, 1
mov dword [esp + 0x1c], ecx
add ecx, eax
sub edx, eax
sub esi, eax
sub edi, eax
lea eax, [ebx*8]
sub eax, ebx
mov ebx, dword [esp + 0x6c]
add eax, ebx
mov dword [esp + 0x40], edx
mov dword [esp + 0x44], esi
mov dword [esp + 0x48], edi
mov dword [esp + 0x58], eax
jmp 0x41574e
mov edx, dword [esp + 0x40]
mov esi, dword [esp + 0x44]
mov edi, dword [esp + 0x48]
mov ebx, dword [esp + 0x1c]
xor eax, eax
mov al, byte [ebx]
xor ebx, ebx
mov bl, byte [edx + ecx]
mov edx, ebx
mov ebx, dword [esp + 0x4c]
shl edx, 1
mov dword [esp + 0x78], edx
xor edx, edx
mov dl, byte [ecx]
shl edx, 2
mov dword [esp + 0x64], edx
xor edx, edx
mov dl, byte [ebx + ecx]
mov ebx, dword [esp + 0x50]
shl edx, 3
mov dword [esp + 0x70], edx
xor edx, edx
mov dl, byte [ebx + ecx]
mov ebx, dword [esp + 0x54]
shl edx, 4
mov dword [esp + 0x10], edx
xor edx, edx
mov dl, byte [ebx + ecx]
xor ebx, ebx
mov bl, byte [edi + ecx]
mov edi, dword [esp + 0x18]
shl edx, 5
mov dword [esp + 0x14], edx
xor edx, edx
mov dl, byte [esi + ecx]
mov esi, dword [esp + 0x58]
shl edx, 6
shl ebx, 7
add esi, edi
mov dword [esp + 0x24], edx
mov dword [esp + 0x28], ebx
mov edi, 8
and bl, 0x80
and dl, 0x40
add bl, dl
mov dl, byte [esp + 0x14]
and dl, 0x20
add bl, dl
mov dl, byte [esp + 0x10]
and dl, 0x10
add bl, dl
mov dl, byte [esp + 0x70]
and dl, 8
add bl, dl
mov dl, byte [esp + 0x64]
and dl, 4
add bl, dl
mov dl, byte [esp + 0x78]
and dl, 2
add bl, dl
mov dl, al
and dl, 1
add bl, dl
mov edx, dword [esp + 0x78]
sar edx, 1
mov byte [esi], bl
mov ebx, dword [esp + 0x64]
mov dword [esp + 0x78], edx
mov edx, dword [esp + 0x70]
sar ebx, 1
sar edx, 1
mov dword [esp + 0x64], ebx
mov ebx, dword [esp + 0x10]
mov dword [esp + 0x70], edx
mov edx, dword [esp + 0x14]
sub esi, dword [esp + 0x2c]
sar ebx, 1
sar edx, 1
mov dword [esp + 0x10], ebx
mov ebx, dword [esp + 0x28]
mov dword [esp + 0x14], edx
mov edx, dword [esp + 0x24]
sar eax, 1
sar edx, 1
sar ebx, 1
dec edi
mov dword [esp + 0x24], edx
mov dword [esp + 0x28], ebx
jne 0x4157c5
mov edx, dword [esp + 0x18]
mov edi, dword [esp + 0x1c]
mov ebx, dword [esp + 0x2c]
lea eax, [ebp*8]
inc edx
add edi, eax
add ecx, eax
cmp edx, ebx
mov dword [esp + 0x18], edx
mov dword [esp + 0x1c], edi
jl 0x415742
mov eax, dword [esp + 0x5c]
mov ecx, dword [esp + 0x20]
mov edx, dword [esp + 0x6c]
inc ecx
mov dword [esp + 0x20], ecx
lea edx, [edx + ebx*8]
mov dword [esp + 0x6c], edx
mov edx, dword [esp + 0x30]
dec edx
mov dword [esp + 0x30], edx
jne 0x4156cf
mov edx, dword [esp + 0x68]
mov esi, dword [esp + 0x74]
sub edx, esi
mov edi, dword [esp + 0x6c]
imul edx, ebx
mov esi, dword [esp + 0x34]
sub edi, edx
mov edx, dword [esp + 0x38]
add ecx, esi
dec edx
mov dword [esp + 0x6c], edi
mov dword [esp + 0x20], ecx
mov dword [esp + 0x38], edx
jne 0x4156c3
mov eax, dword [esp + 0x3c]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x50
ret