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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xd4
push ebx
mov ebx, dword [ebp + 0xc]
mov ecx, dword [ebx + 4]
push esi
push edi
mov edi, eax
mov eax, dword [edi]
mov edx, dword [ecx + eax*4]
mov eax, dword [edx]
mov esi, dword [eax]
push esi
call fcn.004112d5
add esp, 4
mov dword [esp + 0x34], eax
add eax, 1
je 0x42cec9
add eax, 7
shr eax, 3
add eax, eax
add eax, eax
add eax, eax
xor ecx, ecx
mov dword [esp + 0x38], eax
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0041171a
mov ecx, dword [esp + 0x38]
add esp, 4
lea edx, [ecx + ecx + 2]
push edx
push esi
push eax
mov dword [esp + 0x3c], eax
call fcn.00410f70
add esp, 0xc
push 4
call fcn.0041171a
add esp, 4
test eax, eax
je 0x42ced3
mov dword [eax], 1
mov esi, dword [ebp + 8]
cmp dword [esi + 0x140], 0
mov dword [esp + 0x3c], eax
je 0x42cfb5
cmp dword [eax], 1
jg 0x42ceda
mov eax, dword [esp + 0x34]
mov ecx, dword [esp + 0x30]
push eax
push ecx
call dword [0x482640]
mov eax, dword [esi + 0x13c]
test eax, eax
jne 0x42cf44
mov edx, dword [ebp + 8]
mov esi, dword [edx + 0x134]
test esi, esi
je 0x42cfb5
mov dword [esp + 0x1c], esi
mov edi, edi
mov edx, dword [esi + 4]
cmp edx, dword [esp + 0x34]
jne 0x40aa47
test edx, edx
jbe 0x409b5b
mov ecx, dword [esp + 0x30]
mov eax, dword [esi]
jmp 0x409b40
mov si, word [eax]
cmp si, word [ecx]
jne 0x40aa43
add eax, 2
add ecx, 2
sub edx, 1
jne 0x409b40
mov esi, dword [esp + 0x1c]
mov eax, dword [esp + 0x3c]
add dword [eax], 0xffffffff
jne 0x409b7e
mov eax, dword [esp + 0x30]
push eax
call fcn.004112ef
mov ecx, dword [esp + 0x40]
add esp, 4
push ecx
call fcn.004112ef
add esp, 4
mov eax, esi
test eax, eax
je 0x42cfbe
mov edx, dword [eax + 0x14]
mov ecx, dword [eax + 0x18]
mov dword [esp + 0x74], edx
mov edx, dword [eax + 0x10]
mov eax, dword [edi]
mov dword [esp + 0x44], ecx
mov dword [esp + 0x7c], edx
mov edx, dword [ebx + 4]
mov ecx, dword [edx + eax*4]
movsx edx, word [ecx + 0xa]
mov ecx, dword [ebp + 8]
mov ecx, dword [ecx + 0x148]
inc eax
mov dword [edi], eax
mov esi, dword [ebx + 4]
mov dword [esp + 0xdc], ecx
xor ecx, ecx
mov dword [esp + 0x20], ecx
mov dword [esp + 0x28], 1
mov dword [esp + 0x2c], ecx
mov esi, dword [esi + eax*4]
cmp word [esi + 8], 0x47
mov dword [esp + 0x30], 0x487630
mov dword [esp + 0x34], ecx
mov dword [esp + 0x38], ecx
mov dword [esp + 0x3c], ecx
mov dword [esp + 0x64], 0x48af14
mov dword [esp + 0x68], ecx
mov dword [esp + 0x6c], ecx
mov dword [esp + 0x70], ecx
jne 0x42cf38
inc eax
mov dword [esp + 0x84], edx
mov edx, eax
mov dword [esp + 0x18], ecx
xor esi, esi
mov dword [esp + 0x58], edx
mov dword [edi], eax
mov ecx, dword [ebx + 4]
mov ecx, dword [ecx + eax*4]
movsx ecx, word [ecx + 8]
cmp ecx, 0x47
jge 0x409c2f
inc eax
jmp 0x409c1b
sub ecx, 0x47
je 0x42d01e
sub ecx, 1
jne 0x42cff5
test esi, esi
jne 0x42d017
mov dword [esp + 0x14], eax
inc eax
mov dword [edi], eax
mov eax, dword [esp + 0x7c]
cmp eax, dword [0x4a8e90]
jg 0x42d024
cmp eax, ecx
jle 0x42d024
shl eax, 4
add eax, dword [0x4a8ec4]
mov dword [esp + 0x60], eax
cmp dword [esp + 0x74], ecx
mov dword [esp + 0x5c], ecx
jle 0x409e4a
mov dword [esp + 0x10], 3
mov dword [esp + 0x80], ecx
mov esi, dword [esp + 0x1c]
mov esi, dword [esi + 0x20]
mov dword [esp + 0x1c], esi
test esi, esi
jne 0x409b20
jmp 0x42cfb5
mov eax, 8
jmp 0x409a82
xor eax, eax
jmp 0x409ace
mov eax, dword [esp + 0x3c]
dec dword [eax]
lea esi, [esp + 0x30]
call fcn.00401380
mov eax, dword [esp + 0x34]
inc eax
push eax
call fcn.00446547
xor ecx, ecx
mov esi, eax
mov edx, 2
mul edx
seto cl
mov dword [esp + 0x38], esi
neg ecx
or ecx, eax
push ecx
call fcn.0041171a
mov edx, dword [esp + 0x34]
mov esi, eax
mov eax, dword [esp + 0x38]
add esp, 4
lea ecx, [eax + eax + 2]
push ecx
push edx
push esi
call fcn.00410f70
mov dword [esp + 0x3c], esi
mov esi, dword [ebp + 8]
add esp, 0xc
jmp 0x409aeb
push edx
mov edx, dword [ebp + 8]
push 0x6f
push edx
jmp 0x42e5d2
mov esi, dword [esi + 0x140]
sub esi, 1
js 0x42cfb5
mov dword [esp + 0x7c], eax
mov dword [esp + 0x74], 0
mov dword [esp + 0x5c], esi
mov edx, dword [esp + 0x5c]
mov eax, dword [esp + 0x74]
mov ecx, dword [esp + 0x7c]
add eax, edx
cdq
sub eax, edx
sar eax, 1
mov ecx, dword [ecx + eax*4]
lea esi, [esp + 0x30]
mov dword [esp + 0x1c], eax
call fcn.0040c0b0
test eax, eax
jge 0x42cf9c
mov edx, dword [esp + 0x1c]
dec edx
mov dword [esp + 0x5c], edx
jmp 0x42cfab
jle 0x42cfd2
mov eax, dword [esp + 0x1c]
inc eax
mov dword [esp + 0x74], eax
mov ecx, dword [esp + 0x5c]
cmp dword [esp + 0x74], ecx
jle 0x42cf63
lea ecx, [esp + 0x30]
call fcn.00402620
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebp + 8]
push eax
push edi
push ebx
push ecx
call fcn.0047d10e
jmp 0x40aa31
mov edx, dword [esp + 0x5c]
cmp dword [esp + 0x74], edx
jg 0x42cfb5
mov eax, dword [esp + 0x7c]
mov ecx, dword [esp + 0x1c]
mov esi, dword [eax + ecx*4]
lea ecx, [esp + 0x30]
call fcn.00402620
jmp 0x409b7e
sub ecx, 0x37
jne 0x409c2c
mov edx, eax
mov eax, dword [ebx + 4]
mov ecx, dword [eax + edx*4 - 4]
movsx edx, word [ecx + 0xa]
mov eax, dword [ebp + 8]
push edx
push 0x6f
push eax
jmp 0x42e5d2
dec esi
inc eax
jmp 0x409c1b
inc esi
jmp 0x409c2c
mov dword [esp + 0x60], ecx
jmp 0x409c75