Function at 0x14022be54
Capabilities:
Encode data using xor

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0xb8]
sub rsp, 0x1b8
mov rax, qword [0x14033a080]
xor rax, rsp
mov qword [rbp + 0xa0], rax
mov r10, qword [rcx + 8]
mov rdi, rcx
mov r11, qword [rcx + 0x38]
mov r13d, edx
mov ebx, dword [rcx + 0x34]
sub r13d, r10d
mov qword [rsp + 0x70], rdx
mov eax, r13d
mov esi, dword [rdi + 0x1c]
mov qword [rbp - 0x78], r9
mov r9, rdx
mov qword [rsp + 0x78], r8
mov edx, 1
mov r8, qword [rcx + 0x70]
mov ecx, dword [rcx + 0x100]
shl edx, cl
mov ecx, r13d
sub ecx, dword [rdi + 0x1c]
sub eax, edx
cmp ecx, edx
mov qword [rsp + 0x50], r8
mov qword [rsp + 0x58], r11
cmova esi, eax
mov dword [rsp + 0x2c], ebx
mov eax, dword [rdi + 0x10c]
xor r14d, r14d
cmp dword [rdi + 0x28], r14d
mov qword [rsp + 0x48], r10
cmovne esi, dword [rdi + 0x1c]
lea ecx, [r14 + 5]
mov dword [rsp + 0x34], esi
mov rsi, qword [rdi + 0x60]
lea r15d, [r14 + 4]
cmp eax, ecx
mov dword [rsp + 0x28], r13d
mov qword [rbp - 0x70], rsi
cmovb ecx, eax
mov qword [rsp + 0x60], 3
lea eax, [r14 + 1]
shl eax, cl
mov dword [rsp + 0x30], eax
cmp dword [rdi + 0x12c], r14d
jne 0x14022c26e
mov esi, dword [rdi + 0x2c]
lea r12d, [r14 + 0x18]
mov eax, r13d
mov qword [rsp + 0x20], r8
sub eax, esi
mov qword [rsp + 0x38], r11
mov r8d, ebx
cmp eax, 0x180
jbe 0x14022c123
lea eax, [rsi + 0x60]
mov dword [rsp + 0x20], eax
cmp esi, eax
jae 0x14022c03d
mov r14, qword [rsp + 0x50]
mov eax, r12d
mov r12d, dword [rsp + 0x20]
sub eax, ebx
mov qword [rsp + 0x40], rax
mov r11d, esi
mov qword [rsp + 0x38], rsi
mov r13, r10
mov rbx, qword [rdi + 0x60]
lea rdx, [r13 + 8]
add rdx, r11
lea rcx, [rsp + 0x20]
mov r8, r15
call sub.VCRUNTIME140.dll_memcpy
imul edx, dword [rsp + 0x20], 0x9e3779b1
mov r9d, 0x1fffffe0
mov rcx, qword [rsp + 0x40]
mov eax, ebx
xor rdx, rax
shr rdx, cl
mov eax, edx
shr eax, 3
and eax, r9d
prefetcht0 byte [r14 + rax*4]
prefetcht0 byte [r14 + rax*4 + 0x40]
mov r8, qword [rsp + 0x58]
prefetcht0 byte [rax + r8]
mov r11, qword [rsp + 0x38]
mov rax, r11
and eax, 7
mov r10d, dword [rdi + rax*4 + 0x40]
mov dword [rdi + rax*4 + 0x40], edx
mov eax, r10d
shr eax, 3
and r9d, eax
add r8, r9
movzx edx, byte [r8]
dec edx
and edx, 0x1f
mov eax, edx
neg eax
sbb ecx, ecx
inc r11
not ecx
mov qword [rsp + 0x38], r11
and ecx, 0x1f
add edx, ecx
mov byte [r8], dl
mov eax, edx
add rax, r9
mov byte [rdx + r8], r10b
mov dword [r14 + rax*4], esi
inc esi
cmp esi, r12d
jb 0x14022bf7e
mov r13d, dword [rsp + 0x28]
xor r14d, r14d
mov r9, qword [rsp + 0x70]
mov r10, qword [rsp + 0x48]
lea r12d, [r14 + 0x18]
mov r8d, dword [rdi + 0x34]
lea rcx, [r9 + 1]
mov r9, qword [rdi + 0x70]
lea esi, [r13 - 0x20]
mov edx, ecx
mov eax, esi
sub edx, esi
mov qword [rsp + 0x20], r9
mov r9, qword [rdi + 0x38]
sub edx, r10d
inc edx
mov qword [rsp + 0x38], r9
add rax, r10
cmp rax, rcx
mov eax, 8
cmova edx, r14d
cmp edx, eax
cmova edx, eax
lea eax, [rdx + rsi]
cmp esi, eax
jae 0x14022c123
mov r13, qword [rsp + 0x20]
mov eax, r12d
sub eax, r8d
mov r12d, esi
mov qword [rsp + 0x68], rax
mov r14, r9
mov eax, edx
mov qword [rsp + 0x40], rax
mov rbx, qword [rdi + 0x60]
lea rdx, [r10 + r12]
mov r8, r15
lea rcx, [rsp + 0x20]
call sub.VCRUNTIME140.dll_memcpy
imul edx, dword [rsp + 0x20], 0x9e3779b1
mov rcx, qword [rsp + 0x68]
mov eax, ebx
xor rdx, rax
shr rdx, cl
mov eax, edx
shr eax, 3
and eax, 0x1fffffe0
prefetcht0 byte [r13 + rax*4]
prefetcht0 byte [r13 + rax*4 + 0x40]
prefetcht0 byte [r14 + rax]
mov r10, qword [rsp + 0x48]
mov rax, r12
and eax, 7
inc r12
sub qword [rsp + 0x40], 1
mov dword [rdi + rax*4 + 0x40], edx
jne 0x14022c0a2
mov rax, qword [rdi + 0x70]
xor r14d, r14d
mov r8d, dword [rdi + 0x34]
mov r13d, dword [rsp + 0x28]
mov qword [rsp + 0x20], rax
mov rax, qword [rdi + 0x38]
lea r12d, [r14 + 0x18]
mov qword [rsp + 0x38], rax
mov rcx, qword [rdi + 8]
mov qword [rbp - 0x80], rcx
cmp esi, r13d
jae 0x14022c204
mov r14, qword [rsp + 0x20]
mov eax, r12d
mov r12, qword [rsp + 0x38]
sub eax, r8d
mov r11d, esi
mov qword [rsp + 0x68], rax
mov qword [rsp + 0x40], r11
mov rbx, qword [rdi + 0x60]
lea rdx, [r11 + 8]
add rdx, rcx
mov r8, r15
lea rcx, [rsp + 0x20]
call sub.VCRUNTIME140.dll_memcpy
imul edx, dword [rsp + 0x20], 0x9e3779b1
mov r8d, 0x1fffffe0
mov rcx, qword [rsp + 0x68]
mov eax, ebx
xor rdx, rax
shr rdx, cl
mov eax, edx
shr eax, 3
and eax, r8d
prefetcht0 byte [r14 + rax*4]
prefetcht0 byte [r14 + rax*4 + 0x40]
prefetcht0 byte [r12 + rax]
mov r11, qword [rsp + 0x40]
mov rax, r11
and eax, 7
mov r10d, dword [rdi + rax*4 + 0x40]
mov dword [rdi + rax*4 + 0x40], edx
mov eax, r10d
shr eax, 3
and eax, r8d
mov r9d, eax
lea r8, [r12 + rax]
movzx edx, byte [r8]
dec edx
and edx, 0x1f
mov eax, edx
neg eax
sbb ecx, ecx
inc r11
not ecx
mov qword [rsp + 0x40], r11
and ecx, 0x1f
add edx, ecx
mov rcx, qword [rbp - 0x80]
mov byte [r8], dl
mov eax, edx
add rax, r9
mov byte [r8 + rdx], r10b
mov dword [r14 + rax*4], esi
inc esi
cmp esi, r13d
jb 0x14022c151
xor r14d, r14d
lea r12d, [r14 + 0x18]
mov rdx, qword [rsp + 0x48]
lea rcx, [rsp + 0x20]
add rdx, 8
mov ebx, r13d
add rdx, rbx
mov dword [rdi + 0x2c], r13d
mov r8, r15
call sub.VCRUNTIME140.dll_memcpy
imul edx, dword [rsp + 0x20], 0x9e3779b1
mov ecx, r12d
mov eax, dword [rbp - 0x70]
sub ecx, dword [rsp + 0x2c]
mov r8, qword [rsp + 0x50]
xor rdx, rax
shr rdx, cl
mov eax, edx
shr eax, 3
and eax, 0x1fffffe0
prefetcht0 byte [r8 + rax*4]
prefetcht0 byte [r8 + rax*4 + 0x40]
mov r10, qword [rsp + 0x58]
prefetcht0 byte [rax + r10]
and ebx, 7
mov r9d, dword [rdi + rbx*4 + 0x40]
mov dword [rdi + rbx*4 + 0x40], edx
jmp 0x14022c2a4
mov r8, r15
lea rcx, [rsp + 0x2c]
mov rdx, r9
call sub.VCRUNTIME140.dll_memcpy
imul r9d, dword [rsp + 0x2c], 0x9e3779b1
mov ecx, 0x18
mov r8, qword [rsp + 0x50]
sub ecx, ebx
mov r10, qword [rsp + 0x58]
mov eax, esi
mov dword [rdi + 0x2c], r13d
xor r9, rax
shr r9, cl
add dword [rdi + 0x68], r9d
mov eax, r9d
shr eax, 3
xorps xmm0, xmm0
and eax, 0x1fffffe0
mov rsi, r14
movups xmmword [rbp - 0x70], xmm0
mov rcx, r14
lea r11, [rax + r10]
movzx ebx, byte [r11]
lea r12, [r8 + rax*4]
movsx eax, r9b
mov rdx, r11
movd xmm1, eax
punpcklbw xmm1, xmm1
punpcklwd xmm1, xmm1
pshufd xmm1, xmm1, 0
movdqu xmm0, xmmword [rdx]
lea rdx, [rdx + 0x10]
pcmpeqb xmm0, xmm1
pmovmskb eax, xmm0
mov dword [rbp + rcx*4 - 0x70], eax
inc rcx
cmp rcx, 2
jl 0x14022c2e4
mov r8d, dword [rbp - 0x6c]
mov edx, ebx
and edx, 0x1f
shl r8d, 0x10
or r8d, dword [rbp - 0x70]
mov ecx, edx
neg ecx
mov eax, r8d
and ecx, 0x1f
mov r10d, r8d
shl r10d, cl
mov ecx, edx
shr rax, cl
or r10, rax
jbe 0x14022c370
mov rdx, qword [rsp + 0x48]
mov r8d, dword [rsp + 0x30]
mov r13d, dword [rsp + 0x34]
test r8d, r8d
je 0x14022c36b
bsf rcx, r10
add ecx, ebx
and ecx, 0x1f
mov ecx, dword [r12 + rcx*4]
je 0x14022c362
cmp ecx, r13d
jb 0x14022c36b
prefetcht0 byte [rcx + rdx]
mov dword [rbp + rsi*4 - 0x60], ecx
inc rsi
dec r8d
lea rax, [r10 - 1]
and r10, rax
ja 0x14022c33b
mov r13d, dword [rsp + 0x28]
lea edx, [rbx - 1]
and edx, 0x1f
mov eax, edx
neg eax
sbb ecx, ecx
not ecx
and ecx, 0x1f
add edx, ecx
mov byte [r11], dl
mov byte [rdx + r11], r9b
mov eax, dword [rdi + 0x2c]
mov dword [r12 + rdx*4], eax
inc dword [rdi + 0x2c]
test rsi, rsi
je 0x14022c426
mov rdi, qword [rsp + 0x60]
mov r12, qword [rsp + 0x70]
mov ebx, dword [rbp + r14*4 - 0x60]
lea rdx, [rdi - 3]
add rbx, qword [rsp + 0x48]
lea rcx, [rsp + 0x30]
add rdx, rbx
mov r8, r15
call sub.VCRUNTIME140.dll_memcpy
lea rdx, [r12 - 3]
mov r8, r15
add rdx, rdi
lea rcx, [rsp + 0x34]
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [rsp + 0x34]
cmp dword [rsp + 0x30], eax
jne 0x14022c419
mov r8, qword [rsp + 0x78]
mov rdx, rbx
mov rcx, r12
call fcn.140206fc0
cmp rax, rdi
jbe 0x14022c419
mov rdx, qword [rbp - 0x78]
mov ecx, r13d
sub ecx, dword [rbp + r14*4 - 0x60]
mov rdi, rax
add ecx, 3
mov qword [rdx], rcx
lea rcx, [rax + r12]
cmp rcx, qword [rsp + 0x78]
je 0x14022c421
inc r14
cmp r14, rsi
jb 0x14022c3a7
mov qword [rsp + 0x60], rdi
mov rax, qword [rsp + 0x60]
mov rcx, qword [rbp + 0xa0]
xor rcx, rsp
call fcn.140255040
add rsp, 0x1b8
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret