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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
fld dword [ebp + 8]
sub esp, 0x74
push ebx
mov ebx, ecx
fld dword [ebx + 0x40]
push esi
fcompp
push edi
fnstsw ax
test ah, 0x41
jne 0x40cd6b
fld dword [ebx + 0x40]
fstp dword [ebp + 8]
fld dword [ebp + 0xc]
fld dword [ebx + 0x44]
fcompp
fnstsw ax
test ah, 5
jp 0x40cd80
fld dword [ebx + 0x44]
fstp dword [ebp + 0xc]
fld dword [ebp + 0xc]
mov edi, dword [ebp + 0x10]
fsub dword [ebp + 8]
fstp dword [esp + 0x18]
fldz
fcom dword [esp + 0x18]
fnstsw ax
test ah, 5
jp 0x40cdb0
fld dword [ebx + 0xc8]
fmul dword [esp + 0x18]
fmul dword [0x572190]
fadd dword [edi + 0xc]
fstp dword [edi + 0xc]
fld dword [edi + 0xc]
call fcn.005209b0
mov esi, eax
mov eax, dword [ebp + 0x14]
fld dword [eax + 0x44]
mov dword [esp + 0x30], esi
fstp dword [esp + 0x20]
fld dword [eax + 0x48]
fstp dword [esp + 0x24]
fld dword [eax + 0x74]
fstp dword [esp + 0x18]
fcomp dword [esp + 0x18]
fnstsw ax
test ah, 0x44
jp 0x40cf5b
test esi, esi
jle 0x40d1b6
mov dword [esp + 0x1c], esi
call fcn.004e0031
mov dword [esp + 0x28], eax
fild dword [esp + 0x28]
fdiv qword [0x543930]
fstp dword [esp + 0x14]
call fcn.004e0031
cmp dword [ebx + 0xf4], 0
mov dword [esp + 0x28], eax
fild dword [esp + 0x28]
fdiv qword [0x543930]
fstp dword [esp + 0x10]
je 0x40cea0
mov esi, dword [ebx + 0xf4]
mov edi, dword [esi + 4]
mov dword [esp + 0x28], esi
call fcn.004e0031
fild dword [esi + 8]
cdq
mov ecx, 0xfe
idiv ecx
mov ecx, dword [esi + 8]
mov eax, edx
add eax, 5
test ecx, ecx
jge 0x40ce57
fadd dword [0x5439c0]
fmul dword [esp + 0x10]
mov dword [esp + 0x2c], eax
call fcn.005209e6
mov esi, eax
imul esi, edi
test edi, edi
mov dword [esp + 0x34], edi
fild dword [esp + 0x34]
jge 0x40ce7b
fadd dword [0x5439c0]
fmul dword [esp + 0x14]
call fcn.005209e6
mov ecx, dword [esp + 0x2c]
mov edi, dword [ebp + 0x10]
add esi, eax
mov eax, dword [esp + 0x28]
mov eax, dword [eax]
movzx eax, byte [eax + esi*4 + 2]
cmp eax, ecx
jl 0x40cf4c
fld dword [ebp + 0xc]
push ecx
fstp dword [esp]
call fcn.00408502
fld dword [ebx + 0xe4]
mov esi, eax
lea eax, [ebx + 0xdc]
fsub dword [eax]
fmul dword [esp + 0x14]
fld dword [eax]
lea eax, [ebx + 0xe0]
fadd dword [esp + 0x20]
faddp st(1)
fstp dword [esi]
fld dword [ebx + 0xe8]
fsub dword [eax]
fmul dword [esp + 0x10]
fld dword [eax]
fadd dword [esp + 0x24]
faddp st(1)
fstp dword [esi + 4]
call fcn.004e0031
mov dword [esp + 0x2c], eax
fild dword [esp + 0x2c]
fdiv qword [0x543930]
fld dword [ebx + 0xd4]
fsub dword [ebx + 0xcc]
fmulp st(1)
fadd dword [ebx + 0xcc]
fstp dword [esi + 8]
call fcn.004e0031
mov dword [esp + 0x2c], eax
fild dword [esp + 0x2c]
mov eax, ebx
fdiv qword [0x543930]
fld dword [ebx + 0xd8]
fsub dword [ebx + 0xd0]
fmulp st(1)
fadd dword [ebx + 0xd0]
fstp dword [esi + 0xc]
fld dword [esi + 0x4c]
fadd dword [esp + 0x18]
fstp dword [esi + 0x4c]
call fcn.0040d9d2
dec dword [esp + 0x1c]
jne 0x40cdf1
jmp 0x40d1b6
fld dword [esp + 0x18]
push ecx
fstp dword [esp]
call fcn.004046fe
fstp dword [esp + 0x3c]
fld dword [esp + 0x1c]
fstp dword [esp]
call fcn.00404718
test esi, esi
fchs
fstp dword [esp + 0x40]
pop ecx
fld dword [esp + 0x3c]
fchs
fstp dword [esp + 0x78]
jle 0x40d1b6
mov dword [esp + 0x28], esi
call fcn.004e0031
mov dword [esp + 0x2c], eax
fild dword [esp + 0x2c]
fdiv qword [0x543930]
fstp dword [esp + 0x14]
call fcn.004e0031
cmp dword [ebx + 0xf4], 0
mov dword [esp + 0x2c], eax
fild dword [esp + 0x2c]
fdiv qword [0x543930]
fstp dword [esp + 0x10]
je 0x40d044
mov esi, dword [ebx + 0xf4]
mov edi, dword [esi + 4]
mov dword [esp + 0x2c], esi
call fcn.004e0031
fild dword [esi + 8]
cdq
mov ecx, 0xfe
idiv ecx
mov ecx, dword [esi + 8]
mov eax, edx
add eax, 5
test ecx, ecx
jge 0x40cffb
fadd dword [0x5439c0]
fmul dword [esp + 0x10]
mov dword [esp + 0x1c], eax
call fcn.005209e6
mov esi, eax
imul esi, edi
test edi, edi
mov dword [esp + 0x34], edi
fild dword [esp + 0x34]
jge 0x40d01f
fadd dword [0x5439c0]
fmul dword [esp + 0x14]
call fcn.005209e6
mov ecx, dword [esp + 0x1c]
mov edi, dword [ebp + 0x10]
add esi, eax
mov eax, dword [esp + 0x2c]
mov eax, dword [eax]
movzx eax, byte [eax + esi*4 + 2]
cmp eax, ecx
jl 0x40d1ac
fld dword [ebp + 0xc]
push ecx
fstp dword [esp]
call fcn.00408502
fld dword [ebx + 0xe8]
mov esi, eax
lea eax, [ebx + 0xe0]
fsub dword [eax]
fmul dword [esp + 0x10]
fadd dword [eax]
lea eax, [ebx + 0xdc]
fstp dword [esp + 0x1c]
fld dword [esp + 0x1c]
fmul dword [esp + 0x38]
fstp dword [esp + 0x50]
fld dword [esp + 0x1c]
fmul dword [esp + 0x3c]
fstp dword [esp + 0x54]
fld dword [ebx + 0xe4]
fsub dword [eax]
fmul dword [esp + 0x14]
fadd dword [eax]
fstp dword [esp + 0x1c]
fld dword [esp + 0x78]
fmul dword [esp + 0x1c]
fstp dword [esp + 0x40]
fld dword [esp + 0x1c]
fmul dword [esp + 0x38]
fstp dword [esp + 0x44]
fld dword [esp + 0x40]
fadd dword [esp + 0x20]
fstp dword [esp + 0x48]
fld dword [esp + 0x44]
fadd dword [esp + 0x24]
fstp dword [esp + 0x4c]
fld dword [esp + 0x48]
fadd dword [esp + 0x50]
fstp dword [esp + 0x58]
mov eax, dword [esp + 0x58]
fld dword [esp + 0x4c]
mov dword [esi], eax
fadd dword [esp + 0x54]
fstp dword [esp + 0x5c]
mov eax, dword [esp + 0x5c]
mov dword [esi + 4], eax
call fcn.004e0031
mov dword [esp + 0x2c], eax
fild dword [esp + 0x2c]
fdiv qword [0x543930]
fld dword [ebx + 0xd8]
fsub dword [ebx + 0xd0]
fmulp st(1)
fadd dword [ebx + 0xd0]
fstp dword [esp + 0x1c]
fld dword [esp + 0x1c]
fmul dword [esp + 0x38]
fstp dword [esp + 0x68]
fld dword [esp + 0x1c]
fmul dword [esp + 0x3c]
fstp dword [esp + 0x6c]
call fcn.004e0031
mov dword [esp + 0x2c], eax
fild dword [esp + 0x2c]
fdiv qword [0x543930]
fld dword [ebx + 0xd4]
fsub dword [ebx + 0xcc]
fmulp st(1)
fadd dword [ebx + 0xcc]
fstp dword [esp + 0x1c]
fld dword [esp + 0x1c]
fmul dword [esp + 0x78]
fstp dword [esp + 0x60]
fld dword [esp + 0x1c]
fmul dword [esp + 0x38]
fstp dword [esp + 0x64]
fld dword [esp + 0x60]
fadd dword [esp + 0x68]
fstp dword [esp + 0x70]
fld dword [esp + 0x64]
fadd dword [esp + 0x6c]
fstp dword [esp + 0x74]
mov eax, dword [esp + 0x70]
fld dword [esi + 0x4c]
fadd dword [esp + 0x18]
mov dword [esi + 8], eax
mov eax, dword [esp + 0x74]
mov dword [esi + 0xc], eax
mov eax, ebx
fstp dword [esi + 0x4c]
call fcn.0040d9d2
dec dword [esp + 0x28]
jne 0x40cf95
fld dword [edi + 0xc]
fisub dword [esp + 0x30]
fstp dword [edi + 0xc]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10