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

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0xa0
mov edx, dword [ecx + 0x14]
mov esi, dword [ecx + 0x18]
lea eax, [esi + esi]
cmp edx, eax
jle 0x1005036d
mov edi, dword [ecx + 0x10]
cmp edi, eax
jle 0x1005036d
test esi, esi
jle 0x1005036d
mov dword [esp + 0x14], edi
mov edi, dword [ecx + 4]
mov dword [esp + 0x18], edx
mov edx, edi
shr edx, 0x10
mov eax, 0xff
and edx, eax
cvtsi2sd xmm6, edx
mov edx, dword [ecx]
movsd xmm4, qword [0x1006b4f8]
divsd xmm6, xmm4
mov dword [esp + 0x10], esi
mov esi, edi
shr esi, 8
and esi, eax
cvtsi2sd xmm3, esi
divsd xmm3, xmm4
and edi, eax
cvtsi2sd xmm2, edi
divsd xmm2, xmm4
mov esi, edx
and esi, eax
cvtsi2sd xmm5, esi
divsd xmm5, xmm4
mov esi, edx
shr esi, 8
and esi, eax
cvtsi2sd xmm0, esi
mov edi, dword [esp + 0x10]
shr edx, 0x10
and edx, eax
cvtsi2sd xmm1, edx
divsd xmm0, xmm4
divsd xmm1, xmm4
movsd qword [esp + 0x88], xmm6
subsd xmm1, xmm6
movsd qword [esp + 0x78], xmm1
movapd xmm6, xmm3
subsd xmm0, xmm3
movsd qword [esp + 0x80], xmm0
movapd xmm7, xmm2
subsd xmm5, xmm2
mov dword [esp + 0xc], 0
xor eax, eax
dec eax
mov dword [esp + 0x2c], eax
mov dword [esp + 0x34], ecx
movsd qword [esp + 0x70], xmm3
movsd qword [esp + 0x68], xmm2
movsd qword [esp + 0x60], xmm5
mov ebx, dword [ecx + 0xc]
mov edx, dword [esp + 0xc]
mov eax, edx
mov dword [esp + 0xc], edx
not eax
add eax, edi
add eax, ebx
mov esi, dword [esp + 0x18]
sub esi, edi
add esi, edx
mov edx, ebx
mov dword [esp + 0x1c], ebx
add esi, ebx
mov edx, dword [0x1007b5a8]
mov ebx, dword [0x1007b5ac]
imul eax, ebx
mov dword [esp + 0x20], edx
lea eax, [edx + eax*4]
mov ecx, dword [ecx + 8]
mov dword [esp + 0x24], ecx
lea eax, [eax + ecx*4]
lea ecx, [edi*4]
mov dword [esp + 0x50], eax
mov edx, dword [esp + 0x14]
lea eax, [eax + edx*4]
mov dword [esp + 0x4c], ecx
sub eax, ecx
mov dword [esp + 0x54], eax
mov dword [esp + 0x30], ebx
imul esi, ebx
mov dword [esp + 0x58], esi
xorps xmm0, xmm0
cvtsi2sd xmm0, dword [esp + 0xc]
addsd xmm0, qword [0x1006af28]
movsd qword [esp + 0x40], xmm0
mov dword [esp + 0x10], edi
test edi, edi
jle 0x1005026f
movsd xmm0, qword [esp + 0x40]
mulsd xmm0, xmm0
movsd qword [esp + 0x40], xmm0
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x1c]
add eax, ecx
add eax, dword [esp + 0xc]
mov edi, dword [esp + 0x10]
sub eax, edi
mov esi, dword [esp + 0x30]
imul eax, esi
mov edx, dword [esp + 0x14]
lea ecx, [edx + eax]
sub ecx, edi
mov ebx, dword [esp + 0x20]
lea ecx, [ebx + ecx*4]
mov dword [esp + 0x28], ecx
mov ecx, dword [esp + 0x1c]
add ecx, edi
add ecx, dword [esp + 0x2c]
imul ecx, esi
add edx, ecx
sub edx, edi
lea edx, [ebx + edx*4]
mov dword [esp + 0x3c], edx
add eax, edi
lea eax, [ebx + eax*4]
add eax, 0xfffffffc
mov dword [esp + 0x38], eax
add ecx, edi
lea esi, [ebx + ecx*4]
add esi, 0xfffffffc
xor edx, edx
mov eax, edi
xorps xmm0, xmm0
cvtsi2sd xmm0, edx
addsd xmm0, qword [0x1006af28]
mulsd xmm0, xmm0
addsd xmm0, qword [esp + 0x40]
ucomisd xmm0, qword [0x1006af08]
mov dword [esp + 0x5c], edx
jb 0x100500f2
xorps xmm1, xmm1
sqrtsd xmm1, xmm0
jmp 0x1005012a
movsd qword [esp], xmm0
mov edi, eax
call sub.api_ms_win_crt_math_l1_1_0.dll_sqrt
mov eax, edi
movsd xmm5, qword [esp + 0x60]
movsd xmm7, qword [esp + 0x68]
movsd xmm6, qword [esp + 0x70]
movsd xmm4, qword [0x1006b4f8]
fstp qword [esp + 0x90]
movsd xmm1, qword [esp + 0x90]
xorps xmm0, xmm0
cvtsi2sd xmm0, eax
subsd xmm1, xmm0
mulsd xmm1, qword [0x1006af28]
addsd xmm1, xmm1
movsd xmm0, qword [0x1006b500]
ucomisd xmm0, xmm1
movsd xmm0, qword [0x1006af30]
jae 0x10050189
xorpd xmm0, xmm0
ucomisd xmm1, qword [0x1006b508]
jae 0x10050189
movapd xmm0, xmm1
mulsd xmm0, qword [0x1006b510]
mulsd xmm0, xmm1
addsd xmm0, qword [0x1006b518]
mulsd xmm0, xmm1
addsd xmm0, qword [0x1006af28]
movsd xmm1, qword [esp + 0x78]
mulsd xmm1, xmm0
addsd xmm1, qword [esp + 0x88]
mulsd xmm1, xmm4
movapd xmm2, xmm1
movsd xmm3, qword [0x1006af00]
subsd xmm2, xmm3
cvttsd2si ecx, xmm2
movsd xmm2, qword [esp + 0x80]
mulsd xmm2, xmm0
addsd xmm2, xmm6
mov ebx, 0x80000000
xor ecx, ebx
cvttsd2si eax, xmm1
ucomisd xmm1, xmm3
mulsd xmm2, xmm4
movapd xmm1, xmm2
subsd xmm1, xmm3
cvttsd2si edx, xmm1
mulsd xmm0, xmm5
addsd xmm0, xmm7
cmovae eax, ecx
shl eax, 0x10
xor edx, ebx
cvttsd2si ecx, xmm2
ucomisd xmm2, xmm3
mulsd xmm0, xmm4
movapd xmm1, xmm0
subsd xmm1, xmm3
cvttsd2si edi, xmm1
cmovae ecx, edx
shl ecx, 8
xor edi, ebx
cvttsd2si edx, xmm0
ucomisd xmm0, xmm3
cmovae edx, edi
or edx, ecx
or edx, eax
mov eax, dword [esp + 0x24]
mov edi, esi
mov dword [esi + eax*4], edx
mov ebx, dword [esp + 0x3c]
mov dword [ebx + eax*4], edx
mov esi, dword [esp + 0x38]
mov dword [esi + eax*4], edx
mov ecx, dword [esp + 0x28]
mov dword [ecx + eax*4], edx
mov edx, dword [esp + 0x5c]
inc edx
mov eax, dword [esp + 0x34]
mov eax, dword [eax + 0x18]
add ecx, 4
mov dword [esp + 0x28], ecx
add ebx, 4
mov dword [esp + 0x3c], ebx
add esi, 0xfffffffc
mov dword [esp + 0x38], esi
add edi, 0xfffffffc
mov esi, edi
cmp edx, eax
jl 0x100500c2
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x58]
lea eax, [eax + ecx*4]
mov ecx, dword [esp + 0x24]
lea ecx, [eax + ecx*4]
mov eax, dword [esp + 0x14]
lea eax, [ecx + eax*4]
sub eax, dword [esp + 0x4c]
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x10]
mov edx, dword [esp + 0x50]
lea edx, [edx + eax*4]
add edx, 0xfffffffc
add edx, 4
cmp edx, dword [esp + 0x54]
mov eax, dword [esp + 0x34]
je 0x100502ef
mov edx, dword [esp + 0x14]
lea edx, [edx*4]
mov edi, dword [esp + 0x10]
lea esi, [edi*8]
sub edx, esi
mov esi, dword [esp + 0x24]
add esi, edi
mov ebx, dword [esp + 0x1c]
add edi, ebx
add edi, dword [esp + 0x2c]
imul edi, dword [esp + 0x30]
add edi, esi
mov esi, dword [esp + 0x20]
lea esi, [esi + edi*4]
xor edi, edi
mov ebx, dword [eax]
mov dword [esi + edi], ebx
add edi, 4
cmp edx, edi
jne 0x100502e3
mov edx, dword [esp + 0x10]
lea ecx, [ecx + edx*4]
add ecx, 0xfffffffc
add ecx, 4
cmp ecx, dword [esp + 0x28]
mov ecx, eax
mov edi, dword [esp + 0x14]
je 0x10050346
shl edi, 2
lea eax, [edx*8]
sub edi, eax
mov eax, dword [esp + 0x18]
add eax, dword [esp + 0x1c]
mov esi, dword [esp + 0x24]
add esi, edx
add eax, dword [esp + 0xc]
sub eax, edx
mov edx, dword [esp + 0x30]
imul edx, eax
add edx, esi
mov eax, dword [esp + 0x20]
lea eax, [eax + edx*4]
xor esi, esi
mov edx, dword [ecx]
mov dword [eax + esi], edx
add esi, 4
cmp edi, esi
jne 0x1005033a
mov eax, dword [esp + 0xc]
inc eax
mov edi, dword [ecx + 0x18]
mov dword [esp + 0xc], eax
cmp eax, edi
jge 0x1005036d
mov eax, dword [ecx + 0x10]
mov dword [esp + 0x14], eax
mov eax, dword [ecx + 0x14]
mov dword [esp + 0x18], eax
dec dword [esp + 0x2c]
jmp 0x1004ffc6
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret