Function at 0x180019990
Capabilities:
Encode data using xor

Disassembly:
mov qword [rsp + 8], rcx
sub rsp, 0x48
mov dword [rsp + 0x24], 0
mov dword [rsp + 0x20], 0
mov rax, qword [rsp + 0x50]
mov dword [rax + 0x6afc8], 2
mov rax, qword [rsp + 0x50]
cmp dword [rax + 0x6afd8], 0
je 0x180019de5
mov rax, qword [rsp + 0x50]
cmp dword [rax + 0x6afd8], 3
jb 0x180019a78
mov rax, qword [rsp + 0x50]
mov eax, dword [rax + 0x6afc4]
shl eax, 5
mov rcx, qword [rsp + 0x50]
mov ecx, dword [rcx + 0x6afcc]
add ecx, 2
mov ecx, ecx
mov rdx, qword [rsp + 0x50]
movzx ecx, byte [rdx + rcx + 0x1afb8]
xor eax, ecx
and eax, 0x7fff
mov rcx, qword [rsp + 0x50]
mov dword [rcx + 0x6afc4], eax
mov rax, qword [rsp + 0x50]
mov eax, dword [rax + 0x6afc4]
mov rcx, qword [rsp + 0x50]
mov eax, dword [rcx + rax*4 + 0x4afb8]
mov dword [rsp + 0x24], eax
mov rax, qword [rsp + 0x50]
mov eax, dword [rax + 0x6afcc]
and eax, 0x7fff
mov eax, eax
mov rcx, qword [rsp + 0x50]
mov edx, dword [rsp + 0x24]
mov dword [rcx + rax*4 + 0x2afb8], edx
mov rax, qword [rsp + 0x50]
mov eax, dword [rax + 0x6afc4]
mov rcx, qword [rsp + 0x50]
mov rdx, qword [rsp + 0x50]
mov edx, dword [rdx + 0x6afcc]
mov dword [rcx + rax*4 + 0x4afb8], edx
cmp dword [rsp + 0x24], 0
je 0x180019af7
mov rax, qword [rsp + 0x50]
mov ecx, dword [rsp + 0x24]
mov eax, dword [rax + 0x6afcc]
sub eax, ecx
cmp eax, 0x7efa
ja 0x180019af7
mov rax, qword [rsp + 0x50]
mov rcx, qword [rsp + 0x50]
mov ecx, dword [rcx + 0x6afd8]
cmp dword [rax + 0x6afe8], ecx
jbe 0x180019ac5
mov rax, qword [rsp + 0x50]
mov rcx, qword [rsp + 0x50]
mov ecx, dword [rcx + 0x6afd8]
mov dword [rax + 0x6afe8], ecx
mov edx, dword [rsp + 0x24]
mov rcx, qword [rsp + 0x50]
call fcn.180019340
mov dword [rsp + 0x20], eax
mov rax, qword [rsp + 0x50]
mov eax, dword [rax + 0x6afd8]
cmp dword [rsp + 0x20], eax
jbe 0x180019af7
mov rax, qword [rsp + 0x50]
mov eax, dword [rax + 0x6afd8]
mov dword [rsp + 0x20], eax
cmp dword [rsp + 0x20], 3
jb 0x180019cea
mov eax, dword [rsp + 0x20]
sub eax, 3
mov rcx, qword [rsp + 0x50]
mov rdx, qword [rsp + 0x50]
mov edx, dword [rdx + 0x6afd0]
mov ecx, dword [rcx + 0x6afcc]
sub ecx, edx
mov r8d, eax
mov edx, ecx
mov rcx, qword [rsp + 0x50]
call fcn.180018310
mov dword [rsp + 0x28], eax
mov rax, qword [rsp + 0x50]
mov ecx, dword [rsp + 0x20]
mov eax, dword [rax + 0x6afd8]
sub eax, ecx
mov rcx, qword [rsp + 0x50]
mov dword [rcx + 0x6afd8], eax
mov rax, qword [rsp + 0x50]
mov eax, dword [rax + 0x6afe0]
cmp dword [rsp + 0x20], eax
ja 0x180019c67
mov rax, qword [rsp + 0x50]
cmp dword [rax + 0x6afd8], 3
jb 0x180019c67
mov eax, dword [rsp + 0x20]
dec eax
mov dword [rsp + 0x20], eax
mov rax, qword [rsp + 0x50]
mov eax, dword [rax + 0x6afcc]
inc eax
mov rcx, qword [rsp + 0x50]
mov dword [rcx + 0x6afcc], eax
mov rax, qword [rsp + 0x50]
mov eax, dword [rax + 0x6afc4]
shl eax, 5
mov rcx, qword [rsp + 0x50]
mov ecx, dword [rcx + 0x6afcc]
add ecx, 2
mov ecx, ecx
mov rdx, qword [rsp + 0x50]
movzx ecx, byte [rdx + rcx + 0x1afb8]
xor eax, ecx
and eax, 0x7fff
mov rcx, qword [rsp + 0x50]
mov dword [rcx + 0x6afc4], eax
mov rax, qword [rsp + 0x50]
mov eax, dword [rax + 0x6afc4]
mov rcx, qword [rsp + 0x50]
mov eax, dword [rcx + rax*4 + 0x4afb8]
mov dword [rsp + 0x24], eax
mov rax, qword [rsp + 0x50]
mov eax, dword [rax + 0x6afcc]
and eax, 0x7fff
mov eax, eax
mov rcx, qword [rsp + 0x50]
mov edx, dword [rsp + 0x24]
mov dword [rcx + rax*4 + 0x2afb8], edx
mov rax, qword [rsp + 0x50]
mov eax, dword [rax + 0x6afc4]
mov rcx, qword [rsp + 0x50]
mov rdx, qword [rsp + 0x50]
mov edx, dword [rdx + 0x6afcc]
mov dword [rcx + rax*4 + 0x4afb8], edx
mov eax, dword [rsp + 0x20]
dec eax
mov dword [rsp + 0x20], eax
cmp dword [rsp + 0x20], 0
jne 0x180019b81
mov rax, qword [rsp + 0x50]
mov eax, dword [rax + 0x6afcc]
inc eax
mov rcx, qword [rsp + 0x50]
mov dword [rcx + 0x6afcc], eax
jmp 0x180019ce8
mov rax, qword [rsp + 0x50]
mov eax, dword [rax + 0x6afcc]
add eax, dword [rsp + 0x20]
mov rcx, qword [rsp + 0x50]
mov dword [rcx + 0x6afcc], eax
mov dword [rsp + 0x20], 0
mov rax, qword [rsp + 0x50]
mov eax, dword [rax + 0x6afcc]
mov rcx, qword [rsp + 0x50]
movzx eax, byte [rcx + rax + 0x1afb8]
mov rcx, qword [rsp + 0x50]
mov dword [rcx + 0x6afc4], eax
mov rax, qword [rsp + 0x50]
mov eax, dword [rax + 0x6afc4]
shl eax, 5
mov rcx, qword [rsp + 0x50]
mov ecx, dword [rcx + 0x6afcc]
inc ecx
mov ecx, ecx
mov rdx, qword [rsp + 0x50]
movzx ecx, byte [rdx + rcx + 0x1afb8]
xor eax, ecx
and eax, 0x7fff
mov rcx, qword [rsp + 0x50]
mov dword [rcx + 0x6afc4], eax
jmp 0x180019d45
mov rax, qword [rsp + 0x50]
mov eax, dword [rax + 0x6afcc]
mov rcx, qword [rsp + 0x50]
movzx eax, byte [rcx + rax + 0x1afb8]
mov r8d, eax
xor edx, edx
mov rcx, qword [rsp + 0x50]
call fcn.180018310
mov dword [rsp + 0x28], eax
mov rax, qword [rsp + 0x50]
mov eax, dword [rax + 0x6afd8]
dec eax
mov rcx, qword [rsp + 0x50]
mov dword [rcx + 0x6afd8], eax
mov rax, qword [rsp + 0x50]
mov eax, dword [rax + 0x6afcc]
inc eax
mov rcx, qword [rsp + 0x50]
mov dword [rcx + 0x6afcc], eax
cmp dword [rsp + 0x28], 0
je 0x180019dc5
mov rax, qword [rsp + 0x50]
cmp dword [rax + 0x6afbc], 0
jl 0x180019d79
mov rax, qword [rsp + 0x50]
mov eax, dword [rax + 0x6afbc]
mov rcx, qword [rsp + 0x50]
lea rax, [rcx + rax + 0x1afb8]
mov qword [rsp + 0x30], rax
jmp 0x180019d82
mov qword [rsp + 0x30], 0
mov rax, qword [rsp + 0x50]
mov rcx, qword [rsp + 0x50]
mov ecx, dword [rcx + 0x6afbc]
mov eax, dword [rax + 0x6afcc]
sub eax, ecx
xor r9d, r9d
mov r8d, eax
mov rdx, qword [rsp + 0x30]
mov rcx, qword [rsp + 0x50]
call fcn.180017fc0
mov rax, qword [rsp + 0x50]
mov rcx, qword [rsp + 0x50]
mov ecx, dword [rcx + 0x6afcc]
mov dword [rax + 0x6afbc], ecx
mov rax, qword [rsp + 0x50]
cmp dword [rax + 0x6afd8], 0x106
jae 0x180019de0
mov rcx, qword [rsp + 0x50]
call fcn.180019710
jmp 0x1800199b8
mov rax, qword [rsp + 0x50]
cmp dword [rax + 0x6afbc], 0
jl 0x180019e12
mov rax, qword [rsp + 0x50]
mov eax, dword [rax + 0x6afbc]
mov rcx, qword [rsp + 0x50]
lea rax, [rcx + rax + 0x1afb8]
mov qword [rsp + 0x38], rax
jmp 0x180019e1b
mov qword [rsp + 0x38], 0
mov rax, qword [rsp + 0x50]
mov rcx, qword [rsp + 0x50]
mov ecx, dword [rcx + 0x6afbc]
mov eax, dword [rax + 0x6afcc]
sub eax, ecx
mov r9d, 1
mov r8d, eax
mov rdx, qword [rsp + 0x38]
mov rcx, qword [rsp + 0x50]
call fcn.180017fc0
add rsp, 0x48
ret