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

Disassembly:
sub esp, 0x30
mov eax, dword [esp + 0x40]
mov ecx, dword [esp + 0x5c]
cdq
sub eax, edx
push ebx
sar eax, 1
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x3c]
cdq
sub eax, edx
push ebp
sar eax, 1
mov dword [esp + 0x48], eax
mov eax, dword [esp + 0x4c]
cdq
sub eax, edx
push esi
sar eax, 1
mov esi, ecx
push edi
sub esi, eax
mov eax, dword [esp + 0x58]
cdq
sub eax, edx
sub ecx, esi
mov edi, eax
mov eax, dword [esp + 0x70]
sar edi, 1
mov edx, eax
mov ebx, dword [esp + 0x64]
sub edx, edi
mov edi, dword [esp + 0x68]
sub eax, edx
imul edi, dword [esp + 0x60]
mov dword [esp + 0x68], eax
mov ebp, dword [esp + 0x4c]
fild dword [esp + 0x68]
mov dword [esp + 0x68], ecx
add edi, ebx
fild dword [esp + 0x68]
mov ebx, dword [esp + 0x5c]
mov dword [esp + 0x10], ebp
add edi, ebx
mov dword [esp + 0x4c], 0
fpatan
mov dword [esp + 0x14], esi
mov dword [esp + 0x1c], edx
mov dword [esp + 0x48], edi
fmul qword [0x4a4398]
call fcn.00492860
mov esi, dword [esp + 0x74]
mov ecx, esi
sub ecx, eax
mov dword [esp + 0x68], ecx
fild dword [esp + 0x68]
fild dword [esp + 0x6c]
fstp qword [esp + 0x28]
fild dword [esp + 0x14]
fsub qword [esp + 0x28]
fabs
fild dword [esp + 0x70]
fstp qword [esp + 0x14]
fild dword [esp + 0x1c]
fsub qword [esp + 0x14]
fabs
fld st(1)
fmul st(2)
fld st(1)
fmul st(2)
faddp st(1)
fsqrt
fstp qword [esp + 0x1c]
fstp st(0)
fstp st(0)
call fcn.00492860
mov ebx, eax
push ebx
call fcn.00433b60
fmul qword [esp + 0x20]
add esp, 4
fsubr qword [esp + 0x28]
push ebx
fstp qword [esp + 0x2c]
call fcn.00433b20
fmul qword [esp + 0x20]
add esp, 4
fadd qword [esp + 0x14]
push esi
fstp qword [esp + 0x20]
call fcn.00433b60
fstp qword [esp + 0x18]
add esp, 4
push esi
call fcn.00433b20
add esp, 4
add esi, 0x10e
fchs
fstp qword [esp + 0x30]
push esi
call fcn.00433b60
fstp qword [esp + 0x3c]
add esp, 4
push esi
call fcn.00433b20
mov eax, dword [esp + 0x5c]
add esp, 4
test eax, eax
fchs
jle 0x408f76
fld qword [esp + 0x28]
fld qword [esp + 0x1c]
fld qword [esp + 0x14]
mov dword [esp + 0x70], eax
mov eax, dword [esp + 0x54]
fld st(2)
test eax, eax
fld st(2)
jle 0x408f51
mov dword [esp + 0x6c], eax
mov al, byte [edi]
fxch st(1)
fadd st(2)
fxch st(1)
fadd qword [esp + 0x30]
test al, al
je 0x408f06
fld st(1)
fsub qword [0x4a43a0]
call fcn.00492860
fld st(0)
fsub qword [0x4a43a0]
mov ebx, eax
call fcn.00492860
fld st(0)
mov esi, eax
call fcn.00492860
mov edx, dword [esp + 0x78]
cmp ebx, dword [edx]
jl 0x408f06
cmp ebx, dword [edx + 8]
jg 0x408f06
cmp esi, dword [edx + 4]
jl 0x408f06
cmp esi, dword [edx + 0xc]
jg 0x408f06
mov ecx, esi
imul ecx, dword [esp + 0x50]
add ecx, ebx
mov ebx, dword [esp + 0x44]
cmp esi, eax
lea ecx, [ebx + ecx*2]
mov bx, word [ebp]
mov word [ecx], bx
je 0x408f06
cmp eax, dword [edx + 4]
jl 0x408f06
mov edx, dword [esp + 0x50]
lea eax, [edx + edx]
mov dx, word [ebp]
sub ecx, eax
mov word [ecx], dx
mov eax, dword [esp + 0x4c]
mov ecx, dword [esp + 0x54]
inc eax
cmp eax, ecx
mov dword [esp + 0x4c], eax
jl 0x408f3e
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x24]
mov edi, dword [esp + 0x48]
mov dword [esp + 0x4c], 0
lea ebp, [eax + ecx*2]
mov eax, dword [esp + 0x60]
add edi, eax
mov dword [esp + 0x10], ebp
mov dword [esp + 0x48], edi
jmp 0x408f42
add ebp, 2
inc edi
mov eax, dword [esp + 0x6c]
dec eax
mov dword [esp + 0x6c], eax
jne 0x408e8a
fstp st(0)
mov eax, dword [esp + 0x70]
fstp st(0)
fld qword [esp + 0x38]
fld st(4)
fxch st(1)
faddp st(4)
dec eax
mov dword [esp + 0x70], eax
faddp st(2)
jne 0x408e76
fstp st(0)
fstp st(0)
fstp st(0)
pop edi
pop esi
pop ebp
pop ebx
fstp st(0)
add esp, 0x30
ret