Function at 0x140164a70
Capabilities:
Encode data using xor

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x30
mov rbp, rcx
call fcn.14004cdc0
test eax, eax
je 0x140164f83
mov rcx, rbp
call fcn.14004cde0
mov r13d, eax
lea edx, [rax - 1]
cmp edx, 1
ja 0x140164f83
mov rcx, rbp
call fcn.14004ced0
mov r12d, eax
cmp eax, 8
je 0x140164f79
mov rcx, rbp
call fcn.14004cf10
mov rcx, rbp
mov esi, eax
call fcn.14004cf50
xor ebx, ebx
mov r14d, eax
mov dword [rsp + 0x28], ebx
xor r9d, r9d
mov edx, eax
mov dword [rsp + 0x20], ebx
mov ecx, esi
lea r8d, [rbx + 8]
call fcn.14004c2c0
mov r15, rax
test rax, rax
je 0x140164f83
mov rdx, rbp
mov rcx, rax
call fcn.14004ed40
mov rcx, r15
call fcn.14004d300
mov rcx, rbp
mov rdi, rax
call fcn.14004d4b0
cmp r13d, 1
jne 0x140164dfe
sub r12d, r13d
je 0x140164d39
sub r12d, 3
je 0x140164c84
sub r12d, 0xc
je 0x140164bd4
sub r12d, 8
je 0x140164b94
cmp r12d, 8
jne 0x140164f79
test r14d, r14d
je 0x140164f74
mov edx, ebx
mov rcx, rbp
call fcn.14007d5d0
mov edx, ebx
mov rcx, r15
mov rdi, rax
call fcn.14007d5d0
mov rcx, rax
mov r8d, esi
mov rdx, rdi
call fcn.140164870
inc ebx
cmp ebx, r14d
jb 0x140164b60
mov rax, r15
jmp 0x140164f85
test r14d, r14d
je 0x140164f74
nop dword [rax]
mov edx, ebx
mov rcx, rbp
call fcn.14007d5d0
mov edx, ebx
mov rcx, r15
mov rdi, rax
call fcn.14007d5d0
mov rcx, rax
mov r8d, esi
mov rdx, rdi
call fcn.140164670
inc ebx
cmp ebx, r14d
jb 0x140164ba0
mov rax, r15
jmp 0x140164f85
mov rcx, rbp
call fcn.14004d7d0
cmp eax, 0xf800
jne 0x140164c44
mov rcx, rbp
call fcn.14004d860
cmp eax, 0x7e0
jne 0x140164c44
mov rcx, rbp
call fcn.14004d8f0
cmp eax, 0x1f
jne 0x140164c44
test r14d, r14d
je 0x140164f74
nop dword [rax + rax]
mov edx, ebx
mov rcx, rbp
call fcn.14007d5d0
mov edx, ebx
mov rcx, r15
mov rdi, rax
call fcn.14007d5d0
mov rcx, rax
mov r8d, esi
mov rdx, rdi
call fcn.140164380
inc ebx
cmp ebx, r14d
jb 0x140164c10
mov rax, r15
jmp 0x140164f85
test r14d, r14d
je 0x140164f74
nop dword [rax]
mov edx, ebx
mov rcx, rbp
call fcn.14007d5d0
mov edx, ebx
mov rcx, r15
mov rdi, rax
call fcn.14007d5d0
mov rcx, rax
mov r8d, esi
mov rdx, rdi
call fcn.140164090
inc ebx
cmp ebx, r14d
jb 0x140164c50
mov rax, r15
jmp 0x140164f85
cmp eax, 3
jne 0x140164caf
mov rcx, rbp
call fcn.14004d300
movups xmm0, xmmword [rax]
movups xmmword [rdi], xmm0
movups xmm1, xmmword [rax + 0x10]
movups xmmword [rdi + 0x10], xmm1
movups xmm0, xmmword [rax + 0x20]
movups xmmword [rdi + 0x20], xmm0
movups xmm1, xmmword [rax + 0x30]
movups xmmword [rdi + 0x30], xmm1
mov edi, ebx
test r14d, r14d
je 0x140164f74
nop word [rax + rax]
mov edx, edi
mov rcx, rbp
call fcn.14007d5d0
mov edx, edi
mov rcx, r15
mov r12, rax
call fcn.14007d5d0
mov r13, rax
mov r8d, ebx
mov r9d, 1
test esi, esi
je 0x140164d2a
mov r10, rbx
mov r11, rsi
nop dword [rax]
test r9d, r9d
mov ecx, r8d
lea r10, [r10 + 1]
movzx edx, byte [rcx + r12]
lea ecx, [r8 + 1]
cmove r8d, ecx
movzx eax, dl
and al, 0xf
shr dl, 4
test r9d, r9d
movzx ecx, dl
movzx eax, al
cmove ecx, eax
xor r9d, 1
mov byte [r10 + r13 - 1], cl
sub r11, 1
jne 0x140164cf0
inc edi
cmp edi, r14d
jb 0x140164cc0
mov rax, r15
jmp 0x140164f85
cmp eax, 3
jne 0x140164d55
mov rcx, rbp
call fcn.14004d300
mov ecx, dword [rax]
mov dword [rdi], ecx
mov eax, dword [rax + 4]
mov dword [rdi + 0x3fc], eax
jmp 0x140164d81
test eax, eax
jne 0x140164d81
mov eax, 0xffffff
mov ecx, 0x100
nop dword [rax]
nop word [rax + rax]
mov dword [rdi], eax
lea rdi, [rdi + 4]
add eax, 0xfffefeff
sub rcx, 1
jne 0x140164d70
mov edi, ebx
test r14d, r14d
je 0x140164f74
nop dword [rax]
mov edx, edi
mov rcx, rbp
call fcn.14007d5d0
mov edx, edi
mov rcx, r15
mov r12, rax
call fcn.14007d5d0
mov r10, rax
mov r8d, ebx
test esi, esi
je 0x140164def
mov r9, rbx
nop dword [rax]
nop dword [rax + rax]
mov rax, r9
lea r10, [r10 + 1]
shr rax, 3
mov ecx, r8d
and ecx, 7
mov edx, 0x80
sar edx, cl
and dl, byte [rax + r12]
neg dl
sbb al, al
inc r8d
inc r9
mov byte [r10 - 1], al
cmp r8d, esi
jb 0x140164dc0
inc edi
cmp edi, r14d
jb 0x140164d90
mov rax, r15
jmp 0x140164f85
cmp r13d, 2
jne 0x140164f79
mov rcx, rbp
call fcn.14004cfe0
mov rcx, r15
mov r12d, eax
call fcn.14004cfe0
mov rcx, rbp
mov r13d, eax
call fcn.14004ce00
mov rcx, r15
mov rdi, rax
call fcn.14004ce00
mov r9, rax
test r14d, r14d
je 0x140164f74
mov r11, r14
mov r14d, 8
nop word [rax + rax]
mov r8d, ebx
test esi, esi
je 0x140164f64
cmp esi, 0x20
jb 0x140164f30
lea eax, [rsi - 1]
lea rdx, [rax + r9]
lea rax, [rdi + rax*2]
cmp r9, rax
ja 0x140164e7d
cmp rdx, rdi
jae 0x140164f30
mov eax, esi
mov edx, esi
and eax, 0x1f
sub edx, eax
movd xmm1, r14d
mov r10d, 0x10
nop dword [rax]
nop word [rax + rax]
mov eax, r8d
add r8d, 0x20
movdqu xmm0, xmmword [rdi + rax*2]
psrlw xmm0, xmm1
pand xmm0, xmmword [0x140328e20]
packuswb xmm0, xmm0
movq qword [rax + r9], xmm0
lea eax, [r10 - 8]
movdqu xmm0, xmmword [rdi + rax*2]
psrlw xmm0, xmm1
pand xmm0, xmmword [0x140328e20]
packuswb xmm0, xmm0
movq qword [rax + r9], xmm0
mov eax, r10d
movdqu xmm0, xmmword [rdi + rax*2]
psrlw xmm0, xmm1
pand xmm0, xmmword [0x140328e20]
packuswb xmm0, xmm0
movq qword [rax + r9], xmm0
lea eax, [r10 + 8]
movdqu xmm0, xmmword [rdi + rax*2]
add r10d, 0x20
psrlw xmm0, xmm1
pand xmm0, xmmword [0x140328e20]
packuswb xmm0, xmm0
movq qword [rax + r9], xmm0
cmp r8d, edx
jb 0x140164ea0
cmp r8d, esi
jae 0x140164f64
mov eax, r8d
lea rcx, [rax + r9]
lea rdx, [rdi + rax*2]
mov eax, esi
sub eax, r8d
mov r8d, eax
nop dword [rax]
nop word [rax + rax]
movzx eax, byte [rdx + 1]
lea rdx, [rdx + 2]
mov byte [rcx], al
lea rcx, [rcx + 1]
sub r8, 1
jne 0x140164f50
add rdi, r12
add r9, r13
sub r11, 1
jne 0x140164e50
mov rax, r15
jmp 0x140164f85
mov rcx, rbp
call fcn.14004c360
jmp 0x140164f85
xor eax, eax
mov rbx, qword [rsp + 0x60]
mov rbp, qword [rsp + 0x68]
mov rsi, qword [rsp + 0x70]
add rsp, 0x30
pop r15
pop r14
pop r13
pop r12
pop rdi
ret