Function at 0x1400a0880
Capabilities:
Encode data using xor

Disassembly:
push r15
push r14
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x48
movdqa xmmword [rsp + 0x30], xmm7
movdqa xmmword [rsp + 0x20], xmm6
mov rsi, rcx
mov ecx, dword [rsp + 0xa0]
mov rax, qword [rsi + 8]
sub ecx, eax
cmp ecx, 0xe0000001
jb 0x1400a0b5a
mov r15, r8
mov rdi, rdx
movzx ecx, byte [r8 + 4]
mov r14d, 1
mov r8d, 1
shl r8d, cl
xor edx, edx
cmp dword [r15 + 0x1c], 6
setae dl
mov ecx, dword [r15 + 8]
sub ecx, edx
mov edx, 1
shl edx, cl
lea r10d, [rdx - 1]
sub r9d, eax
and r10d, r9d
cmp edx, 3
mov ecx, 2
mov r11d, 2
cmovae r11d, edx
xor ebx, ebx
cmp r10d, 2
cmovb ebx, r11d
cmp edx, r8d
cmovbe edx, r8d
add edx, r10d
add edx, ebx
mov ebx, r9d
sub ebx, edx
add rax, rbx
mov qword [rsi + 8], rax
add qword [rsi + 0x10], rbx
mov eax, dword [rsi + 0x1c]
neg edx
lea ebp, [r9 + rdx]
add ebp, 2
mov edx, eax
sub edx, ebx
cmp eax, ebp
cmovb edx, ecx
mov eax, dword [rsi + 0x18]
mov dword [rsi + 0x1c], edx
mov edx, eax
sub edx, ebx
cmp eax, ebp
cmovb edx, ecx
mov dword [rsi + 0x18], edx
inc dword [rsi + 0x20]
mov rax, qword [rdi + 0x10]
mov qword [rdi + 0x20], rax
movzx ecx, byte [r15 + 0xc]
mov edx, 1
shl edx, cl
mov rcx, qword [rsi + 0x70]
mov r8d, ebx
call fcn.1400a0ce0
mov eax, dword [r15 + 0x1c]
cmp dword [rsi + 0x8c], 0
je 0x1400a0ae8
movzx ecx, byte [r15 + 8]
shl r14d, cl
mov rcx, qword [rsi + 0x80]
cmp eax, 6
jne 0x1400a0b08
lea eax, [r14 + 0xf]
test r14d, r14d
cmovns eax, r14d
cmp r14d, 0x10
jl 0x1400a0b13
sar eax, 4
movd xmm0, ebp
pshufd xmm0, xmm0, 0
movd xmm1, ebx
pshufd xmm1, xmm1, 0
xor edx, edx
movdqa xmm2, xmmword [0x14015f380]
movdqa xmm3, xmmword [0x140158300]
pxor xmm0, xmm3
nop word [rax + rax]
movsxd rdx, edx
lea r8, [rdx*4]
movdqu xmm4, xmmword [rcx + rdx*4]
movdqa xmm5, xmm4
pcmpeqd xmm5, xmm2
movdqa xmm6, xmm4
pxor xmm4, xmm3
movdqa xmm7, xmm0
psubd xmm6, xmm1
pcmpgtd xmm7, xmm4
pandn xmm7, xmm6
movdqa xmm4, xmm5
pandn xmm4, xmm7
psubd xmm4, xmm5
mov r9, r8
or r9, 0x10
movdqu xmmword [rcx + rdx*4], xmm4
movdqu xmm4, xmmword [rcx + r9]
movdqa xmm5, xmm4
movdqa xmm6, xmm4
pcmpeqd xmm5, xmm2
psubd xmm6, xmm1
pxor xmm4, xmm3
movdqa xmm7, xmm0
pcmpgtd xmm7, xmm4
pandn xmm7, xmm6
movdqa xmm4, xmm5
pandn xmm4, xmm7
psubd xmm4, xmm5
movdqu xmmword [rcx + r9], xmm4
mov r9, r8
or r9, 0x20
movdqu xmm4, xmmword [rcx + r9]
movdqa xmm5, xmm4
pcmpeqd xmm5, xmm2
movdqa xmm6, xmm4
psubd xmm6, xmm1
pxor xmm4, xmm3
movdqa xmm7, xmm0
pcmpgtd xmm7, xmm4
pandn xmm7, xmm6
movdqa xmm4, xmm5
pandn xmm4, xmm7
psubd xmm4, xmm5
movdqu xmmword [rcx + r9], xmm4
or r8, 0x30
movdqu xmm4, xmmword [rcx + r8]
movdqa xmm5, xmm4
pcmpeqd xmm5, xmm2
movdqa xmm6, xmm4
pxor xmm4, xmm3
movdqa xmm7, xmm0
psubd xmm6, xmm1
pcmpgtd xmm7, xmm4
pandn xmm7, xmm6
movdqa xmm4, xmm5
pandn xmm4, xmm7
psubd xmm4, xmm5
movdqu xmmword [rcx + r8], xmm4
add edx, 0x10
dec eax
jne 0x1400a09e0
jmp 0x1400a0b13
cmp eax, 1
je 0x1400a0b13
cmp dword [r15 + 0x90], 1
jne 0x1400a0982
lea ecx, [rax - 3]
cmp ecx, 3
jb 0x1400a0b13
jmp 0x1400a0982
mov edx, r14d
mov r8d, ebx
call fcn.1400a0ce0
mov ecx, dword [rsi + 0x30]
test ecx, ecx
je 0x1400a0b2d
mov edx, 1
shl edx, cl
mov rcx, qword [rsi + 0x78]
mov r8d, ebx
call fcn.1400a0ce0
mov rax, qword [rdi + 0x18]
cmp qword [rdi + 0x20], rax
jae 0x1400a0b3b
mov qword [rdi + 0x20], rax
mov eax, dword [rsi + 0x2c]
xor ecx, ecx
sub eax, ebx
cmovb eax, ecx
mov dword [rsi + 0x2c], eax
mov dword [rsi + 0x28], 0
mov qword [rsi + 0xf8], 0
movaps xmm6, xmmword [rsp + 0x20]
movaps xmm7, xmmword [rsp + 0x30]
add rsp, 0x48
pop rbx
pop rbp
pop rdi
pop rsi
pop r14
pop r15
ret