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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff0
sub esp, 0xf8
mov eax, dword [0x5da084]
xor eax, esp
mov dword [esp + 0xf4], eax
mov dword [esp + 0x10], edx
mov eax, ecx
mov ecx, dword [ebp + 8]
xorps xmm3, xmm3
mov edx, dword [ebp + 0xc]
mov dword [esp + 0x54], edx
mov edx, dword [ebp + 0x10]
push esi
movzx esi, byte [eax + 0x14]
mov dword [esp + 0x54], edx
inc esi
mov edx, dword [ebp + 0x14]
push edi
mov dword [esp + 0x48], edx
lea edi, [ecx*4 + 4]
mov edx, dword [ebp + 0x18]
mov dword [esp + 0xc], eax
mov dword [esp + 0x10], ecx
mov dword [esp + 0x44], edx
mov dword [esp + 0x34], 0
mov dword [esp + 0x28], 0
movsd qword [esp + 0x80], xmm3
imul esi, edi
call fcn.004e4f50
test eax, eax
jne 0x518f2a
push eax
push esi
call fcn.0043b050
mov edx, eax
add esp, 8
mov dword [esp + 0x1c], edx
test edx, edx
je 0x518f2a
mov ecx, dword [esp + 0xc]
push esi
push 0
push edx
movzx eax, byte [ecx + 0x14]
imul eax, edi
add eax, edx
mov dword [esp + 0x38], eax
call fcn.00570cd0
mov eax, dword [esp + 0x18]
add esp, 0xc
xor edi, edi
mov cl, byte [eax + 0x14]
test cl, cl
je 0x518aa8
mov esi, dword [esp + 0x1c]
xor edx, edx
mov dword [esp + 0x20], edx
nop dword [eax]
movzx eax, cl
mov ecx, dword [esp + 0x1c]
add eax, edx
mov edx, dword [esp + 0x10]
lea eax, [ecx + eax*4]
xor ecx, ecx
mov dword [esi], eax
test edx, edx
jle 0x518a72
mov eax, dword [esi]
mov dword [eax + ecx*4], ecx
inc ecx
cmp ecx, edx
jl 0x518a68
push dword [esp + 0x2c]
mov ecx, dword [esp + 0x10]
push dword [esp + 0x1c]
push edi
push edx
mov edx, dword [esi]
call fcn.005187f0
mov eax, dword [esp + 0x1c]
inc edi
mov edx, dword [esp + 0x30]
add esp, 0x10
add edx, dword [esp + 0x10]
add esi, 4
mov dword [esp + 0x20], edx
mov cl, byte [eax + 0x14]
movzx eax, cl
cmp edi, eax
jl 0x518a50
movzx eax, cl
mov dword [esp + 0x54], eax
mov dword [esp + 0x40], 0
test cl, cl
je 0x518de9
mov edi, dword [esp + 0xc]
mov eax, dword [edi + 0x10]
movzx ecx, byte [edi + 0x17]
sub eax, 4
cdq
idiv ecx
mov ecx, eax
mov eax, 0x55555556
imul ecx
mov ecx, dword [esp + 0x1c]
mov eax, edx
mov dword [esp + 0x20], ecx
shr eax, 0x1f
add eax, edx
mov edx, dword [esp + 0x10]
sub edx, eax
mov dword [esp + 0x2c], eax
mov dword [esp + 0x3c], edx
xorps xmm0, xmm0
mov dword [esp + 0x24], eax
xor esi, esi
movsd qword [esp + 0x68], xmm0
movsd qword [esp + 0x70], xmm0
xorps xmm3, xmm3
mov dword [esp + 0x30], esi
cmp eax, edx
jg 0x518da7
mov ecx, dword [ecx]
mov al, byte [edi + 0x16]
mov byte [esp + 0x17], al
movzx edx, byte [edi + 0x15]
mov eax, dword [ecx]
lea eax, [eax + eax*2]
shl eax, 4
add eax, dword [esp + 0x18]
mov dword [esp + 0x4c], eax
mov eax, dword [esp + 0x10]
mov eax, dword [ecx + eax*4 - 4]
mov ecx, dword [esp + 0x24]
lea eax, [eax + eax*2]
shl eax, 4
add eax, dword [esp + 0x18]
sub edx, 2
mov dword [esp + 0x50], eax
mov dword [esp + 0x38], edx
nop dword [eax + eax]
mov eax, dword [esp + 0x4c]
mov esi, 1
mov edi, dword [esp + 0xc]
movups xmm0, xmmword [eax]
movups xmmword [esp + 0xc0], xmm0
movups xmm0, xmmword [eax + 0x10]
movups xmmword [esp + 0xd0], xmm0
movups xmm0, xmmword [eax + 0x20]
mov eax, dword [esp + 0x50]
movups xmmword [esp + 0xe0], xmm0
movups xmm0, xmmword [eax]
movups xmmword [esp + 0x90], xmm0
movups xmm0, xmmword [eax + 0x10]
movups xmmword [esp + 0xa0], xmm0
movups xmm0, xmmword [eax + 0x20]
mov eax, dword [esp + 0x10]
dec eax
movups xmmword [esp + 0xb0], xmm0
cmp eax, esi
jle 0x518c14
mov eax, dword [esp + 0x20]
mov edi, dword [eax]
add edi, 4
nop dword [eax]
mov eax, dword [edi]
lea edx, [esp + 0xc0]
lea eax, [eax + eax*2]
shl eax, 4
add eax, dword [esp + 0x18]
cmp esi, ecx
mov ecx, dword [esp + 0xc]
push eax
jl 0x518bf3
lea edx, [esp + 0x94]
call fcn.00518020
mov eax, dword [esp + 0x14]
inc esi
mov ecx, dword [esp + 0x28]
dec eax
add esp, 4
add edi, 4
cmp esi, eax
jl 0x518bd0
mov edi, dword [esp + 0xc]
mov edx, dword [esp + 0x38]
cmp byte [esp + 0x17], 0
xorps xmm2, xmm2
mov eax, edx
jne 0x518c77
movss xmm1, dword [esp + eax*4 + 0xcc]
movss xmm0, dword [esp + eax*4 + 0xc8]
sub eax, 2
cvtps2pd xmm1, xmm1
cvtps2pd xmm0, xmm0
subsd xmm1, xmm0
addsd xmm2, xmm1
jns 0x518c20
addsd xmm2, xmm3
mov eax, edx
xorps xmm3, xmm3
nop
movss xmm1, dword [esp + eax*4 + 0x9c]
movss xmm0, dword [esp + eax*4 + 0x98]
sub eax, 2
cvtps2pd xmm1, xmm1
cvtps2pd xmm0, xmm0
subsd xmm1, xmm0
addsd xmm3, xmm1
jns 0x518c50
jmp 0x518cdd
mov eax, edx
nop dword [eax]
movd xmm1, dword [esp + eax*4 + 0xcc]
movd xmm0, dword [esp + eax*4 + 0xc8]
sub eax, 2
cvtdq2pd xmm0, xmm0
cvtdq2pd xmm1, xmm1
subsd xmm1, xmm0
addsd xmm2, xmm1
movaps xmm0, xmm2
jns 0x518c80
movaps xmm2, xmm3
mov eax, edx
addsd xmm2, xmm0
xorps xmm3, xmm3
movd xmm1, dword [esp + eax*4 + 0x9c]
movd xmm0, dword [esp + eax*4 + 0x98]
sub eax, 2
cvtdq2pd xmm1, xmm1
cvtdq2pd xmm0, xmm0
subsd xmm1, xmm0
addsd xmm3, xmm1
jns 0x518cb6
addsd xmm3, xmm2
push ecx
lea eax, [esp + 0x94]
mov ecx, edi
push eax
lea edx, [esp + 0xc8]
movsd qword [esp + 0x80], xmm3
call fcn.005180c0
add esp, 8
movsd qword [esp + 0x60], xmm0
lea edx, [esp + 0x90]
mov ecx, edi
call fcn.00517eb0
lea edx, [esp + 0xc0]
movsd qword [esp + 0x88], xmm0
mov ecx, edi
call fcn.00517eb0
movsd xmm1, qword [esp + 0x88]
mov ecx, dword [esp + 0x24]
addsd xmm1, xmm0
movsd xmm0, qword [esp + 0x60]
cmp ecx, dword [esp + 0x2c]
je 0x518d6e
movsd xmm2, qword [esp + 0x68]
comisd xmm2, xmm0
ja 0x518d6e
ucomisd xmm0, xmm2
lahf
test ah, 0x44
jp 0x518d82
movsd xmm2, qword [esp + 0x70]
comisd xmm2, xmm1
jbe 0x518d82
mov esi, ecx
movsd qword [esp + 0x68], xmm0
mov dword [esp + 0x30], esi
movsd qword [esp + 0x70], xmm1
jmp 0x518d86
mov esi, dword [esp + 0x30]
movsd xmm3, qword [esp + 0x78]
inc ecx
mov edx, dword [esp + 0x38]
mov dword [esp + 0x24], ecx
cmp ecx, dword [esp + 0x3c]
jle 0x518b60
mov ecx, dword [esp + 0x20]
mov edx, dword [esp + 0x3c]
mov eax, dword [esp + 0x40]
test eax, eax
je 0x518dbe
movsd xmm0, qword [esp + 0x80]
comisd xmm0, xmm3
jbe 0x518dcf
mov dword [esp + 0x34], eax
movsd qword [esp + 0x80], xmm3
mov dword [esp + 0x28], esi
inc eax
add ecx, 4
cmp eax, dword [esp + 0x54]
mov dword [esp + 0x40], eax
mov eax, dword [esp + 0x2c]
mov dword [esp + 0x20], ecx
jl 0x518af6
mov edx, dword [esp + 0x34]
mov esi, dword [esp + 0x1c]
mov ecx, dword [esp + 0x18]
mov edi, dword [esp + 0x48]
mov eax, dword [esi + edx*4]
mov eax, dword [eax]
lea eax, [eax + eax*2]
add eax, eax
movups xmm0, xmmword [ecx + eax*8]
movups xmmword [edi], xmm0
movups xmm0, xmmword [ecx + eax*8 + 0x10]
movups xmmword [edi + 0x10], xmm0
movups xmm0, xmmword [ecx + eax*8 + 0x20]
movups xmmword [edi + 0x20], xmm0
mov eax, dword [esi + edx*4]
xor edi, edi
mov edx, dword [esp + 0x28]
mov eax, dword [eax + edx*4]
mov edx, dword [esp + 0x44]
lea eax, [eax + eax*2]
add eax, eax
movups xmm0, xmmword [ecx + eax*8]
movups xmmword [edx], xmm0
movups xmm0, xmmword [ecx + eax*8 + 0x10]
movups xmmword [edx + 0x10], xmm0
movups xmm0, xmmword [ecx + eax*8 + 0x20]
movups xmmword [edx + 0x20], xmm0
cmp dword [esp + 0x10], edi
jle 0x518ea5
mov eax, dword [esp + 0x34]
mov edx, dword [esp + 0x58]
mov eax, dword [esi + eax*4]
mov eax, dword [eax + edi*4]
lea esi, [eax + eax*2]
shl esi, 4
add esi, ecx
cmp edi, dword [esp + 0x28]
mov ecx, dword [esp + 0xc]
cmovl edx, dword [esp + 0x5c]
push esi
call fcn.00515ad0
mov edx, dword [esp + 0x48]
add esp, 4
cmp edi, dword [esp + 0x28]
mov ecx, dword [esp + 0xc]
cmovl edx, dword [esp + 0x48]
push esi
call fcn.00518020
mov ecx, dword [esp + 0x1c]
inc edi
mov esi, dword [esp + 0x20]
add esp, 4
cmp edi, dword [esp + 0x10]
jl 0x518e50
cmp dword [0x5dac30], 0
je 0x518f0a
mov eax, dword [0x5dfe08]
test eax, eax
je 0x518ec1
push eax
call dword [0x5dac80]
add esp, 4
push esi
call dword [0x5dac5c]
sub dword [0x5dfca8], eax
add esp, 4
dec dword [0x5dfccc]
push esi
call dword [0x5dac54]
mov eax, dword [0x5dfe08]
add esp, 4
test eax, eax
je 0x518f14
push eax
call dword [0x5dac88]
add esp, 4
xor eax, eax
pop edi
pop esi
mov ecx, dword [esp + 0xf4]
xor ecx, esp
call fcn.0056eb71
mov esp, ebp
pop ebp
ret
push esi
call dword [0x5dac54]
add esp, 4
xor eax, eax
pop edi
pop esi
mov ecx, dword [esp + 0xf4]
xor ecx, esp
call fcn.0056eb71
mov esp, ebp
pop ebp
ret
mov ecx, dword [esp + 0xfc]
mov eax, 7
pop edi
pop esi
xor ecx, esp
call fcn.0056eb71
mov esp, ebp
pop ebp
ret