Function at 0x180069a58
Capabilities:
Encode data using xor

Disassembly:
push rbx
push rsi
push rdi
push r12
push r13
push rbp
sub rsp, 0x68
mov r13, rcx
movups xmmword [rsp + 0x50], xmm7
movups xmmword [rsp + 0x20], xmm15
movups xmmword [rsp + 0x30], xmm14
mov r12d, dword [r13 + 0x44]
movzx eax, r12w
mov esi, r12d
movups xmmword [rsp + 0x40], xmm8
mov edi, r12d
and esi, 0xfffffffc
movdqu xmm14, xmmword [0x1800791a0]
lea ebp, [r12 + r12]
movd xmm0, r12d
movd xmm7, eax
pshufd xmm15, xmm0, 0
punpcklwd xmm7, xmm7
movdqa xmm8, xmm15
punpckldq xmm7, xmm7
psubd xmm8, xmm14
mov r10d, dword [r13 + 0x9c]
punpcklqdq xmm7, xmm7
lea rax, [r13 + 0x58]
mov ebx, dword [rax]
sub ebx, r10d
mov r10d, dword [rax - 0x14]
mov eax, dword [rax + 0x3c]
sub ebx, eax
lea edx, [r12 + r10 - 0x106]
cmp eax, edx
jb 0x180069c3b
mov rcx, qword [r13 + 0x50]
mov r8d, r12d
lea rdx, [rdi + rcx]
call fcn.18006cfc4
lea rdx, [r13 + 0x68]
mov rax, qword [rdx]
sub dword [rdx + 0x30], r12d
sub dword [rdx + 0x2c], r12d
sub dword [rdx + 0x1c], r12d
mov ecx, dword [rdx + 0xc]
cmp ecx, 4
lea rdx, [rax + rcx*2]
jae 0x180069b1d
xor eax, eax
jmp 0x180069b7e
mov eax, ecx
xor r11d, r11d
and eax, 0xfffffffc
lea r10d, [rcx + rcx]
lea r9d, [r11 + r11]
add r11d, 4
sub r9d, r10d
pxor xmm1, xmm1
movsxd r9, r9d
movq xmm0, qword [r9 + rdx]
punpcklwd xmm0, xmm1
movdqa xmm2, xmm0
pxor xmm0, xmm15
psubd xmm2, xmm14
pcmpgtd xmm2, xmm8
pand xmm2, xmm0
pxor xmm2, xmm15
pslld xmm2, 0x10
psrad xmm2, 0x10
packssdw xmm2, xmm1
psubw xmm2, xmm7
movq qword [r9 + rdx], xmm2
cmp r11d, eax
jb 0x180069b29
cmp eax, ecx
jae 0x180069baa
lea r11d, [rcx + rcx]
lea r9d, [rax + rax]
inc eax
sub r9d, r11d
movsxd r9, r9d
movzx r10d, word [r9 + rdx]
cmp r10d, r12d
cmovbe r10d, r12d
sub r10d, r12d
mov word [r9 + rdx], r10w
cmp eax, ecx
jb 0x180069b86
mov rax, qword [r13 + 0x60]
lea rax, [rax + rdi*2]
cmp r12d, 4
jae 0x180069bbc
xor edx, edx
jmp 0x180069c33
xor r9d, r9d
mov edx, esi
lea ecx, [r9 + r9]
add r9d, 4
sub ecx, ebp
pxor xmm1, xmm1
movsxd rcx, ecx
movq xmm0, qword [rcx + rax]
punpcklwd xmm0, xmm1
movdqa xmm2, xmm0
pxor xmm0, xmm15
psubd xmm2, xmm14
pcmpgtd xmm2, xmm8
pand xmm2, xmm0
pxor xmm2, xmm15
pslld xmm2, 0x10
psrad xmm2, 0x10
packssdw xmm2, xmm1
psubw xmm2, xmm7
movq qword [rcx + rax], xmm2
cmp r9d, esi
jb 0x180069bc1
jmp 0x180069c33
lea ecx, [rdx + rdx]
inc edx
sub ecx, ebp
movsxd rcx, ecx
movzx r9d, word [rcx + rax]
cmp r9d, r12d
cmovbe r9d, r12d
sub r9d, r12d
mov word [rcx + rax], r9w
cmp edx, r12d
jb 0x180069c15
add ebx, r12d
mov rcx, qword [r13]
cmp dword [rcx + 8], 0
je 0x180069d4c
mov edx, dword [r13 + 0x94]
mov r8d, ebx
add rdx, qword [r13 + 0x50]
mov eax, dword [r13 + 0x9c]
add rdx, rax
call fcn.180069dec
mov r10d, eax
lea rax, [r13 + 0x9c]
mov ebx, dword [rax]
add r10d, ebx
mov ebx, dword [r13 + 0x170c]
mov dword [rax], r10d
lea eax, [r10 + rbx]
cmp eax, 3
jb 0x180069d35
lea rcx, [r13 + 0x50]
mov rdx, qword [rcx]
mov r9d, dword [rcx + 0x44]
sub r9d, ebx
movzx eax, byte [rdx + r9]
lea r11d, [r9 + 1]
mov dword [rcx + 0x20], eax
mov ecx, dword [rcx + 0x30]
shl eax, cl
movzx edx, byte [rdx + r11]
xor eax, edx
and eax, dword [r13 + 0x7c]
mov dword [r13 + 0x70], eax
test ebx, ebx
je 0x180069d35
xor edx, edx
inc edx
lea rax, [r13 + 0x50]
mov rbx, qword [rax]
mov r8d, dword [rax + 0x20]
mov ecx, dword [rax + 0x30]
shl r8d, cl
lea r10d, [r9 + rdx + 1]
movzx r11d, byte [rbx + r10]
xor r8d, r11d
mov r10, qword [rax + 0x18]
lea eax, [r9 + rdx - 1]
and r8d, dword [r13 + 0x7c]
mov r11, qword [r13 + 0x60]
mov dword [r13 + 0x70], r8d
mov ecx, dword [r13 + 0x4c]
and ecx, eax
movzx ebx, word [r10 + r8*2]
mov word [r11 + rcx*2], bx
mov ebx, dword [r13 + 0x70]
mov r10, qword [r13 + 0x68]
mov word [r10 + rbx*2], ax
lea rbx, [r13 + 0x170c]
mov eax, dword [rbx]
mov r10d, dword [r13 + 0x9c]
lea ecx, [rax - 1]
mov dword [rbx], ecx
lea eax, [r10 + rax - 1]
cmp eax, 3
jb 0x180069d35
test ecx, ecx
jne 0x180069cc0
cmp r10d, 0x106
jae 0x180069d4c
mov rax, qword [r13]
cmp dword [rax + 8], 0
jne 0x180069ac8
mov esi, dword [r13 + 0x58]
mov ebp, dword [r13 + 0x1718]
cmp ebp, esi
jae 0x180069dc5
lea rdx, [r13 + 0x94]
mov eax, dword [rdx]
mov ecx, dword [rdx + 8]
lea ebx, [rax + rcx]
cmp ebp, ebx
jae 0x180069d96
sub esi, ebx
mov ebp, 0x102
cmp esi, 0x102
mov ecx, ebx
cmovb ebp, esi
add rcx, qword [r13 + 0x50]
mov edx, ebp
call fcn.18006d020
add ebx, ebp
mov dword [r13 + 0x1718], ebx
jmp 0x180069dc5
lea eax, [rax + rcx + 0x102]
cmp ebp, eax
jae 0x180069dc5
sub ebx, ebp
sub esi, ebp
add ebx, 0x102
cmp esi, ebx
cmovb ebx, esi
add rbp, qword [r13 + 0x50]
mov edx, ebx
mov rcx, rbp
call fcn.18006d020
add dword [r13 + 0x1718], ebx
movups xmm7, xmmword [rsp + 0x50]
movups xmm8, xmmword [rsp + 0x40]
movups xmm14, xmmword [rsp + 0x30]
movups xmm15, xmmword [rsp + 0x20]
add rsp, 0x68
pop rbp
pop r13
pop r12
pop rdi
pop rsi
pop rbx
ret