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

Disassembly:
sub esp, 0x810
push ebx
push ebp
push esi
mov esi, dword [esp + 0x820]
push edi
mov dword [esp + 0x1c], 1
cmp dword [esi], 1
jne 0x407243
call fcn.0040a3d0
mov eax, dword [esp + 0x82c]
lea ecx, [esp + 0x320]
mov edx, 0xf0
movsx edi, word [eax]
mov dword [esp + 0x14], edi
add eax, 2
fild dword [esp + 0x14]
add ecx, 4
dec edx
fstp dword [ecx - 4]
jne 0x407256
lea eax, [esp + 0x320]
push esi
push eax
mov word [esp + 0x58], 0
call fcn.00408cc0
add esp, 8
lea ecx, [esp + 0x320]
lea edx, [esp + 0x280]
push ecx
push 0x4380bc
push edx
call fcn.004085f0
add esp, 0xc
lea eax, [esp + 0x2f8]
lea ecx, [esp + 0x28]
push 0x4379c8
push eax
push ecx
call fcn.004077f0
add esp, 0xc
lea edx, [esp + 0x320]
push esi
push edx
call fcn.00406ed0
add esp, 8
mov dword [esp + 0x1c], eax
lea eax, [esp + 0x28]
push 0x4379c8
push eax
call fcn.00407940
add esp, 8
lea ecx, [esp + 0x320]
mov dword [esp + 0x54], eax
push ecx
push 0x4380bc
call fcn.00408d10
add esp, 8
lea edx, [esp + 0x280]
lea eax, [esp + 0x6e0]
push edx
push eax
call fcn.00408880
add esp, 8
lea ecx, [esp + 0x6e0]
lea edx, [esp + 0x320]
push ecx
push edx
call fcn.004088e0
add esp, 8
push 0x604
call sub.MSVCRT.dll_malloc
mov ebx, eax
mov ecx, 0x4379f0
add esp, 4
sub ecx, ebx
mov dword [esp + 0x14], ecx
mov edx, 0x91
mov esi, dword [ecx + eax]
mov dword [eax], esi
add eax, 4
dec edx
jne 0x40734b
lea eax, [esp + 0x320]
lea ecx, [ebx + 0x244]
mov edx, 0xf0
mov esi, dword [eax]
add eax, 4
mov dword [ecx], esi
add ecx, 4
dec edx
jne 0x407368
mov ebp, 0x91
mov edi, 0x438672
lea esi, [esp + 0x58]
push ebp
push ebx
call fcn.004091f0
mov dword [esi], eax
mov ax, word [esi]
mov word [edi], ax
add edi, 2
add esp, 8
add ebp, 0x78
add esi, 4
cmp edi, 0x438676
jl 0x407383
cmp word [esp + 0x1c], 1
je 0x40746d
push ebx
call sub.MSVCRT.dll_free
mov ecx, 0x91
lea esi, [esp + 0x4a0]
mov edi, 0x4379f0
add esp, 4
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [esp + 0x824]
lea edx, [esp + 0xf0]
push ecx
lea eax, [esp + 0x54]
push edx
lea ecx, [esp + 0x24]
push eax
lea edx, [esp + 0x32c]
push ecx
push edx
call fcn.00406aa0
lea eax, [esp + 0x104]
add esp, 0x14
lea ebx, [esp + 0x320]
xor esi, esi
mov dword [esp + 0x10], eax
lea ebp, [esp + 0x6e0]
lea edi, [esp + 0x60]
mov ecx, dword [esp + 0x824]
mov edx, dword [edi + 4]
mov eax, dword [edi]
push ecx
mov ecx, esi
push edx
sar ecx, 1
push eax
mov edx, dword [esp + ecx*4 + 0x64]
push edx
call fcn.0040ad90
mov eax, dword [esp + 0x20]
add esp, 0x10
push 0x437c34
push ebp
push eax
push ebx
call fcn.00408be0
mov ecx, dword [esp + 0x20]
add esp, 0x10
add ebx, 0xf0
inc esi
add edi, 0x1c
add ebp, 0x50
add ecx, 0x28
cmp esi, 4
mov dword [esp + 0x10], ecx
jl 0x407417
jmp 0x407760
mov ebp, 0x91
xor esi, esi
lea edi, [esp + 0xd0]
mov ecx, esi
sar ecx, 1
mov edx, dword [esp + ecx*4 + 0x58]
push edx
push ebp
push ebx
call fcn.00409310
add esp, 0xc
mov dword [edi], eax
add ebp, 0x3c
mov dword [edi + 4], edx
inc esi
add edi, 8
cmp esi, 4
jl 0x40747b
mov eax, ebx
mov ecx, 0x91
mov edx, dword [esp + 0x14]
add eax, 4
dec ecx
mov edx, dword [eax + edx - 4]
mov dword [eax - 4], edx
jne 0x4074a6
lea eax, [esp + 0x320]
lea ecx, [ebx + 0x244]
mov edx, 0xf0
mov esi, dword [eax]
add eax, 4
mov dword [ecx], esi
add ecx, 4
dec edx
jne 0x4074c9
mov eax, 0x4379f0
lea ecx, [ebx + 0x3c0]
mov edx, dword [ecx]
add ecx, 4
mov dword [eax], edx
add eax, 4
cmp eax, 0x437c34
jl 0x4074e1
xor edi, edi
lea esi, [esp + 0xd0]
mov ebp, 4
mov eax, dword [esi + 4]
mov ecx, dword [esi]
push eax
push ecx
push edi
lea edx, [esp + 0x32c]
push ebx
push edx
call fcn.00409490
add esp, 0x14
add edi, 0x3c
add esi, 8
dec ebp
jne 0x407500
push ebx
call sub.MSVCRT.dll_free
mov eax, dword [esp + 0x54]
mov ecx, dword [esp + 0x58]
add esp, 4
lea edx, [esp + 0x28]
push eax
push ecx
push 0x4379c8
push edx
call fcn.00407bc0
add esp, 0x10
lea eax, [esp + 0x28]
lea ecx, [esp + 0xf0]
push 0x4379c8
push eax
push ecx
call fcn.00407d50
mov ecx, 0xa
lea esi, [esp + 0x34]
mov edi, 0x4379c8
lea eax, [esp + 0x6ec]
rep movsd dword es:[edi], dword [esi]
mov dword [esp + 0x24], eax
lea eax, [esp + 0x19c]
lea ecx, [esp + 0x32c]
add esp, 0xc
xor ebx, ebx
lea edx, [esp + 0xf0]
sub eax, ecx
lea esi, [esp + 0x320]
mov dword [esp + 0x10], edx
lea edi, [esp + 0x60]
mov dword [esp + 0x14], eax
lea ebp, [esp + 0xd0]
mov edx, dword [ebp + 4]
mov eax, dword [ebp]
mov ecx, dword [esp + 0x18]
push edx
mov edx, dword [esp + 0x14]
push eax
push ecx
lea eax, [esp + 0x19c]
push edx
push eax
call fcn.00408980
mov ecx, dword [ebp + 4]
mov edx, dword [ebp]
mov eax, dword [esp + 0x2c]
add esp, 0x14
push ecx
mov ecx, dword [esp + 0x14]
push edx
push 0x437c34
push eax
push ecx
push esi
call fcn.00408ab0
mov edx, dword [esp + 0x83c]
add esp, 0x18
lea eax, [esp + 0x50]
lea ecx, [esp + 0x190]
push ebx
push edx
push eax
push 0x437e78
push ecx
push esi
call fcn.0040afd0
mov edx, dword [esp + 0x83c]
add esp, 0x18
lea eax, [esp + 0x50]
lea ecx, [esp + 0x190]
push ebx
push edx
push eax
push ecx
push esi
call fcn.004094f0
mov ecx, dword [edi + 4]
mov edx, ebx
sar edx, 1
add esp, 0x14
lea eax, [esp + edx*4 + 0x58]
mov edx, dword [edi]
mov dword [esp + 0x24], eax
push ecx
mov eax, dword [eax]
mov ecx, dword [esp + 0x828]
push edx
push eax
push ecx
lea edx, [esp + 0x1a0]
push 0x437e78
push edx
call fcn.0040b410
add esp, 0x18
mov eax, 0x437e78
mov ecx, dword [eax + 0xf0]
mov dword [eax], ecx
add eax, 4
cmp eax, 0x437fcc
jl 0x40766c
mov ecx, 0x437fcc
mov eax, esi
sub eax, ecx
mov dword [esp + 0x20], eax
jmp 0x407691
mov eax, dword [esp + 0x20]
mov edx, dword [esp + 0x14]
add eax, ecx
fld dword [edx + eax]
fadd dword [eax]
fld st(0)
fxch st(1)
fld st(1)
fcomp dword [0x4190c0]
fld st(1)
fxch st(1)
fstp dword [eax]
fstp dword [ecx]
fnstsw ax
test ah, 1
je 0x4076c1
fstp st(0)
mov dword [ecx], 0xc7000000
jmp 0x4076d4
fcomp dword [0x4190c4]
fnstsw ax
test ah, 0x41
jne 0x4076d4
mov dword [ecx], 0x46fffe00
add ecx, 4
cmp ecx, 0x4380bc
jl 0x40768d
mov eax, dword [esp + 0x824]
mov ecx, dword [edi + 4]
mov edx, dword [edi]
push eax
mov eax, dword [esp + 0x28]
push ecx
push edx
mov ecx, dword [eax]
push ecx
call fcn.0040ad90
mov edx, dword [esp + 0x28]
mov eax, dword [esp + 0x20]
add esp, 0x10
push 0x437c34
push edx
push eax
push esi
call fcn.00408be0
mov eax, dword [esp + 0x24]
mov edx, dword [esp + 0x28]
mov ecx, dword [esp + 0x20]
add esp, 0x10
add esi, 0xf0
sub eax, 0xf0
inc ebx
add ebp, 8
add edi, 0x1c
add edx, 0x50
add ecx, 0x28
cmp ebx, 4
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], edx
mov dword [esp + 0x10], ecx
jl 0x4075af
mov word [0x4386a4], 1
mov word [0x4387e8], 0x3039
mov ecx, dword [esp + 0x824]
mov edx, dword [esp + 0x1c]
mov eax, dword [esp + 0x828]
push ecx
push edx
lea ecx, [esp + 0x58]
push eax
push ecx
call fcn.00408d70
add esp, 0x10
test eax, eax
jne 0x40778b
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x810
ret