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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x464f0b
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x58
push ebx
push ebp
push esi
mov esi, ecx
push edi
cmp dword [esi + 0x40], 0x96
jg 0x4057c6
mov ecx, dword [esi + 0x44]
lea edx, [esp + 0x50]
push edx
mov eax, dword [ecx]
call dword [eax + 0xc]
mov ecx, dword [eax]
mov dword [esp + 0x5c], ecx
lea ecx, [esp + 0x50]
mov edx, dword [eax + 4]
push ecx
mov ecx, dword [esi + 0x44]
mov dword [esp + 0x64], edx
mov eax, dword [eax + 8]
mov dword [esp + 0x68], eax
call fcn.004044f0
mov edx, dword [eax]
mov dword [esp + 0x34], edx
mov ecx, dword [eax + 4]
mov dword [esp + 0x38], ecx
fld dword [esp + 0x38]
mov edx, dword [eax + 8]
fmul dword [esp + 0x38]
mov dword [esp + 0x3c], edx
fld dword [esp + 0x3c]
fmul dword [esp + 0x3c]
faddp st(1)
fld dword [esp + 0x34]
fmul dword [esp + 0x34]
faddp st(1)
fsqrt
fld dword [esp + 0x34]
fdiv st(1)
fstp dword [esp + 0x34]
fld dword [esp + 0x3c]
fdiv st(1)
fstp dword [esp + 0x3c]
fstp st(0)
call fcn.0045bccd
mov dword [esp + 0x20], eax
fild dword [esp + 0x20]
fmul dword [0x467334]
fst dword [esp + 0x20]
fcomp qword [0x467340]
fnstsw ax
test ah, 1
je 0x405613
mov dword [esp + 0x20], 0x3c23d70a
fld dword [esp + 0x34]
mov dword [esp + 0x14], 0xbf860a92
mov dword [esp + 0x54], 0
fstp qword [esp + 0x2c]
fld dword [esp + 0x3c]
xor ebp, ebp
fstp qword [esp + 0x34]
call fcn.0045bccd
lea ecx, [eax*8]
sub ecx, eax
lea eax, [ecx + ecx*2]
mov dword [esp + 0x1c], eax
fild dword [esp + 0x1c]
fmul dword [0x467334]
fadd dword [0x4673fc]
fstp dword [esp + 0x18]
call fcn.0045bccd
and eax, 0x80000001
jns 0x40566f
dec eax
or eax, 0xfffffffe
inc eax
jne 0x40567b
fld dword [esp + 0x18]
fchs
fstp dword [esp + 0x18]
mov ecx, dword [esp + 0x30]
mov edx, dword [esp + 0x2c]
push ecx
push edx
call fcn.004031f0
mov eax, dword [esp + 0x40]
mov ecx, dword [esp + 0x3c]
fstp dword [esp + 0x24]
push eax
push ecx
call fcn.00403230
fcomp dword [0x4672a0]
fld dword [esp + 0x2c]
add esp, 0x10
fnstsw ax
test ah, 1
je 0x4056b3
fchs
fadd dword [esp + 0x14]
fstp qword [esp + 0x24]
mov edi, dword [esp + 0x28]
mov ebx, dword [esp + 0x24]
push edi
push ebx
call fcn.00403190
fstp dword [esp + 0x24]
push edi
push ebx
call fcn.00403130
fstp dword [esp + 0x34]
fld dword [esp + 0x2c]
fmul dword [0x4673f8]
fld dword [esp + 0x34]
fmul dword [0x4673f8]
mov eax, dword [esp + 0x64]
push 0x1c
mov dword [esp + 0x5c], eax
fst dword [esp + 0x38]
fstp dword [esp + 0x64]
mov edx, dword [esp + 0x64]
fstp dword [esp + 0x6c]
fld dword [esp + 0x70]
fadd dword [esp + 0x38]
mov dword [esp + 0x58], edx
mov ecx, dword [esp + 0x6c]
mov dword [esp + 0x60], ecx
fstp dword [esp + 0x58]
fld dword [esp + 0x74]
fadd dword [esp + 0x5c]
fstp dword [esp + 0x5c]
fld dword [esp + 0x78]
fadd dword [esp + 0x60]
fstp dword [esp + 0x60]
call fcn.00401ae0
add esp, 0x14
mov dword [esp + 0x24], eax
cmp eax, ebp
mov dword [esp + 0x70], ebp
je 0x40576c
fld dword [esp + 0x48]
mov edx, dword [esp + 0x4c]
fadd dword [esp + 0x18]
push edx
push ecx
mov ecx, dword [esp + 0x4c]
fstp dword [esp]
push ecx
mov ecx, eax
call fcn.00404670
mov edi, eax
jmp 0x40576e
xor edi, edi
push 0xc
mov dword [esp + 0x74], 0xffffffff
call fcn.00401ae0
mov dword [eax + 8], edi
mov edx, dword [esi + 0x3c]
mov dword [eax], edx
mov dword [eax + 4], ebp
mov ecx, dword [esi + 0x38]
add esp, 4
cmp ecx, ebp
jne 0x405795
mov dword [esi + 0x38], eax
mov ecx, dword [esi + 0x3c]
cmp ecx, ebp
je 0x40579f
mov dword [ecx + 4], eax
fld dword [esp + 0x14]
fadd dword [esp + 0x20]
mov dword [esi + 0x3c], eax
mov eax, dword [esi + 0x40]
inc eax
mov dword [esi + 0x40], eax
fst dword [esp + 0x14]
fcomp dword [0x4673f4]
fnstsw ax
test ah, 1
jne 0x405635
mov ecx, dword [esp + 0x68]
pop edi
mov dword fs:[0], ecx
pop esi
pop ebp
pop ebx
mov esp, ebp
pop ebp
ret