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

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x4c
mov eax, dword [esp + 0x7c]
cmp dword [esp + 0x78], eax
mov esi, dword [esp + 0x6c]
mov ebp, dword [esp + 0x90]
jge 0x40f986
mov eax, dword [esp + 0x78]
mov ecx, esi
mov dword [esp + 0x14], 1
shl dword [esp + 0x14], cl
mov ecx, esi
add eax, eax
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x78]
imul eax, dword [esp + 0x70]
add eax, dword [esp + 0x68]
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x60]
mov edi, dword [esp + 0x28]
mov dword [esp + 0x1c], ecx
mov eax, dword [eax + 0x20]
mov ebx, edi
add ebx, 2
mov dword [esp + 0x34], ebx
movsx ebx, word [eax + edi + 2]
movsx eax, word [eax + edi]
sub ebx, eax
mov eax, ebx
shl eax, cl
mov ecx, eax
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x8c]
mov eax, dword [eax + edi*2]
mov dword [esp + 0x10], eax
add eax, 1
cdq
idiv ecx
mov dword [esp + 0x38], eax
fild dword [esp + 0x38]
fmul dword [0x424460]
fld qword [0x424458]
fmulp st(1)
fstp qword [esp]
call fcn.0041f260
mov ecx, dword [esp + 0x1c]
fstp dword [esp + 0x3c]
fld dword [esp + 0x3c]
fmul dword [0x424464]
fild dword [esp + 0x30]
fld st(0)
fsqrt
fucomi st(0)
jp 0x40f98e
fstp st(1)
fstp dword [esp + 0x3c]
fld dword [esp + 0x3c]
fdivr dword [0x42444c]
mov dword [esp + 0x20], 0
mov dword [esp + 0x10], 0
fstp dword [esp + 0x2c]
mov eax, dword [esp + 0x60]
mov edi, dword [esp + 0x84]
mov edx, dword [eax + 8]
mov eax, dword [esp + 0x10]
imul eax, edx
add eax, dword [esp + 0x78]
cmp dword [esp + 0x70], 1
fld dword [edi + eax*4]
mov edi, dword [esp + 0x88]
fld dword [edi + eax*4]
je 0x40f94c
mov edi, dword [esp + 0x80]
fucomi st(1)
fcmovnbe st(0), st(1)
fstp st(1)
fsubr dword [edi + eax*4]
fldz
fucompi st(1)
ja 0x40f979
fchs
fld qword [0x424458]
fmulp st(1)
fxch st(1)
fstp dword [esp + 0x1c]
fstp qword [esp]
mov dword [esp + 0x24], ecx
call fcn.0041f260
mov ecx, dword [esp + 0x24]
cmp ecx, 3
fstp dword [esp + 0x3c]
fld dword [esp + 0x3c]
fadd st(0)
fld dword [esp + 0x1c]
je 0x40f93f
fxch st(1)
mov eax, dword [esp + 0x60]
fucomi st(1)
mov edi, dword [esp + 0x28]
fcmovnbe st(0), st(1)
mov eax, dword [eax + 0x20]
fmul dword [esp + 0x2c]
movsx eax, word [eax + edi]
mov edi, dword [esp + 0x64]
shl eax, cl
add eax, dword [esp + 0x20]
lea edi, [edi + eax*4]
mov eax, dword [esp + 0x14]
test eax, eax
jle 0x40f8d2
xor edx, edx
xor esi, esi
fld st(0)
fchs
mov dword [esp + 0x1c], edx
lea esi, [esi]
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 0x10]
movzx eax, byte [eax + edx]
bt eax, esi
jb 0x40f8bb
test ebx, ebx
jle 0x40f8b3
xor eax, eax
imul ebp, ebp, 0x19660d
mov edx, eax
shl edx, cl
add edx, esi
lea edx, [edi + edx*4]
add ebp, 0x3c6ef35f
test ebp, 0x8000
fld st(1)
jne 0x40f8aa
fstp st(0)
fld st(0)
add eax, 1
cmp eax, ebx
fstp dword [edx]
jne 0x40f887
mov dword [esp + 0x1c], 1
add esi, 1
cmp esi, dword [esp + 0x14]
jne 0x40f870
fstp st(0)
fstp st(0)
mov edx, dword [esp + 0x1c]
test edx, edx
je 0x40f8d4
jmp 0x40f915
fstp st(0)
add dword [esp + 0x10], 1
mov eax, dword [esp + 0x74]
add dword [esp + 0x20], eax
mov eax, dword [esp + 0x10]
cmp dword [esp + 0x70], eax
jg 0x40f7b0
fstp st(0)
mov eax, dword [esp + 0x70]
add dword [esp + 0x18], eax
add dword [esp + 0x78], 1
mov eax, dword [esp + 0x7c]
cmp dword [esp + 0x78], eax
je 0x40f986
mov eax, dword [esp + 0x34]
mov dword [esp + 0x28], eax
jmp 0x40f70b
mov eax, dword [esp + 0x30]
fstp dword [esp + 0x1c]
mov dword [esp + 8], 0x3f800000
mov dword [esp], edi
mov dword [esp + 0x24], ecx
mov dword [esp + 4], eax
call fcn.00411640
mov ecx, dword [esp + 0x24]
fld dword [esp + 0x1c]
jmp 0x40f8d4
fxch st(1)
fmul dword [0x424468]
jmp 0x40f834
mov edi, dword [esp + 0x84]
add edx, dword [esp + 0x78]
fld dword [edi + edx*4]
fxch st(2)
mov edi, dword [esp + 0x88]
fucomi st(2)
fcmovbe st(0), st(2)
fstp st(2)
fld dword [edi + edx*4]
fxch st(1)
fucomi st(1)
fcmovbe st(0), st(1)
fstp st(1)
jmp 0x40f7e1
fstp st(0)
fldz
fchs
fxch st(1)
jmp 0x40f807
add esp, 0x4c
pop ebx
pop esi
pop edi
pop ebp
ret
fstp st(0)
fxch st(1)
fstp dword [esp + 0x10]
fstp qword [esp]
call fcn.0041f420
mov ecx, dword [esp + 0x1c]
fld dword [esp + 0x10]
fxch st(1)
jmp 0x40f78e