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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xd4
mov eax, dword [0xe3c018]
xor eax, esp
mov dword [esp + 0xd0], eax
push ebx
mov ebx, dword [ebp + 0xc]
push esi
mov esi, dword [ebp + 8]
push edi
mov edi, ecx
mov dword [esp + 0x10], edx
mov ecx, dword [ebp + 0x14]
dec ecx
cmp byte [esi + 0x10], 0
mov dword [esp + 0x2c], ecx
je 0x521070
cmp byte [ebp + 0x18], 0
movss xmm3, dword [esi]
movss xmm2, dword [esi + 4]
movss xmm4, dword [esi + 8]
movd xmm0, ecx
cvtdq2pd xmm0, xmm0
cvtps2pd xmm5, xmm2
movsd qword [esp + 0x20], xmm0
movss xmm0, dword [esi + 0xc]
cvtps2pd xmm1, xmm3
subss xmm2, xmm0
movsd qword [esp + 0x50], xmm5
subss xmm3, xmm4
movsd qword [esp + 0x40], xmm1
mulss xmm2, xmm2
mulss xmm3, xmm3
addss xmm2, xmm3
cvtps2pd xmm0, xmm2
je 0x520fc4
xorps xmm1, xmm1
movsd qword [esp + 0x48], xmm0
ucomisd xmm1, xmm0
ja 0x520e54
sqrtsd xmm0, xmm0
jmp 0x520e59
call fcn.00dc56b0
movsd xmm1, qword [esp + 0x20]
divsd xmm1, xmm0
mov ecx, dword [edi + 0x10]
mov eax, dword [edi + 8]
shl ecx, 4
add ecx, eax
mov dword [esp + 0x1c], eax
mov dword [esp + 0x3c], ecx
movsd qword [esp + 0x20], xmm1
cmp eax, ecx
je 0x521096
mov ecx, dword [eax + 4]
mov edx, dword [eax]
mov ebx, dword [eax + 8]
mov eax, dword [eax + 0xc]
add eax, ecx
mov dword [esp + 0x18], edx
mov dword [esp + 0x38], ebx
mov dword [esp + 0x14], ecx
mov dword [esp + 0x34], eax
cmp ecx, eax
jge 0x520f9a
nop dword [eax]
movsd xmm2, qword [esp + 0x40]
mov edi, edx
mov edx, dword [esp + 0x10]
movsd xmm3, qword [esp + 0x48]
movd xmm1, ecx
cvtdq2pd xmm1, xmm1
mov eax, dword [edx + 0x10]
mov esi, eax
mov dword [esp + 0x30], eax
mov eax, dword [edx + 0xc]
imul esi, dword [esp + 0x18]
subsd xmm1, qword [esp + 0x50]
imul eax, ecx
mulsd xmm1, xmm1
add esi, eax
add esi, dword [edx]
movsd qword [esp + 0x60], xmm1
mov eax, edi
inc edi
movd xmm0, eax
cvtdq2pd xmm0, xmm0
subsd xmm0, xmm2
mulsd xmm0, xmm0
addsd xmm0, xmm1
comisd xmm0, xmm3
jb 0x520f15
mov edx, dword [esp + 0x2c]
jmp 0x520f53
xorps xmm1, xmm1
ucomisd xmm1, xmm0
ja 0x520f24
sqrtsd xmm0, xmm0
jmp 0x520f29
call fcn.00dc56b0
mulsd xmm0, qword [esp + 0x20]
movsd xmm1, qword [esp + 0x60]
movsd xmm2, qword [esp + 0x40]
movsd xmm3, qword [esp + 0x48]
addsd xmm0, qword [0xe16a58]
movsd qword [esp + 0x58], xmm0
mov edx, dword [esp + 0x58]
mov eax, dword [ebp + 0x10]
mov ecx, 0x100
dec ebx
mov edx, dword [eax + edx*4]
shr edx, 0x18
mov eax, edx
sub ecx, eax
movzx eax, byte [esi]
imul ecx, eax
sar ecx, 8
add cl, dl
mov byte [esi], cl
add esi, dword [esp + 0x30]
test ebx, ebx
jg 0x520ef2
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x18]
inc ecx
mov ebx, dword [esp + 0x38]
mov dword [esp + 0x14], ecx
cmp ecx, dword [esp + 0x34]
jl 0x520eb0
mov eax, dword [esp + 0x1c]
add eax, 0x10
mov dword [esp + 0x1c], eax
cmp eax, dword [esp + 0x3c]
jne 0x520e84
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0xd0]
xor ecx, esp
call fcn.00d491ba
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp + 0x10]
movsd qword [esp + 0x70], xmm1
xorps xmm1, xmm1
ucomisd xmm1, xmm0
mov dword [esp + 0x68], eax
mov dword [esp + 0x6c], ecx
movsd qword [esp + 0x78], xmm5
movsd qword [esp + 0x80], xmm0
ja 0x520ff3
sqrtsd xmm0, xmm0
jmp 0x520ff8
call fcn.00dc56b0
movsd xmm1, qword [esp + 0x20]
lea eax, [esp + 0xb8]
divsd xmm1, xmm0
push eax
mov ecx, ebx
movsd qword [esp + 0x8c], xmm1
call fcn.004cff10
movss xmm0, dword [esp + 0xc4]
mov ecx, edi
mov eax, dword [esp + 0x10]
cvtps2pd xmm0, xmm0
mov dword [esp + 0xd0], eax
lea eax, [esp + 0x68]
push eax
movsd qword [esp + 0x9c], xmm0
movss xmm0, dword [esp + 0xbc]
cvtps2pd xmm0, xmm0
movsd qword [esp + 0xa4], xmm0
call fcn.0052ec90
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0xd0]
xor ecx, esp
call fcn.00d491ba
mov esp, ebp
pop ebp
ret
push ecx
push dword [ebp + 0x10]
lea ecx, [esp + 0x70]
push ebx
push esi
call fcn.004cd8c0
mov eax, dword [esp + 0x10]
mov ecx, edi
mov dword [esp + 0x98], eax
lea eax, [esp + 0x68]
push eax
call fcn.0052ee30
mov ecx, dword [esp + 0xdc]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00d491ba
mov esp, ebp
pop ebp
ret