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

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0x98
mov eax, dword [ecx + 0x18]
mov esi, dword [ecx + 0x14]
lea edx, [eax + eax]
mov dword [esp + 8], eax
cmp esi, edx
jle 0x1003cbd7
mov eax, dword [ecx + 0x10]
cmp eax, edx
jle 0x1003cbd7
cmp dword [esp + 8], 0
jle 0x1003cbd7
mov dword [esp + 0x24], ecx
mov ebx, dword [ecx]
mov dword [esp + 0x18], esi
mov edx, 0xff
movsd xmm4, qword [0x1006c2c0]
mov dword [esp + 0x14], eax
mov dword [esp + 0xc], 0
mov ecx, dword [esp + 0x24]
mov esi, dword [ecx + 4]
mov edi, esi
mov ecx, esi
and esi, edx
cvtsi2sd xmm2, esi
mov esi, ebx
shr edi, 0x10
shr ecx, 8
and esi, edx
and edi, edx
and ecx, edx
divsd xmm2, xmm4
cvtsi2sd xmm5, esi
mov esi, ebx
shr ebx, 0x10
cvtsi2sd xmm6, edi
cvtsi2sd xmm3, ecx
shr esi, 8
and ebx, edx
divsd xmm5, xmm4
divsd xmm6, xmm4
divsd xmm3, xmm4
and esi, edx
cvtsi2sd xmm1, ebx
mov ebx, dword [esp + 0x18]
xor eax, eax
cvtsi2sd xmm0, esi
divsd xmm1, xmm4
mov esi, dword [esp + 0x24]
dec eax
divsd xmm0, xmm4
mov dword [esp + 0x28], eax
movapd xmm7, xmm2
movsd qword [esp + 0x58], xmm2
subsd xmm5, xmm2
movsd qword [esp + 0x80], xmm6
movsd qword [esp + 0x60], xmm3
movsd qword [esp + 0x50], xmm5
subsd xmm1, xmm6
movapd xmm6, xmm3
subsd xmm0, xmm3
movsd qword [esp + 0x70], xmm1
movsd qword [esp + 0x78], xmm0
mov eax, dword [esp + 0xc]
mov edx, dword [esp + 8]
mov ecx, dword [esi + 0xc]
mov dword [esp + 0x18], ebx
mov edi, eax
sub ebx, edx
mov dword [esp + 0x1c], ecx
mov dword [esp + 0xc], eax
not edi
add ebx, eax
mov eax, dword [0x1007b5a0]
xorps xmm0, xmm0
cvtsi2sd xmm0, dword [esp + 0xc]
add edi, edx
add ebx, ecx
add edi, ecx
mov ecx, dword [0x1007b5a4]
mov dword [esp + 0x10], eax
addsd xmm0, qword [0x1006bd10]
imul edi, ecx
mov dword [esp + 0x20], ecx
mov ecx, dword [esi + 8]
lea edi, [eax + edi*4]
mov eax, dword [esp + 0x14]
movsd qword [esp + 0x30], xmm0
lea edi, [edi + ecx*4]
mov dword [esp + 0x4c], ecx
lea esi, [edi + edx*4 - 4]
mov dword [esp + 0x48], esi
lea esi, [edi + eax*4]
lea edi, [edx*4]
sub esi, edi
mov dword [esp + 0x40], edi
mov edi, dword [esp + 0x20]
mov dword [esp + 0x44], esi
imul ebx, edi
mov esi, edi
mov edi, dword [esp + 0x10]
test edx, edx
lea edi, [edi + ebx*4]
lea ecx, [edi + ecx*4]
lea eax, [ecx + eax*4]
mov dword [esp + 0x3c], ecx
mov dword [esp + 0x2c], eax
jle 0x1003cb40
mov edx, dword [esp + 0x18]
mov ebx, dword [esp + 8]
mov eax, dword [esp + 0x10]
movsd xmm0, qword [esp + 0x30]
add edx, dword [esp + 0x1c]
mulsd xmm0, xmm0
movsd qword [esp + 0x30], xmm0
add edx, dword [esp + 0xc]
sub edx, ebx
imul edx, esi
mov esi, dword [esp + 0x14]
lea edi, [esi + edx]
add edx, ebx
sub edi, ebx
lea ecx, [eax + edi*4]
mov edi, dword [esp + 0x1c]
mov eax, dword [esp + 0x10]
add edi, ebx
add edi, dword [esp + 0x28]
imul edi, dword [esp + 0x20]
add esi, edi
add edi, ebx
sub esi, ebx
lea eax, [eax + esi*4]
mov esi, dword [esp + 0x10]
mov dword [esp + 0x20], eax
lea eax, [esi + edx*4 - 4]
lea edi, [esi + edi*4 - 4]
xor edx, edx
mov dword [esp + 0x1c], eax
mov eax, ebx
xorps xmm0, xmm0
cvtsi2sd xmm0, edx
xorps xmm2, xmm2
cvtsi2sd xmm2, eax
addsd xmm0, qword [0x1006bd10]
mulsd xmm0, xmm0
addsd xmm0, qword [esp + 0x30]
ucomisd xmm0, qword [0x1006bd00]
mov dword [esp + 0x10], ecx
mov dword [esp + 0x18], edx
jb 0x1003c9c9
xorps xmm1, xmm1
sqrtsd xmm1, xmm0
jmp 0x1003ca09
movsd qword [esp], xmm0
movsd qword [esp + 0x68], xmm2
call sub.api_ms_win_crt_math_l1_1_0.dll_sqrt
movsd xmm2, qword [esp + 0x68]
movsd xmm5, qword [esp + 0x50]
movsd xmm7, qword [esp + 0x58]
movsd xmm6, qword [esp + 0x60]
fstp qword [esp + 0x88]
movsd xmm4, qword [0x1006c2c0]
movsd xmm1, qword [esp + 0x88]
subsd xmm1, xmm2
movsd xmm0, qword [0x1006c2c8]
mulsd xmm1, qword [0x1006bd10]
addsd xmm1, xmm1
ucomisd xmm0, xmm1
movsd xmm0, qword [0x1006bd18]
jae 0x1003ca61
ucomisd xmm1, qword [0x1006c2d0]
xorpd xmm0, xmm0
jae 0x1003ca61
movapd xmm0, xmm1
mulsd xmm0, qword [0x1006c2d8]
mulsd xmm0, xmm1
addsd xmm0, qword [0x1006c2e0]
mulsd xmm0, xmm1
addsd xmm0, qword [0x1006bd10]
movsd xmm1, qword [esp + 0x70]
movsd xmm3, qword [0x1006bcf8]
mov esi, 0x80000000
mulsd xmm1, xmm0
addsd xmm1, qword [esp + 0x80]
mulsd xmm1, xmm4
movapd xmm2, xmm1
cvttsd2si ecx, xmm1
subsd xmm2, xmm3
cvttsd2si eax, xmm2
movsd xmm2, qword [esp + 0x78]
xor eax, esi
ucomisd xmm1, xmm3
cmovae ecx, eax
shl ecx, 0x10
mulsd xmm2, xmm0
mulsd xmm0, xmm5
addsd xmm2, xmm6
addsd xmm0, xmm7
mulsd xmm2, xmm4
mulsd xmm0, xmm4
movapd xmm1, xmm2
cvttsd2si eax, xmm2
subsd xmm1, xmm3
cvttsd2si edx, xmm1
movapd xmm1, xmm0
xor edx, esi
ucomisd xmm2, xmm3
subsd xmm1, xmm3
cmovae eax, edx
cvttsd2si ebx, xmm1
cvttsd2si edx, xmm0
xor ebx, esi
shl eax, 8
ucomisd xmm0, xmm3
mov esi, edi
cmovae edx, ebx
mov ebx, dword [esp + 0x20]
add esi, 0xfffffffc
or edx, ecx
mov ecx, dword [esp + 0x10]
or edx, eax
mov eax, dword [esp + 0x4c]
mov dword [edi + eax*4], edx
mov edi, dword [esp + 0x1c]
mov dword [ebx + eax*4], edx
add ebx, 4
mov dword [esp + 0x20], ebx
mov dword [edi + eax*4], edx
mov dword [ecx + eax*4], edx
mov eax, dword [esp + 0x24]
mov edx, dword [esp + 0x18]
add edi, 0xfffffffc
add ecx, 4
mov dword [esp + 0x1c], edi
mov edi, esi
mov eax, dword [eax + 0x18]
inc edx
cmp edx, eax
jl 0x1003c98e
mov edi, dword [esp + 0x48]
mov edx, dword [esp + 0x40]
mov eax, dword [esp + 8]
mov ecx, dword [esp + 0x3c]
mov esi, dword [esp + 0x24]
add edi, 4
sub dword [esp + 0x2c], edx
lea eax, [ecx + eax*4 - 4]
cmp edi, dword [esp + 0x44]
je 0x1003cb89
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 8]
lea ecx, [ecx*4]
lea edx, [edx*8]
sub ecx, edx
mov edx, dword [esi]
mov dword [edi], edx
add edi, 4
add ecx, 0xfffffffc
jne 0x1003cb7d
add eax, 4
mov edx, dword [esp + 0x14]
cmp eax, dword [esp + 0x2c]
je 0x1003cbae
mov ecx, dword [esp + 8]
shl edx, 2
shl ecx, 3
sub edx, ecx
mov ecx, dword [esi]
mov dword [eax], ecx
add eax, 4
add edx, 0xfffffffc
jne 0x1003cba2
mov edx, dword [esp + 0xc]
mov ecx, dword [esi + 0x18]
inc edx
mov eax, ecx
mov dword [esp + 8], ecx
cmp edx, ecx
mov dword [esp + 0xc], edx
jge 0x1003cbd7
mov eax, dword [esi + 0x10]
mov ebx, dword [esi + 0x14]
dec dword [esp + 0x28]
mov dword [esp + 0x14], eax
jmp 0x1003c87e
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret