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

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x8c
fld qword [esp + 0xb4]
mov dword [esp + 4], 0x30
mov dword [esp], 1
fstp qword [esp + 0x10]
call sub.msvcrt.dll_calloc
fild dword [esp + 0xa0]
mov esi, eax
movzx ecx, byte [esp + 0xac]
mov dword [esp + 0x64], eax
mov eax, 1
fmul qword [esp + 0x10]
mov ebx, eax
fild dword [esp + 0xa4]
fdivp st(1)
fld st(0)
fld1
fxch st(2)
fucompi st(2)
fcmovnbe st(0), st(1)
fxch st(1)
shl ebx, cl
test esi, esi
fstp qword [esp + 0x10]
je 0x40b667
mov ecx, ebx
fild dword [esp + 0xa8]
fxch st(1)
mov ebx, dword [esp + 0xac]
lea edx, [ecx - 1]
mov edi, esi
mov dword [esp + 0x44], ecx
fst qword [esp + 0x18]
mov dword [esi + 0x28], edx
mov edx, dword [esp + 0xb0]
mov dword [esi + 0x24], ebx
fdivp st(1)
mov dword [esi + 0x2c], edx
fnstcw word [esp + 0x7a]
movzx edx, word [esp + 0x7a]
mov dh, 8
mov word [esp + 0x78], dx
movzx edx, word [esp + 0x7a]
mov dh, 0xc
fldcw word [esp + 0x78]
frndint
fldcw word [esp + 0x7a]
mov word [esp + 0x76], dx
fldcw word [esp + 0x76]
fistp dword [esp + 0x70]
fldcw word [esp + 0x7a]
mov ebx, dword [esp + 0x70]
test ebx, ebx
cmovle ebx, eax
lea eax, [ecx + 1]
mov dword [esi + 8], ebx
mov dword [esp], 1
imul eax, ebx
add eax, eax
mov dword [esp + 4], eax
call sub.msvcrt.dll_calloc
test eax, eax
mov esi, eax
mov dword [edi + 4], eax
je 0x40b6d0
lea eax, [ebx*8]
lea edi, [ebx - 1]
mov dword [esp], eax
call sub.msvcrt.dll_malloc
mov ebp, eax
mov eax, edi
sar eax, 1
test ebp, ebp
mov dword [esp + 0x48], eax
je 0x40b6d0
fld qword [esp + 0x10]
fld qword [esp + 0x18]
mov edx, dword [esp + 0x44]
fucomi st(1)
fcmovnbe st(0), st(1)
fstp st(1)
test edx, edx
fst qword [esp + 0x18]
jle 0x40b5e1
mov dword [esp + 0x10], ebx
lea ecx, [ebx + ebx]
mov dword [esp + 0x3c], 0
fild dword [esp + 0x10]
mov dword [esp + 0x4c], ecx
lea ecx, [ebp + eax*8]
mov dword [esp + 0x60], ebx
fmulp st(1)
mov dword [esp + 0x5c], ecx
mov ecx, ebx
sub ecx, eax
mov dword [esp + 0x58], ecx
fmul qword [0x671fc8]
fstp qword [esp + 0x20]
fild dword [esp + 0x44]
fstp qword [esp + 0x50]
fild dword [esp + 0x3c]
mov ebx, dword [esp + 0x48]
mov dword [esp + 0x40], esi
fdiv qword [esp + 0x50]
mov esi, dword [esp + 0x5c]
neg ebx
mov edi, ebx
mov ebx, dword [esp + 0x58]
fldz
nop
mov dword [esp + 0x10], edi
fild dword [esp + 0x10]
fsub st(2)
fmul qword [0x671fc8]
fmul qword [esp + 0x18]
fldz
fxch st(1)
fucomi st(1)
fstp st(1)
jp 0x40b4b8
je 0x40b680
fxch st(1)
jmp 0x40b4c0
fxch st(1)
lea esi, [esi]
fstp qword [esp + 0x30]
fxch st(1)
fstp qword [esp + 0x28]
fst qword [esp]
fstp qword [esp + 0x10]
call fcn.005ae8a0
fld qword [esp + 0x10]
fdiv st(1), st(0)
fld qword [esp + 0x28]
fld qword [esp + 0x30]
fxch st(2)
fadd st(0)
fdiv qword [esp + 0x20]
fmul st(0)
fld1
fsubrp st(1)
fldz
fxch st(1)
fucomi st(1)
jbe 0x40b543
fld st(0)
fsqrt
fxch st(2)
fucompi st(1)
ja 0x40b68b
fstp st(0)
fmul dword [0x671fd0]
fmul st(0)
fmul dword [0x671fd4]
fld1
mov edx, 1
fld1
mov eax, edx
imul eax, edx
add edx, 1
mov dword [esp + 0x10], eax
fild dword [esp + 0x10]
fdivr st(3)
fmulp st(1)
fld st(1)
fadd st(1)
fxch st(2)
fucompi st(2)
jp 0x40b541
je 0x40b550
jmp 0x40b521
fstp st(0)
fstp st(0)
fld1
jmp 0x40b554
fstp st(0)
fstp st(1)
fmulp st(3)
fxch st(2)
fst qword [esi + edi*8]
add edi, 1
cmp ebx, edi
faddp st(1)
jne 0x40b490
fstp st(1)
xor ebx, ebx
mov esi, dword [esp + 0x40]
fstp qword [esp + 0x10]
mov edi, ebx
mov ebx, dword [esp + 0x60]
lea esi, [esi]
fld dword [0x671fd8]
fmul qword [ebp + edi*8]
fdiv qword [esp + 0x10]
fstp dword [esp]
call fcn.005a8bd0
mov ecx, 0x7fff
cmp eax, 0x7fff
cmovg eax, ecx
mov ecx, 0xffff8000
cmp eax, 0xffff8000
cmovl eax, ecx
mov word [esi + edi*2], ax
add edi, 1
cmp ebx, edi
jne 0x40b580
add dword [esp + 0x3c], 1
add esi, dword [esp + 0x4c]
mov eax, dword [esp + 0x3c]
cmp dword [esp + 0x44], eax
jne 0x40b471
mov eax, dword [esp + 0x64]
mov ebx, dword [eax + 8]
mov esi, dword [eax + 4]
lea edi, [ebx - 1]
jmp 0x40b5e3
fstp st(0)
mov dword [esp], ebp
add edi, edi
call fcn.005b8168
movzx ecx, byte [esp + 0xac]
mov dword [esp + 8], edi
mov dword [esp + 4], esi
shl ebx, cl
lea eax, [esi + ebx*2 + 2]
mov dword [esp], eax
call sub.msvcrt.dll_memcpy
mov esi, dword [esp + 0x64]
movzx ecx, byte [esp + 0xac]
mov eax, dword [esi + 8]
mov edx, dword [esi + 4]
mov edi, eax
movzx ebx, word [edx + eax*2 - 2]
shl edi, cl
mov ecx, dword [esp + 0xa0]
mov word [edx + edi*2], bx
mov dword [esi + 0x1c], ecx
movzx ecx, byte [esp + 0xac]
mov edx, dword [esp + 0xa4]
shl edx, cl
mov dword [esi + 0x10], edx
mov dword [esi + 0xc], edx
lea edx, [eax - 1]
mov eax, edx
shr eax, 0x1f
add eax, edx
sar eax, 1
mov edx, eax
mov eax, dword [esp + 0x44]
neg eax
imul eax, edx
mov dword [esi + 0x14], eax
jmp 0x40b669
fstp st(0)
mov eax, dword [esp + 0x64]
add esp, 0x8c
pop ebx
pop esi
pop edi
pop ebp
ret
fld1
fxch st(3)
fxch st(1)
jmp 0x40b4e6
fxch st(3)
fstp qword [esp + 0x68]
fxch st(1)
fstp qword [esp + 0x30]
fstp qword [esp + 0x28]
fxch st(1)
fstp qword [esp + 0x10]
fstp qword [esp]
call fcn.005a8c60
fstp st(0)
fld qword [esp + 0x28]
fmul dword [0x671fd0]
fmul st(0)
fmul dword [0x671fd4]
fld qword [esp + 0x68]
fld qword [esp + 0x30]
fld qword [esp + 0x10]
fxch st(3)
jmp 0x40b518
mov dword [esp], esi
call fcn.005b8168
mov eax, dword [esp + 0x64]
mov dword [esp], eax
call fcn.005b8168
mov dword [esp + 0x64], 0
mov eax, dword [esp + 0x64]
add esp, 0x8c
pop ebx
pop esi
pop edi
pop ebp
ret