Function at 0x1019bd00
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x4c
mov eax, dword [esp + 0x58]
movsd xmm1, qword [0x10366140]
push esi
push edi
movd xmm0, eax
cvtdq2pd xmm0, xmm0
sar eax, 2
mov dword [esp + 0x50], eax
lea esi, [eax*8]
push esi
divsd xmm1, xmm0
mov dword [esp + 0x3c], esi
movsd qword [esp + 0x2c], xmm1
call fcn.102d6fbe
mov edi, eax
push esi
mov dword [esp + 0x50], edi
call fcn.102d6fbe
movsd xmm0, qword [esp + 0x30]
add esp, 8
mov esi, eax
mov dword [esp + 0x34], esi
call fcn.102df500
movsd qword [esp + 0x10], xmm0
movsd xmm0, qword [esp + 0x28]
call fcn.102df6c0
movsd qword [esp + 8], xmm0
movsd xmm0, qword [esp + 0x28]
mulsd xmm0, qword [0x103361f0]
movsd qword [esp + 0x28], xmm0
call fcn.102df500
movsd qword [esp + 0x20], xmm0
movsd xmm0, qword [esp + 0x28]
call fcn.102df6c0
movsd xmm6, qword [esp + 0x20]
movapd xmm7, xmm0
xor edx, edx
movsd qword [esp + 0x18], xmm7
movapd xmm4, xmm6
movapd xmm5, xmm7
cmp dword [esp + 0x50], edx
jle 0x1019befb
mov ecx, dword [esp + 0x60]
mov eax, ecx
mov esi, dword [esp + 0x38]
sar eax, 3
mov dword [esp + 0x4c], eax
mov dword [esp + 0x30], edi
mov edi, dword [esp + 0x5c]
add esi, edi
mov dword [esp + 0x44], esi
lea eax, [esi - 8]
mov esi, dword [esp + 0x50]
mov dword [esp + 0x40], eax
lea eax, [ecx - 1]
add eax, esi
sar ecx, 1
lea eax, [edi + eax*8]
mov dword [esp + 0x3c], eax
lea eax, [ecx + esi]
lea edi, [edi + eax*8]
mov eax, esi
mov esi, dword [esp + 0x5c]
sub eax, ecx
mov ecx, dword [esp + 0x5c]
add edi, 0xfffffff8
lea ecx, [ecx + eax*8]
add eax, dword [esp + 0x60]
lea eax, [esi + eax*8]
mov esi, dword [esp + 0x44]
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0x34]
sub eax, dword [esp + 0x48]
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x4c]
nop
movsd xmm3, qword [edi]
cmp edx, eax
jge 0x1019be46
mov eax, dword [esp + 0x38]
addsd xmm3, qword [eax]
mov eax, dword [esp + 0x4c]
jmp 0x1019be4a
subsd xmm3, qword [ecx]
movsd xmm2, qword [esi]
cmp edx, eax
jge 0x1019be5c
mov eax, dword [esp + 0x40]
subsd xmm2, qword [eax]
jmp 0x1019be64
mov eax, dword [esp + 0x3c]
addsd xmm2, qword [eax]
mov eax, dword [esp + 0x30]
movapd xmm1, xmm2
mov esi, dword [esp + 0x2c]
movapd xmm0, xmm3
sub dword [esp + 0x40], 0x10
inc edx
sub dword [esp + 0x3c], 0x10
sub edi, 0x10
add dword [esp + 0x38], 0x10
add ecx, 0x10
mulsd xmm1, xmm5
mulsd xmm0, xmm4
mulsd xmm2, xmm4
mulsd xmm3, xmm5
addsd xmm1, xmm0
movapd xmm0, xmm5
mulsd xmm0, qword [esp + 8]
mulsd xmm5, qword [esp + 0x10]
subsd xmm2, xmm3
movsd qword [eax + esi], xmm1
movapd xmm1, xmm4
mulsd xmm4, qword [esp + 0x10]
mov esi, dword [esp + 0x44]
mulsd xmm1, qword [esp + 8]
add esi, 0x10
mov dword [esp + 0x44], esi
movsd qword [eax], xmm2
add eax, 8
subsd xmm4, xmm0
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x4c]
addsd xmm5, xmm1
cmp edx, dword [esp + 0x50]
jl 0x1019be30
mov esi, dword [esp + 0x34]
mov edi, dword [esp + 0x48]
mov edx, dword [esp + 0x60]
cmp edx, 0x100
je 0x1019bf13
cmp edx, 0x800
jne 0x1019bf33
push 9
jmp 0x1019bf15
push 6
push edi
push esi
push dword [esp + 0x64]
call fcn.10196e50
mov edx, dword [esp + 0x70]
add esp, 0x10
movsd xmm7, qword [esp + 0x18]
movsd xmm6, qword [esp + 0x20]
cmp dword [esp + 0x50], 0
jle 0x1019c022
mov edi, dword [esp + 0x5c]
mov eax, edx
movsd xmm4, qword [0x103592e0]
mov ecx, esi
movsd xmm5, qword [0x10336168]
sar eax, 1
lea eax, [edi + eax*8]
sub edi, 8
lea edx, [edi + edx*8]
mov dword [esp + 0x60], edx
lea edx, [eax - 8]
mov edi, dword [esp + 0x60]
mov dword [esp + 0x2c], edx
mov edx, dword [esp + 0x48]
sub edx, esi
mov esi, dword [esp + 0x2c]
mov dword [esp + 0x30], edx
mov edi, edi
movsd xmm3, qword [edx + ecx]
movsd xmm1, qword [ecx]
movapd xmm2, xmm3
mov edx, dword [esp + 0x5c]
movapd xmm0, xmm1
mulsd xmm0, xmm6
add ecx, 8
mulsd xmm2, xmm7
mulsd xmm3, xmm6
mulsd xmm1, xmm7
addsd xmm2, xmm0
subsd xmm3, xmm1
movapd xmm1, xmm6
mulsd xmm6, qword [esp + 0x10]
mulsd xmm1, qword [esp + 8]
mulsd xmm2, xmm5
mulsd xmm3, xmm5
movapd xmm0, xmm2
xorpd xmm0, xmm4
movsd qword [edx], xmm0
movapd xmm0, xmm7
mulsd xmm0, qword [esp + 8]
add edx, 0x10
mov dword [esp + 0x5c], edx
mulsd xmm7, qword [esp + 0x10]
mov edx, dword [esp + 0x30]
movsd qword [esi], xmm3
xorpd xmm3, xmm4
movsd qword [eax], xmm3
subsd xmm6, xmm0
movsd qword [edi], xmm2
add eax, 0x10
sub esi, 0x10
addsd xmm7, xmm1
sub edi, 0x10
dec dword [esp + 0x50]
jne 0x1019bf80
mov esi, dword [esp + 0x34]
mov edi, dword [esp + 0x48]
test esi, esi
je 0x1019c02f
push esi
call fcn.102d6d32
add esp, 4
test edi, edi
je 0x1019c03c
push edi
call fcn.102d6d32
add esp, 4
pop edi
pop esi
add esp, 0x4c
ret