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

Disassembly:
sub esp, 0x10c
mov ecx, dword [esp + 0x114]
mov eax, dword [esp + 0x120]
push ebx
push ebp
push esi
mov esi, dword [esp + 0x124]
test ecx, ecx
push edi
mov dword [esp + 0x18], eax
mov dword [esp + 0x20], 0
jle 0x40a8c7
mov eax, dword [esp + 0x120]
mov edi, dword [esp + 0x12c]
lea ecx, [eax + 8]
test edi, edi
mov dword [esp + 0x14], 0
jle 0x40a8ba
lea ebp, [esi + 8]
lea edx, [esp + 0x88]
mov ebx, ebp
mov dword [esp + 0x10], edi
fld dword [ebx - 8]
fsub dword [ecx + 4]
fld dword [ebx - 4]
fsub dword [ecx + 8]
fld dword [ebx]
fsub dword [ecx + 0xc]
fmul dword [ecx]
fxch st(1)
fmul dword [ecx - 4]
faddp st(1)
fxch st(1)
fmul dword [ecx - 8]
faddp st(1)
fcomp dword [0x4671bc]
fnstsw ax
test ah, 1
jne 0x40a613
mov eax, dword [esp + 0x14]
mov dword [edx], 1
inc eax
mov dword [esp + 0x14], eax
jmp 0x40a619
mov dword [edx], 0
mov eax, dword [esp + 0x10]
add ebx, 0xc
add edx, 4
dec eax
mov dword [esp + 0x10], eax
jne 0x40a5d4
mov eax, dword [esp + 0x14]
xor ebx, ebx
cmp eax, ebx
je 0x40a8ba
cmp eax, edi
jge 0x40a896
lea eax, [edi*4 - 4]
lea edx, [edi + edi*2 - 3]
mov edi, dword [esp + 0x18]
mov dword [esp + 0x10], eax
mov eax, ebp
mov ebp, 0xfffffff8
shl edx, 2
sub ebp, esi
mov dword [esp + 0x14], ebx
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x30], ebp
mov ebp, dword [esp + ebx*4 + 0x88]
test ebp, ebp
je 0x40a771
mov ebx, dword [esp + 0x10]
mov ebp, dword [esp + ebx + 0x88]
test ebp, ebp
jne 0x40a747
fld dword [edx + esi]
fsub dword [eax - 8]
fld dword [edx + esi + 4]
fsub dword [eax - 4]
fstp dword [esp + 0x44]
fld dword [edx + esi + 8]
fsub dword [eax]
fstp dword [esp + 0x48]
fld dword [ecx]
fmul dword [eax]
fld dword [ecx - 4]
fmul dword [eax - 4]
faddp st(1)
fld dword [ecx - 8]
fmul dword [eax - 8]
faddp st(1)
fadd dword [ecx + 0x10]
fld st(1)
fmul dword [ecx - 8]
fld dword [esp + 0x48]
fmul dword [ecx]
faddp st(1)
fld dword [esp + 0x44]
fmul dword [ecx - 4]
faddp st(1)
fdivp st(1)
fchs
fstp dword [esp + 0x10]
fmul dword [esp + 0x10]
fld dword [esp + 0x44]
fmul dword [esp + 0x10]
fstp dword [esp + 0x5c]
fld dword [esp + 0x48]
fmul dword [esp + 0x10]
fstp dword [esp + 0x60]
fadd dword [eax - 8]
fld dword [esp + 0x5c]
fadd dword [eax - 4]
fstp dword [esp + 0x74]
fld dword [esp + 0x60]
fadd dword [eax]
mov edx, dword [esp + 0x74]
mov dword [esp + 0x28], edx
fstp dword [esp + 0x78]
mov edx, dword [esp + 0x78]
fstp dword [esp + 0x24]
mov ebx, dword [esp + 0x24]
mov dword [esp + 0x2c], edx
mov edx, edi
mov dword [edx], ebx
mov ebx, dword [esp + 0x28]
mov dword [edx + 4], ebx
mov ebx, dword [esp + 0x2c]
mov dword [edx + 8], ebx
mov ebx, dword [esp + 0x14]
inc ebx
add edi, 0xc
mov dword [esp + 0x14], ebx
lea edx, [eax - 8]
mov ebx, edi
mov ebp, dword [edx]
mov dword [ebx], ebp
mov ebp, dword [edx + 4]
mov dword [ebx + 4], ebp
mov edx, dword [edx + 8]
mov dword [ebx + 8], edx
mov ebx, dword [esp + 0x14]
inc ebx
add edi, 0xc
mov dword [esp + 0x14], ebx
mov ebx, dword [esp + 0x1c]
jmp 0x40a849
mov ebp, dword [esp + 0x10]
cmp dword [esp + ebp + 0x88], 0
je 0x40a849
fld dword [edx + esi]
fsub dword [eax - 8]
fld dword [edx + esi + 4]
fsub dword [eax - 4]
fstp dword [esp + 0x38]
fld dword [edx + esi + 8]
fsub dword [eax]
fstp dword [esp + 0x3c]
fld dword [ecx]
fmul dword [eax]
fld dword [ecx - 4]
fmul dword [eax - 4]
faddp st(1)
fld dword [ecx - 8]
fmul dword [eax - 8]
faddp st(1)
fadd dword [ecx + 0x10]
fld st(1)
fmul dword [ecx - 8]
fld dword [esp + 0x3c]
fmul dword [ecx]
faddp st(1)
fld dword [esp + 0x38]
fmul dword [ecx - 4]
faddp st(1)
fdivp st(1)
fchs
fstp dword [esp + 0x10]
fmul dword [esp + 0x10]
fld dword [esp + 0x38]
fmul dword [esp + 0x10]
fstp dword [esp + 0x80]
fld dword [esp + 0x3c]
fmul dword [esp + 0x10]
fstp dword [esp + 0x84]
fadd dword [eax - 8]
fld dword [esp + 0x80]
fadd dword [eax - 4]
fstp dword [esp + 0x68]
fld dword [esp + 0x84]
fadd dword [eax]
mov edx, dword [esp + 0x68]
mov dword [esp + 0x50], edx
fstp dword [esp + 0x6c]
mov edx, dword [esp + 0x6c]
fstp dword [esp + 0x4c]
mov ebp, dword [esp + 0x4c]
mov dword [esp + 0x54], edx
mov edx, edi
mov dword [edx], ebp
mov ebp, dword [esp + 0x50]
mov dword [edx + 4], ebp
mov ebp, dword [esp + 0x54]
mov dword [edx + 8], ebp
mov ebp, dword [esp + 0x14]
inc ebp
add edi, 0xc
mov dword [esp + 0x14], ebp
mov ebp, dword [esp + 0x12c]
lea edx, [ebx*4]
mov dword [esp + 0x10], edx
mov edx, dword [esp + 0x30]
add edx, eax
inc ebx
add eax, 0xc
cmp ebx, ebp
mov dword [esp + 0x1c], ebx
jl 0x40a66b
mov esi, dword [esp + 0x18]
mov eax, dword [esp + 0x130]
cmp esi, eax
jne 0x40a887
lea eax, [esp + 0xa4]
mov edi, dword [esp + 0x14]
mov dword [esp + 0x18], eax
mov dword [esp + 0x12c], edi
mov eax, dword [esp + 0x20]
mov edx, dword [esp + 0x124]
inc eax
add ecx, 0x1c
cmp eax, edx
mov dword [esp + 0x20], eax
jl 0x40a5b4
mov eax, dword [esp + 0x130]
jmp 0x40a8ce
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x10c
ret
mov edi, dword [esp + 0x12c]
cmp esi, eax
je 0x40a8e3
lea ecx, [edi + edi*2]
shl ecx, 2
push ecx
push esi
push eax
call fcn.00450dd0
add esp, 0xc
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10c
ret