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

Disassembly:
sub esp, 0x54
push ebx
push ebp
push esi
mov esi, dword [esp + 0x64]
push edi
mov edi, dword [esi + 0xc]
mov eax, dword [esi]
test edi, edi
mov ebp, dword [eax]
jl 0x4039db
cmp edi, dword [ebp + 0xc]
jl 0x403a07
push 0x6e
push 0x4a10e8
call fcn.00418f50
add esp, 4
push eax
push 0x4a1104
push 0x4b6d60
call fcn.00492257
push 0x4b6d60
call fcn.004187d0
add esp, 0x14
mov ebx, dword [ebp + 4]
mov eax, dword [ebp + 0x14]
imul ebx, edi
add ebx, eax
mov dword [esp + 0x68], ebx
jne 0x403a47
push 0x31c
push 0x4a1508
call fcn.00418f50
add esp, 4
push eax
push 0x4a1528
push 0x4b6d60
call fcn.00492257
push 0x4b6d60
call fcn.004187d0
add esp, 0x14
mov ecx, dword [ebx + 4]
xor eax, eax
test ecx, ecx
mov dword [esp + 0x10], eax
jle 0x403d26
jmp 0x403a5e
mov eax, dword [esp + 0x10]
mov edi, dword [ebx]
test eax, eax
jl 0x403a69
cmp eax, dword [edi + 0xc]
jl 0x403a95
push 0x6e
push 0x4a10e8
call fcn.00418f50
add esp, 4
push eax
push 0x4a1104
push 0x4b6d60
call fcn.00492257
push 0x4b6d60
call fcn.004187d0
add esp, 0x14
mov ebp, dword [edi + 4]
mov eax, dword [edi + 0x14]
imul ebp, dword [esp + 0x10]
mov ecx, dword [ebp + eax]
add ebp, eax
mov eax, dword [esi + 0x1c]
dec eax
cmp eax, ecx
jl 0x403d07
mov edx, dword [ebp + 4]
add ecx, edx
cmp eax, ecx
jl 0x403ac4
cmp edx, 0xffffffff
jne 0x403d07
mov ebx, dword [esp + 0x80]
push ebx
call fcn.00454400
mov dword [esp + 0x28], eax
fild dword [esp + 0x28]
fimul dword [ebp + 0x10]
fmul dword [esp + 0x7c]
fiadd dword [esp + 0x70]
call fcn.004922ac
push ebx
mov dword [esp + 0x28], eax
call fcn.00454410
mov dword [esp + 0x2c], eax
add esp, 8
fild dword [esp + 0x24]
fimul dword [ebp + 0x14]
fmul dword [esp + 0x7c]
fiadd dword [esp + 0x70]
call fcn.004922ac
mov edi, dword [ebp + 0x18]
mov dword [esp + 0x24], eax
mov eax, dword [esi + 0x20]
and edi, 3
xor edi, ebx
cmp eax, 0xffffffff
mov dword [esp + 0x28], edi
mov dword [esp + 0x18], eax
jne 0x403b3d
mov edx, dword [ebp + 0x1c]
mov eax, dword [ebp + 0x20]
mov ebx, dword [ebp + 0x24]
mov dword [esp + 0x18], edx
mov dword [esp + 0x14], eax
jmp 0x403b5e
mov eax, dword [ebp + 0x20]
mov ebx, 0x100
imul eax, dword [esi + 0x24]
sar eax, 8
mov dword [esp + 0x14], eax
mov eax, dword [esi + 0x28]
sub ebx, eax
imul ebx, dword [ebp + 0x24]
sar ebx, 8
add ebx, eax
mov ecx, dword [esp + 0x80]
push ecx
call fcn.00454400
mov dword [esp + 0x20], eax
mov eax, dword [esi + 0x2c]
fild dword [esp + 0x20]
add esp, 4
cmp eax, 0xffffffff
mov dword [esp + 0x1c], eax
fmul dword [esp + 0x74]
fstp dword [esp + 0x74]
je 0x403d03
mov edx, dword [esi + 4]
push eax
push edx
call fcn.0044eeb0
mov edx, dword [esi + 0x30]
add esp, 8
test edx, edx
jne 0x403c0f
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x18]
push ebx
push eax
push ecx
push 0x3f800000
push 0x3f800000
push edi
call fcn.00454410
mov dword [esp + 0x30], eax
fild dword [esp + 0x30]
fmul dword [esp + 0x94]
fstp dword [esp]
push edi
call fcn.00454400
mov dword [esp + 0x34], eax
mov edx, dword [esp + 0x90]
fild dword [esp + 0x34]
mov eax, dword [esp + 0x40]
mov ecx, dword [esp + 0x3c]
fmul dword [esp + 0x94]
fstp dword [esp]
push edx
mov edx, dword [esp + 0x3c]
push eax
mov eax, dword [esi + 4]
push ecx
push edx
push eax
call fcn.004055d0
add esp, 0x30
jmp 0x403d03
mov ecx, 0xe
xor eax, eax
lea edi, [esp + 0x2c]
rep stosd dword es:[edi], eax
mov ecx, dword [esi + 4]
mov eax, dword [esi + 0x34]
mov dword [esp + 0x30], ecx
mov ecx, dword [esp + 0x1c]
mov dword [esp + 0x34], ecx
mov ecx, dword [esp + 0x20]
mov dword [esp + 0x3c], ecx
mov ecx, dword [esp + 0x24]
mov dword [esp + 0x40], ecx
mov ecx, dword [esi + 0x20]
mov dword [esp + 0x48], ecx
mov ecx, dword [esp + 0x14]
mov dword [esp + 0x4c], ecx
mov ecx, dword [esp + 0x78]
mov dword [esp + 0x54], ecx
mov ecx, dword [esp + 0x7c]
mov dword [esp + 0x58], ecx
mov ecx, dword [esp + 0x74]
mov dword [esp + 0x5c], ecx
mov ecx, dword [esp + 0x28]
mov dword [esp + 0x50], ebx
mov dword [esp + 0x2c], eax
mov ebx, eax
push eax
mov dword [esp + 0x3c], 0
mov dword [esp + 0x48], 3
mov dword [esp + 0x64], ecx
mov edi, dword [edx]
mov edx, dword [edx + 4]
lea eax, [esp + 0x30]
push 0
push eax
push edi
mov dword [esp + 0x28], edx
call fcn.00408a90
add esp, 0x10
cmp eax, 0xffffffff
mov dword [esp + 0x28], eax
je 0x403d03
mov ecx, dword [edi + 8]
xor edx, edx
dec ecx
test ecx, ecx
jle 0x403cf8
mov eax, dword [esp + 0x18]
mov edi, dword [edi + 0x18]
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x14]
mov eax, dword [eax]
shl eax, 4
cmp ebx, dword [eax + edi + 0xc]
jle 0x403ce0
mov eax, dword [esp + 0x14]
inc edx
add eax, 4
cmp edx, ecx
mov dword [esp + 0x14], eax
jl 0x403cbf
jmp 0x403cf8
cmp ecx, edx
jle 0x403cf8
mov eax, dword [esp + 0x18]
lea eax, [eax + ecx*4]
sub ecx, edx
mov edi, dword [eax - 4]
mov dword [eax], edi
add eax, 0xfffffffc
dec ecx
jne 0x403ced
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x28]
mov dword [eax + edx*4], ecx
mov ebx, dword [esp + 0x68]
mov ecx, dword [esi + 0x1c]
mov eax, dword [ebp]
dec ecx
cmp eax, ecx
jg 0x403d26
mov eax, dword [esp + 0x10]
mov ecx, dword [ebx + 4]
inc eax
cmp eax, ecx
mov dword [esp + 0x10], eax
jl 0x403a5a
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x54
ret