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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff0
sub esp, 0x504
mov eax, dword [0x62aabc]
xor eax, esp
mov dword [esp + 0x500], eax
movd xmm0, dword [ebp + 0x18]
xor ecx, ecx
mov eax, dword [ebp + 0x14]
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
cvtdq2pd xmm0, xmm0
push ebx
mov dword [esp + 0x34], edi
mov eax, dword [edi + eax*4 + 0x4f0]
mov dword [esp + 0x3c], eax
mov eax, 1
cpuid
mov esi, ebx
mov dword [esp + 0x60], 0
mulsd xmm0, qword [0x5fa430]
pop ebx
movsd qword [esp + 0x80], xmm0
nop
lea edi, [esp + 0x50]
mov dword [esp + 0x3c], 0
mov dword [edi], eax
mov eax, edi
mov edi, dword [esp + 0x30]
mov dword [eax + 4], esi
mov dword [eax + 8], ecx
mov dword [eax + 0xc], edx
mov eax, dword [esp + 0x5c]
and eax, 0x4000000
cmp dword [edi + 0x418], 0
mov dword [esp + 0x68], eax
jle 0x51182f
lea ecx, [edi + 0x420]
mov dword [esp + 0x34], ecx
mov eax, dword [edi + 0x414]
mov dword [esp + 0x40], eax
cmp dword [edi + eax*4 + 0x214], 0x10
je 0x5113a3
inc eax
mov dword [edi + 0x414], eax
jmp 0x511813
mov eax, dword [esp + 0x38]
xorps xmm4, xmm4
mov edx, dword [ecx - 4]
mov edi, dword [ecx]
mov esi, dword [ebp + 0xc]
mov dword [esp + 0x18], edx
test eax, eax
jle 0x51145c
mov dword [esp + 0x1c], eax
mov ecx, edx
cmp edx, edi
jge 0x511447
mov eax, edi
sub eax, edx
cmp eax, 4
jl 0x511435
mov ecx, dword [esp + 0x18]
mov eax, edi
sub eax, ecx
add edx, 2
sub eax, 4
shr eax, 2
inc eax
lea edx, [esi + edx*8]
lea ecx, [ecx + eax*4]
nop dword [eax]
movsd xmm3, qword [edx - 0x10]
movsd xmm0, qword [edx - 8]
movsd xmm1, qword [edx]
movsd xmm2, qword [edx + 8]
add edx, 0x20
mulsd xmm3, xmm3
mulsd xmm0, xmm0
mulsd xmm1, xmm1
mulsd xmm2, xmm2
addsd xmm4, xmm3
addsd xmm4, xmm0
addsd xmm4, xmm1
addsd xmm4, xmm2
sub eax, 1
jne 0x5113f0
movsd qword [esp + 0x20], xmm4
cmp ecx, edi
jge 0x511447
movsd xmm0, qword [esi + ecx*8]
inc ecx
mulsd xmm0, xmm0
addsd xmm4, xmm0
cmp ecx, edi
jl 0x511435
mov edx, dword [esp + 0x18]
add esi, 0x400
sub dword [esp + 0x1c], 1
jne 0x5113c2
mov esi, dword [esp + 0x38]
sub edi, edx
xorps xmm1, xmm1
mov dword [esp + 0x4c], edi
movd xmm0, esi
cvtdq2pd xmm0, xmm0
divsd xmm4, xmm0
movd xmm0, edi
cvtdq2pd xmm0, xmm0
movaps xmm2, xmm4
movsd qword [esp + 0x20], xmm4
divsd xmm2, xmm0
movaps xmm0, xmm2
ucomisd xmm1, xmm0
ja 0x511499
sqrtsd xmm0, xmm0
jmp 0x51149e
call sub.api_ms_win_crt_math_l1_1_0.dll__libm_sse2_sqrt_precise
movaps xmm1, xmm0
movsd xmm0, qword [0x580388]
comisd xmm0, xmm1
ja 0x5117f6
mov eax, dword [esp + 0x3c]
mov ecx, dword [ebp + 0x10]
movsd xmm0, qword [ecx + eax*8]
ucomisd xmm0, qword [0x55c110]
lahf
test ah, 0x44
jnp 0x5117f6
movsd xmm2, qword [esp + 0x80]
comisd xmm2, xmm0
jbe 0x51152d
mov eax, dword [esp + 0x40]
mov edi, dword [esp + 0x30]
movsd xmm0, qword [esp + 0x20]
mov dword [edi + eax*4 + 0x214], 0xd
mov esi, dword [edi + 0x414]
call sub.api_ms_win_crt_math_l1_1_0.dll__libm_sse2_log10_precise
mulsd xmm0, qword [0x609870]
sub esp, 8
movsd qword [esp + 0x28], xmm0
fld qword [esp + 0x28]
fstp qword [esp]
call sub.api_ms_win_crt_math_l1_1_0.dll_lrint
add esp, 8
add dword [edi + esi*4 + 0x14], eax
jmp 0x511809
divsd xmm0, xmm1
call sub.api_ms_win_crt_math_l1_1_0.dll__libm_sse2_log10_precise
mulsd xmm0, qword [0x609878]
sub esp, 8
movsd qword [esp + 0x28], xmm0
fld qword [esp + 0x28]
fstp qword [esp]
call sub.api_ms_win_crt_math_l1_1_0.dll_lrint
mov ecx, 0x64
mov dword [esp + 0x74], eax
sub ecx, eax
add esp, 8
cmp ecx, 0xa
jge 0x51156b
xorps xmm1, xmm1
jmp 0x51158b
movd xmm1, eax
cvtdq2pd xmm1, xmm1
movsd xmm0, qword [0x5fa5b8]
divsd xmm1, qword [0x609878]
call sub.api_ms_win_crt_math_l1_1_0.dll__libm_sse2_pow_precise
movaps xmm1, xmm0
mov ecx, dword [esp + 0x18]
xorps xmm2, xmm2
mov eax, dword [ebp + 0xc]
movsd qword [esp + 0x20], xmm1
lea edx, [eax + ecx*8]
mov dword [esp + 0x2c], edx
lea eax, [esp + 0x88]
mov dword [esp + 0x18], eax
test esi, esi
jle 0x5117c8
mov ecx, esi
mov dword [esp + 0x1c], esi
nop dword [eax + eax]
cmp dword [esp + 0x68], 0
je 0x511705
xor ecx, ecx
test edi, edi
jle 0x511673
movaps xmm4, xmmword [0x609880]
lea eax, [edx + 0x10]
mov esi, dword [esp + 0x18]
xorps xmm0, xmm0
cvtsd2ss xmm0, xmm1
xorps xmm3, xmm3
shufps xmm0, xmm0, 0
movaps xmmword [esp + 0x50], xmm0
movaps xmm5, xmmword [esp + 0x50]
nop dword [eax + eax]
movsd xmm0, qword [eax - 0x10]
cvtpd2ps xmm0, xmm0
movss dword [esp + 0x70], xmm0
movsd xmm0, qword [eax - 8]
cvtpd2ps xmm0, xmm0
movss dword [esp + 0x74], xmm0
movsd xmm0, qword [eax]
cvtpd2ps xmm0, xmm0
movss dword [esp + 0x78], xmm0
movsd xmm0, qword [eax + 8]
add eax, 0x20
cvtpd2ps xmm0, xmm0
movss dword [esp + 0x7c], xmm0
movaps xmm0, xmm3
movaps xmm1, xmmword [esp + 0x70]
subps xmm0, xmm1
maxps xmm1, xmm0
mulps xmm1, xmm5
sqrtps xmm0, xmm1
mulps xmm0, xmm1
sqrtps xmm0, xmm0
addps xmm0, xmm4
movaps xmmword [esp + 0x70], xmm0
cvttps2dq xmm0, xmm0
movups xmmword [esi + ecx*4], xmm0
add ecx, 4
cmp ecx, edi
jl 0x511600
mov eax, dword [esp + 0x18]
add edx, 0x10
xor esi, esi
cmp edi, 4
jl 0x5116d8
lea ecx, [eax + 8]
lea eax, [edi - 4]
shr eax, 2
inc eax
mov dword [esp + 0x40], eax
lea esi, [eax*4]
comisd xmm2, xmmword [edx - 0x10]
jbe 0x5116a1
mov eax, dword [ecx - 8]
neg eax
mov dword [ecx - 8], eax
comisd xmm2, xmmword [edx - 8]
jbe 0x5116b0
mov eax, dword [ecx - 4]
neg eax
mov dword [ecx - 4], eax
comisd xmm2, xmmword [edx]
jbe 0x5116bc
mov eax, dword [ecx]
neg eax
mov dword [ecx], eax
comisd xmm2, xmmword [edx + 8]
jbe 0x5116cb
mov eax, dword [ecx + 4]
neg eax
mov dword [ecx + 4], eax
add edx, 0x20
add ecx, 0x10
sub dword [esp + 0x40], 1
jne 0x511692
cmp esi, edi
jge 0x5116fc
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 0x2c]
lea ecx, [eax + esi*4]
comisd xmm2, xmmword [edx + esi*8]
jbe 0x5116f4
mov eax, dword [ecx]
neg eax
mov dword [ecx], eax
inc esi
add ecx, 4
cmp esi, edi
jl 0x5116e7
mov edx, dword [esp + 0x2c]
jmp 0x511798
xor esi, esi
test edi, edi
jle 0x5117a0
mov edi, eax
nop dword [eax]
nop word [eax + eax]
movsd xmm0, qword [edx + esi*8]
andps xmm0, xmmword [0x619f10]
mulsd xmm0, xmm1
xorps xmm1, xmm1
ucomisd xmm1, xmm0
movsd qword [esp + 0x40], xmm0
ja 0x511745
sqrtsd xmm0, xmm0
jmp 0x51174a
call sub.api_ms_win_crt_math_l1_1_0.dll__libm_sse2_sqrt_precise
mulsd xmm0, qword [esp + 0x40]
xorps xmm1, xmm1
ucomisd xmm1, xmm0
ja 0x51175f
sqrtsd xmm0, xmm0
jmp 0x511764
call sub.api_ms_win_crt_math_l1_1_0.dll__libm_sse2_sqrt_precise
addsd xmm0, qword [0x609868]
mov edx, dword [esp + 0x2c]
xorps xmm2, xmm2
cvttsd2si eax, xmm0
mov dword [edi], eax
comisd xmm2, xmmword [edx + esi*8]
jbe 0x511784
neg eax
mov dword [edi], eax
movsd xmm1, qword [esp + 0x20]
inc esi
add edi, 4
cmp esi, dword [esp + 0x4c]
jl 0x511720
mov edi, dword [esp + 0x4c]
mov ecx, dword [esp + 0x1c]
mov eax, dword [esp + 0x18]
movsd xmm1, qword [esp + 0x20]
lea eax, [eax + esi*4]
add edx, 0x400
mov dword [esp + 0x18], eax
sub ecx, 1
mov dword [esp + 0x2c], edx
mov dword [esp + 0x1c], ecx
jne 0x5115c0
mov esi, dword [esp + 0x38]
imul edi, esi
lea eax, [esp + 0x88]
push edi
mov edi, dword [esp + 0x34]
push eax
push edi
call fcn.0052f0c0
mov ecx, dword [edi + 0x414]
mov eax, 0x64
sub eax, dword [esp + 0x78]
add esp, 0xc
add dword [edi + ecx*4 + 0x14], eax
jmp 0x511809
mov eax, dword [esp + 0x40]
mov edi, dword [esp + 0x30]
mov dword [edi + eax*4 + 0x214], 0
inc dword [edi + 0x414]
mov ecx, dword [esp + 0x34]
mov eax, dword [esp + 0x3c]
add ecx, 4
inc eax
mov dword [esp + 0x34], ecx
mov dword [esp + 0x3c], eax
cmp eax, dword [edi + 0x418]
jl 0x511383
mov ecx, dword [esp + 0x50c]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0054f742
mov esp, ebp
pop ebp
ret