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

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x4c
mov edi, dword [esp + 0x6c]
mov edx, dword [esp + 0x74]
mov eax, dword [esp + 0x64]
mov ebp, dword [esp + 0x60]
lea ebx, [edi*8]
mov esi, dword [esp + 0x70]
mov ecx, dword [esp + 0x78]
sub ebx, edx
imul eax, ebx
add eax, 0x1f
shr eax, 5
mov dword [esp + 0x3c], eax
mov dword [esp + 0x38], eax
cmp dword [ebp], eax
jl 0x40333d
mov eax, dword [esp + 0x60]
mov ebp, dword [eax + 8]
test esi, esi
je 0x4030aa
test edx, edx
jne 0x4030f3
mov edx, ecx
and edx, 3
cmp edi, 4
sete al
cmp dword [esp + 0x68], 0xffffffff
jne 0x4030e4
test al, al
je 0x4030e4
test edx, edx
sete al
cmp esi, 0xffffffff
jne 0x403286
test al, al
je 0x403286
mov eax, dword [esp + 0x64]
mov dword [esp + 4], ecx
mov dword [esp], ebp
mov dword [esp + 8], eax
call fcn.00418440
jmp 0x40323a
test edx, edx
je 0x40327c
mov eax, ebx
mov esi, 0xffffffff
shr eax, 3
mov dword [esp + 0x18], eax
mov eax, ebx
add ebx, 7
and eax, 7
shr ebx, 3
mov dword [esp + 0x28], eax
neg ebx
mov eax, dword [esp + 0x68]
test eax, eax
jns 0x403117
lea eax, [edi + ebx]
mov dword [esp + 0x2c], eax
xor eax, eax
jmp 0x403127
cmp dword [esp + 0x68], 1
jne 0x4030f3
test al, al
jne 0x4032b4
mov eax, ebx
shr eax, 3
mov dword [esp + 0x18], eax
mov eax, ebx
add ebx, 7
and eax, 7
shr ebx, 3
mov dword [esp + 0x28], eax
test esi, esi
js 0x4030cf
mov eax, dword [esp + 0x68]
test eax, eax
js 0x4030d9
mov eax, dword [esp + 0x64]
sub ebx, edi
mov dword [esp + 0x2c], ebx
sub eax, 1
imul eax, edi
test esi, esi
lea edx, [eax + edi - 1]
cmovns eax, edx
add eax, ecx
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x64]
test eax, eax
je 0x40323a
neg esi
movzx ecx, byte [esp + 0x28]
mov eax, 0xffffffff
xor edx, edx
mov dword [esp + 0x1c], esi
imul esi, dword [esp + 0x18]
shl eax, cl
mov dword [esp + 0x24], 0
not eax
mov dword [esp + 0x30], esi
mov dword [esp + 0x34], eax
xor eax, eax
nop
mov edi, dword [esp + 0x18]
mov esi, dword [esp + 0x20]
xor ebx, ebx
test edi, edi
je 0x4031db
mov dword [esp + 0x14], ebp
jmp 0x4031ad
mov ebp, dword [esp + 0x14]
sub eax, 0x18
mov ecx, 8
add ebx, 1
sub ecx, eax
mov dword [ebp], edx
mov edx, edi
lea edi, [ebp + 4]
mov dword [esp + 0x14], edi
shr edx, cl
cmp dword [esp + 0x18], ebx
je 0x4031cf
movzx edi, byte [esi]
mov ecx, eax
add esi, dword [esp + 0x1c]
mov ebp, edi
shl ebp, cl
lea ecx, [eax + 8]
or edx, ebp
cmp ecx, 0x1f
jg 0x403188
mov eax, ecx
add ebx, 1
cmp dword [esp + 0x18], ebx
jne 0x4031ad
mov esi, dword [esp + 0x30]
add dword [esp + 0x20], esi
mov ebp, dword [esp + 0x14]
mov esi, dword [esp + 0x28]
test esi, esi
je 0x403218
mov edi, dword [esp + 0x20]
mov ecx, dword [esp + 0x1c]
movzx ebx, byte [edi]
add edi, ecx
and ebx, dword [esp + 0x34]
mov ecx, eax
mov dword [esp + 0x20], edi
mov edi, ebx
add eax, esi
shl edi, cl
or edx, edi
cmp eax, 0x1f
jle 0x403218
sub eax, 0x20
mov ecx, esi
mov dword [ebp], edx
add ebp, 4
sub ecx, eax
shr ebx, cl
mov edx, ebx
mov esi, dword [esp + 0x2c]
add dword [esp + 0x24], 1
add dword [esp + 0x20], esi
mov esi, dword [esp + 0x24]
cmp dword [esp + 0x64], esi
jne 0x403170
test eax, eax
je 0x40323a
mov dword [ebp], edx
mov eax, dword [esp + 0x60]
mov ebx, dword [esp + 0x3c]
mov eax, dword [eax + 8]
test ebx, ebx
je 0x403358
mov edx, dword [esp + 0x38]
jmp 0x40325d
sub edx, 1
je 0x403265
mov ecx, dword [eax + edx*4 - 4]
test ecx, ecx
je 0x403258
mov dword [esp + 0x38], edx
mov ebx, dword [esp + 0x38]
mov eax, dword [esp + 0x60]
mov dword [eax + 4], ebx
add esp, 0x4c
pop ebx
pop esi
pop edi
pop ebp
ret
mov esi, 0xffffffff
jmp 0x403065
cmp esi, 1
jne 0x4032e8
test al, al
je 0x4032e8
mov eax, dword [esp + 0x64]
xor edx, edx
test eax, eax
jle 0x40323a
mov ebx, dword [esp + 0x64]
lea esi, [esi]
mov eax, dword [ecx + edx*4]
add edx, 1
add ebp, 4
bswap eax
mov dword [ebp - 4], eax
cmp ebx, edx
jne 0x4032a0
jmp 0x40323a
cmp esi, 0xffffffff
jne 0x403316
test edx, edx
jne 0x403316
mov eax, dword [esp + 0x64]
lea edx, [ecx + eax*4 - 4]
test eax, eax
jle 0x40323a
mov ebx, dword [esp + 0x64]
xor eax, eax
mov ecx, dword [edx]
sub edx, 4
mov dword [ebp + eax*4], ecx
add eax, 1
cmp ebx, eax
jne 0x4032d3
jmp 0x40323a
mov eax, ebx
shr eax, 3
mov dword [esp + 0x18], eax
mov eax, ebx
add ebx, 7
and eax, 7
shr ebx, 3
mov dword [esp + 0x28], eax
test esi, esi
js 0x4030cf
lea eax, [edi + ebx]
mov dword [esp + 0x2c], eax
xor eax, eax
jmp 0x403127
mov eax, ebx
shr eax, 3
mov dword [esp + 0x18], eax
mov eax, ebx
add ebx, 7
and eax, 7
shr ebx, 3
mov dword [esp + 0x28], eax
test esi, esi
jns 0x403117
neg ebx
jmp 0x4030d1
mov dword [esp], ebp
mov dword [esp + 4], eax
call fcn.00403e50
mov edx, dword [esp + 0x74]
mov ecx, dword [esp + 0x78]
mov ebp, eax
jmp 0x403059
mov dword [esp + 0x38], 0
jmp 0x403269