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

Disassembly:
sub esp, 0x110
mov ecx, dword [esp + 0x118]
mov eax, dword [esp + 0x120]
push ebx
push ebp
push esi
mov esi, dword [esp + 0x128]
push edi
mov edi, 3
test ecx, ecx
mov dword [esp + 0x20], edi
mov dword [esp + 0x18], eax
mov dword [esp + 0x24], 0
jle 0x40a534
mov eax, dword [esp + 0x124]
lea ecx, [eax + 8]
test edi, edi
mov dword [esp + 0x14], 0
jle 0x40a556
lea ebp, [esi + 8]
lea edx, [esp + 0x8c]
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 0x40a295
mov eax, dword [esp + 0x14]
mov dword [edx], 1
inc eax
mov dword [esp + 0x14], eax
jmp 0x40a29b
mov dword [edx], 0
mov eax, dword [esp + 0x10]
add ebx, 0xc
add edx, 4
dec eax
mov dword [esp + 0x10], eax
jne 0x40a256
mov eax, dword [esp + 0x14]
xor ebx, ebx
cmp eax, ebx
je 0x40a556
cmp eax, edi
jge 0x40a512
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 + 0x34], ebp
mov ebp, dword [esp + ebx*4 + 0x8c]
test ebp, ebp
je 0x40a3f3
mov ebx, dword [esp + 0x10]
mov ebp, dword [esp + ebx + 0x8c]
test ebp, ebp
jne 0x40a3c9
fld dword [edx + esi]
fsub dword [eax - 8]
fld dword [edx + esi + 4]
fsub dword [eax - 4]
fstp dword [esp + 0x48]
fld dword [edx + esi + 8]
fsub dword [eax]
fstp dword [esp + 0x4c]
fld dword [ecx - 8]
fmul dword [eax - 8]
fld dword [ecx]
fmul dword [eax]
faddp st(1)
fld dword [ecx - 4]
fmul dword [eax - 4]
faddp st(1)
fadd dword [ecx + 0x10]
fld dword [esp + 0x4c]
fmul dword [ecx]
fld dword [esp + 0x48]
fmul dword [ecx - 4]
faddp st(1)
fld st(2)
fmul dword [ecx - 8]
faddp st(1)
fdivp st(1)
fchs
fstp dword [esp + 0x10]
fmul dword [esp + 0x10]
fld dword [esp + 0x48]
fmul dword [esp + 0x10]
fstp dword [esp + 0x60]
fld dword [esp + 0x4c]
fmul dword [esp + 0x10]
fstp dword [esp + 0x64]
fadd dword [eax - 8]
fld dword [esp + 0x60]
fadd dword [eax - 4]
fstp dword [esp + 0x78]
fld dword [esp + 0x64]
fadd dword [eax]
mov edx, dword [esp + 0x78]
mov dword [esp + 0x2c], edx
fstp dword [esp + 0x7c]
mov edx, dword [esp + 0x7c]
fstp dword [esp + 0x28]
mov ebx, dword [esp + 0x28]
mov dword [esp + 0x30], edx
mov edx, edi
mov dword [edx], ebx
mov ebx, dword [esp + 0x2c]
mov dword [edx + 4], ebx
mov ebx, dword [esp + 0x30]
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 0x40a4cb
mov ebp, dword [esp + 0x10]
cmp dword [esp + ebp + 0x8c], 0
je 0x40a4cb
fld dword [edx + esi]
fsub dword [eax - 8]
fld dword [edx + esi + 4]
fsub dword [eax - 4]
fstp dword [esp + 0x3c]
fld dword [edx + esi + 8]
fsub dword [eax]
fstp dword [esp + 0x40]
fld dword [ecx - 8]
fmul dword [eax - 8]
fld dword [ecx]
fmul dword [eax]
faddp st(1)
fld dword [ecx - 4]
fmul dword [eax - 4]
faddp st(1)
fadd dword [ecx + 0x10]
fld dword [esp + 0x40]
fmul dword [ecx]
fld dword [esp + 0x3c]
fmul dword [ecx - 4]
faddp st(1)
fld st(2)
fmul dword [ecx - 8]
faddp st(1)
fdivp st(1)
fchs
fstp dword [esp + 0x10]
fmul dword [esp + 0x10]
fld dword [esp + 0x3c]
fmul dword [esp + 0x10]
fstp dword [esp + 0x84]
fld dword [esp + 0x40]
fmul dword [esp + 0x10]
fstp dword [esp + 0x88]
fadd dword [eax - 8]
fld dword [esp + 0x84]
fadd dword [eax - 4]
fstp dword [esp + 0x6c]
fld dword [esp + 0x88]
fadd dword [eax]
mov edx, dword [esp + 0x6c]
mov dword [esp + 0x54], edx
fstp dword [esp + 0x70]
mov edx, dword [esp + 0x70]
fstp dword [esp + 0x50]
mov ebp, dword [esp + 0x50]
mov dword [esp + 0x58], edx
mov edx, edi
mov dword [edx], ebp
mov ebp, dword [esp + 0x54]
mov dword [edx + 4], ebp
mov ebp, dword [esp + 0x58]
mov dword [edx + 8], ebp
mov ebp, dword [esp + 0x14]
inc ebp
add edi, 0xc
mov dword [esp + 0x14], ebp
mov ebp, dword [esp + 0x20]
lea edx, [ebx*4]
mov dword [esp + 0x10], edx
mov edx, dword [esp + 0x34]
add edx, eax
inc ebx
add eax, 0xc
cmp ebx, ebp
mov dword [esp + 0x1c], ebx
jl 0x40a2ed
mov esi, dword [esp + 0x18]
mov eax, dword [esp + 0x130]
cmp esi, eax
jne 0x40a506
lea eax, [esp + 0xa8]
mov edi, dword [esp + 0x14]
mov dword [esp + 0x18], eax
mov dword [esp + 0x20], edi
mov eax, dword [esp + 0x24]
mov edx, dword [esp + 0x128]
inc eax
add ecx, 0x1c
cmp eax, edx
mov dword [esp + 0x24], eax
jl 0x40a236
mov eax, dword [esp + 0x130]
cmp esi, eax
je 0x40a549
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, 0x110
ret
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x110
ret