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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x104
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp + 0x18]
push ebx
push esi
lea eax, [eax + eax*2 + 3]
push edi
cdq
and edx, 3
mov edi, dword [ebp + 0x14]
add eax, edx
xor edx, edx
mov dword [ecx], edx
mov dword [ecx + 4], edx
mov ecx, dword [ebp + 0x1c]
mov dword [esp + 0x28], edx
sar eax, 2
mov dword [ecx], edx
mov dword [ecx + 4], edx
mov ecx, dword [edi + 0xc]
mov dword [esp + 0x2c], edx
mov dword [esp + 0x10], edx
mov edx, dword [edi + 4]
shl eax, 2
cmp edx, ecx
mov dword [esp + 0x14], eax
mov dword [esp + 0x1c], edx
jge 0x40cf6f
mov ecx, eax
neg ecx
mov dword [esp + 0x34], ecx
mov ecx, dword [ebp + 0x10]
sub ecx, edx
dec ecx
imul ecx, eax
mov dword [esp + 0x18], ecx
mov ebx, dword [edi]
mov esi, ebx
lea edx, [ecx + ebx*2]
add esi, edx
mov edx, dword [ebp + 8]
add esi, edx
mov edx, dword [edi + 8]
cmp ebx, edx
jge 0x40ce36
xor eax, eax
xor ecx, ecx
mov al, byte [esi + 2]
xor edx, edx
mov dword [esp + 0x20], eax
mov eax, dword [0x416710]
fild dword [esp + 0x20]
push eax
fstp qword [esp + 0x6c]
mov cl, byte [esi + 1]
mov dword [esp + 0x24], ecx
lea ecx, [esp + 0x3c]
fild dword [esp + 0x24]
push ecx
fstp qword [esp + 0x78]
mov dl, byte [esi]
mov dword [esp + 0x28], edx
fild dword [esp + 0x28]
fstp qword [esp + 0x80]
call fcn.00411990
fld qword [esp + 0xd0]
fadd qword [esp + 0x30]
mov ecx, dword [esp + 0x18]
mov eax, dword [edi + 8]
add esp, 8
add esi, 3
inc ebx
inc ecx
fstp qword [esp + 0x28]
cmp ebx, eax
mov dword [esp + 0x10], ecx
jl 0x40cdc3
mov ecx, dword [esp + 0x18]
mov eax, dword [esp + 0x14]
mov ebx, dword [esp + 0x34]
mov esi, dword [esp + 0x1c]
mov edx, dword [ebp + 0x10]
add ecx, ebx
mov ebx, dword [edi + 0xc]
inc esi
cmp esi, ebx
mov dword [esp + 0x1c], esi
mov dword [esp + 0x18], ecx
jl 0x40cdae
mov ecx, dword [esp + 0x10]
test ecx, ecx
je 0x40cf6f
fild dword [esp + 0x10]
mov ecx, dword [edi + 4]
mov esi, ebx
cmp ecx, esi
mov dword [esp + 0x20], 0
fdivr qword [esp + 0x28]
mov dword [esp + 0x24], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0x1c], ecx
fstp qword [esp + 0x28]
jge 0x40cf50
sub edx, ecx
dec edx
imul edx, eax
mov eax, edx
mov dword [esp + 0x18], eax
mov ebx, dword [edi]
mov esi, ebx
lea edx, [eax + ebx*2]
add esi, edx
mov edx, dword [ebp + 8]
add esi, edx
mov edx, dword [edi + 8]
cmp ebx, edx
jge 0x40cf36
xor eax, eax
xor ecx, ecx
mov al, byte [esi + 2]
xor edx, edx
mov dword [esp + 0x14], eax
mov eax, dword [0x416710]
fild dword [esp + 0x14]
push eax
fstp qword [esp + 0x6c]
mov cl, byte [esi + 1]
mov dword [esp + 0x18], ecx
lea ecx, [esp + 0x3c]
fild dword [esp + 0x18]
push ecx
fstp qword [esp + 0x78]
mov dl, byte [esi]
mov dword [esp + 0x1c], edx
fild dword [esp + 0x1c]
fstp qword [esp + 0x80]
call fcn.00411990
fld qword [esp + 0x30]
fsub qword [esp + 0xd0]
mov ecx, dword [esp + 0x18]
mov eax, dword [edi + 8]
add esp, 8
add esi, 3
fld st(0)
fmul st(1)
inc ebx
inc ecx
cmp ebx, eax
mov dword [esp + 0x10], ecx
fadd qword [esp + 0x20]
fstp qword [esp + 0x20]
fstp st(0)
jl 0x40ceb9
mov ecx, dword [esp + 0x1c]
mov eax, dword [esp + 0x18]
mov esi, dword [esp + 0x34]
mov edx, dword [edi + 0xc]
inc ecx
add eax, esi
cmp ecx, edx
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x18], eax
jl 0x40cea4
fild dword [esp + 0x10]
mov eax, dword [ebp + 0x18]
mov edx, dword [esp + 0x28]
mov ecx, dword [esp + 0x2c]
fdivr qword [esp + 0x20]
mov dword [eax], edx
mov edx, dword [ebp + 0x1c]
mov dword [eax + 4], ecx
fsqrt
fstp qword [edx]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret