Function at 0x140022b30
Capabilities:
Encode data using xor

Disassembly:
sub rsp, 0xa8
mov qword [rsp + 0xa0], r9
mov qword [rsp + 0x98], r8
mov dword [rsp + 0x94], edx
mov qword [rsp + 0x88], rcx
mov rax, qword [rsp + 0x98]
movzx edx, word [rax]
mov dword [rsp + 0x80], edx
mov rax, qword [rsp + 0xa0]
mov edx, dword [rsp + 0x80]
xor edx, 0x7ff
shr edx, 4
mov edx, edx
mov ecx, edx
mov edx, dword [rax + rcx*4]
mov dword [rsp + 0x84], edx
mov rax, qword [rsp + 0xa0]
mov edx, dword [rsp + 0x80]
shr edx, 4
mov edx, edx
mov ecx, edx
mov edx, dword [rax + rcx*4]
mov dword [rsp + 0x7c], edx
mov edx, dword [rsp + 0x84]
mov rax, qword [rsp + 0xa0]
mov rcx, qword [rsp + 0x98]
movzx r10d, word [rcx + 0x10]
sar r10d, 4
movsxd rcx, r10d
add edx, dword [rax + rcx*4]
mov dword [rsp + 0x78], edx
mov dword [rsp + 0x74], 0
mov eax, dword [rsp + 0x74]
cmp eax, dword [rsp + 0x94]
jae 0x140022c86
mov rax, qword [rsp + 0x88]
add rax, 4
mov ecx, dword [rsp + 0x74]
mov edx, ecx
imul rdx, rdx, 0x440
add rax, rdx
mov qword [rsp + 0x68], rax
mov rax, qword [rsp + 0x98]
mov ecx, dword [rsp + 0x74]
shl ecx, 4
mov ecx, ecx
mov edx, ecx
shl rdx, 1
add rax, rdx
mov qword [rsp + 0x60], rax
mov r9, qword [rsp + 0xa0]
mov r8, qword [rsp + 0x68]
mov edx, dword [rsp + 0x7c]
mov rcx, qword [rsp + 0x60]
call fcn.14002f130
mov r9, qword [rsp + 0xa0]
mov rax, qword [rsp + 0x68]
add rax, 0x20
mov edx, dword [rsp + 0x78]
mov rcx, qword [rsp + 0x60]
add rcx, 0x10
mov r8, rax
call fcn.14002f130
mov eax, dword [rsp + 0x74]
add eax, 1
mov dword [rsp + 0x74], eax
jmp 0x140022bdd
mov rax, qword [rsp + 0x88]
mov ecx, dword [rax]
mov dword [rsp + 0x5c], ecx
cmp dword [rsp + 0x5c], 0x10
jbe 0x140022ea9
mov rax, qword [rsp + 0x98]
add rax, 0x200
mov qword [rsp + 0x50], rax
mov rax, qword [rsp + 0x88]
add rax, 4
add rax, 0x40
mov qword [rsp + 0x48], rax
mov ecx, dword [rsp + 0x5c]
sub ecx, 0xf
mov dword [rsp + 0x5c], ecx
mov ecx, dword [rsp + 0x5c]
shr ecx, 1
mov dword [rsp + 0x5c], ecx
mov rax, qword [rsp + 0xa0]
mov rdx, qword [rsp + 0x98]
movzx ecx, word [rdx + 0x10]
xor ecx, 0x7ff
sar ecx, 4
movsxd rdx, ecx
mov ecx, dword [rax + rdx*4]
add ecx, dword [rsp + 0x84]
mov dword [rsp + 0x84], ecx
mov eax, dword [rsp + 0x5c]
add eax, 0xffffffff
mov dword [rsp + 0x5c], eax
add eax, 0x80
mov dword [rsp + 0x44], eax
mov eax, dword [rsp + 0x84]
mov dword [rsp + 0x40], eax
xor eax, eax
mov ecx, dword [rsp + 0x44]
and ecx, 1
mov dword [rsp + 0x3c], ecx
mov ecx, dword [rsp + 0x44]
shr ecx, 1
mov dword [rsp + 0x44], ecx
mov rdx, qword [rsp + 0xa0]
mov r8, qword [rsp + 0x50]
mov ecx, dword [rsp + 0x44]
mov r9d, ecx
movzx ecx, word [r8 + r9*2]
sub eax, dword [rsp + 0x3c]
and eax, 0x7ff
xor ecx, eax
shr ecx, 4
mov eax, ecx
mov r8d, eax
mov eax, dword [rdx + r8*4]
add eax, dword [rsp + 0x40]
mov dword [rsp + 0x40], eax
cmp dword [rsp + 0x44], 2
jae 0x140022d31
mov rax, qword [rsp + 0x50]
mov ecx, dword [rsp + 0x5c]
mov edx, ecx
movzx ecx, word [rax + rdx*2 + 0x100]
mov dword [rsp + 0x38], ecx
mov ecx, dword [rsp + 0x40]
mov rax, qword [rsp + 0xa0]
mov r8d, dword [rsp + 0x38]
shr r8d, 4
mov r8d, r8d
mov edx, r8d
add ecx, dword [rax + rdx*4]
mov rax, qword [rsp + 0x48]
mov r8d, dword [rsp + 0x5c]
mov edx, r8d
shl rdx, 1
mov dword [rax + rdx*4], ecx
mov ecx, dword [rsp + 0x40]
mov rax, qword [rsp + 0xa0]
mov r8d, dword [rsp + 0x38]
xor r8d, 0x7ff
shr r8d, 4
mov r8d, r8d
mov edx, r8d
add ecx, dword [rax + rdx*4]
mov rax, qword [rsp + 0x48]
mov r8d, dword [rsp + 0x5c]
mov edx, r8d
shl rdx, 1
mov dword [rax + rdx*4 + 4], ecx
cmp dword [rsp + 0x5c], 0
jne 0x140022d12
mov rax, qword [rsp + 0x88]
mov ecx, dword [rax]
sub ecx, 0x10
mov ecx, ecx
mov eax, ecx
shl rax, 2
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x34], 1
mov eax, dword [rsp + 0x34]
cmp eax, dword [rsp + 0x94]
jae 0x140022ea4
mov rax, qword [rsp + 0x88]
add rax, 4
mov ecx, dword [rsp + 0x34]
mov edx, ecx
imul rdx, rdx, 0x440
add rax, rdx
add rax, 0x40
mov rdx, qword [rsp + 0x88]
add rdx, 4
add rdx, 0x40
mov r8, qword [rsp + 0x28]
mov rcx, rax
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [rsp + 0x34]
add eax, 1
mov dword [rsp + 0x34], eax
jmp 0x140022e3c
jmp 0x140022ea9
add rsp, 0xa8
ret