Function at 0x180051a40
Capabilities:
Encode data using xor

Disassembly:
mov qword [rsp + 0x20], r9
mov qword [rsp + 0x18], r8
mov dword [rsp + 0x10], edx
mov qword [rsp + 8], rcx
sub rsp, 0x88
mov eax, 2
imul rax, rax, 0
mov rcx, qword [rsp + 0xa0]
movzx eax, word [rcx + rax]
mov dword [rsp + 0x38], eax
mov eax, dword [rsp + 0x38]
xor eax, 0x7ff
shr eax, 4
mov eax, eax
mov rcx, qword [rsp + 0xa8]
mov eax, dword [rcx + rax*4]
mov dword [rsp + 0x2c], eax
mov eax, dword [rsp + 0x38]
shr eax, 4
mov eax, eax
mov rcx, qword [rsp + 0xa8]
mov eax, dword [rcx + rax*4]
mov dword [rsp + 0x40], eax
mov eax, 2
imul rax, rax, 8
mov rcx, qword [rsp + 0xa0]
movzx eax, word [rcx + rax]
sar eax, 4
cdqe
mov rcx, qword [rsp + 0xa8]
mov eax, dword [rcx + rax*4]
mov ecx, dword [rsp + 0x2c]
add ecx, eax
mov eax, ecx
mov dword [rsp + 0x44], eax
mov dword [rsp + 0x24], 0
jmp 0x180051aed
mov eax, dword [rsp + 0x24]
inc eax
mov dword [rsp + 0x24], eax
mov eax, dword [rsp + 0x98]
cmp dword [rsp + 0x24], eax
jae 0x180051b77
mov eax, dword [rsp + 0x24]
imul rax, rax, 0x440
mov rcx, qword [rsp + 0x90]
lea rax, [rcx + rax + 4]
mov qword [rsp + 0x50], rax
mov eax, dword [rsp + 0x24]
shl eax, 4
mov eax, eax
mov rcx, qword [rsp + 0xa0]
lea rax, [rcx + rax*2]
mov qword [rsp + 0x58], rax
mov r9, qword [rsp + 0xa8]
mov r8, qword [rsp + 0x50]
mov edx, dword [rsp + 0x40]
mov rcx, qword [rsp + 0x58]
call fcn.180051910
mov rax, qword [rsp + 0x50]
add rax, 0x20
mov rcx, qword [rsp + 0x58]
add rcx, 0x10
mov r9, qword [rsp + 0xa8]
mov r8, rax
mov edx, dword [rsp + 0x44]
call fcn.180051910
jmp 0x180051ae3
mov rax, qword [rsp + 0x90]
mov eax, dword [rax]
mov dword [rsp + 0x20], eax
cmp dword [rsp + 0x20], 0x10
jbe 0x180051d6d
mov rax, qword [rsp + 0xa0]
add rax, 0x200
mov qword [rsp + 0x60], rax
mov eax, 0x440
imul rax, rax, 0
mov rcx, qword [rsp + 0x90]
lea rax, [rcx + rax + 0x44]
mov qword [rsp + 0x68], rax
mov eax, dword [rsp + 0x20]
sub eax, 0xf
mov dword [rsp + 0x20], eax
mov eax, dword [rsp + 0x20]
shr eax, 1
mov dword [rsp + 0x20], eax
mov eax, 2
imul rax, rax, 8
mov rcx, qword [rsp + 0xa0]
movzx eax, word [rcx + rax]
xor eax, 0x7ff
sar eax, 4
cdqe
mov rcx, qword [rsp + 0xa8]
mov eax, dword [rcx + rax*4]
mov ecx, dword [rsp + 0x2c]
add ecx, eax
mov eax, ecx
mov dword [rsp + 0x2c], eax
mov eax, dword [rsp + 0x20]
dec eax
mov dword [rsp + 0x20], eax
mov eax, dword [rsp + 0x20]
add eax, 0x80
mov dword [rsp + 0x28], eax
mov eax, dword [rsp + 0x2c]
mov dword [rsp + 0x30], eax
mov eax, dword [rsp + 0x28]
and eax, 1
mov dword [rsp + 0x48], eax
mov eax, dword [rsp + 0x28]
shr eax, 1
mov dword [rsp + 0x28], eax
mov eax, dword [rsp + 0x28]
mov rcx, qword [rsp + 0x60]
movzx eax, word [rcx + rax*2]
mov ecx, dword [rsp + 0x48]
neg ecx
and ecx, 0x7ff
xor eax, ecx
shr eax, 4
mov eax, eax
mov rcx, qword [rsp + 0xa8]
mov eax, dword [rcx + rax*4]
mov ecx, dword [rsp + 0x30]
add ecx, eax
mov eax, ecx
mov dword [rsp + 0x30], eax
cmp dword [rsp + 0x28], 2
jae 0x180051c28
mov eax, dword [rsp + 0x20]
mov rcx, qword [rsp + 0x60]
movzx eax, word [rcx + rax*2 + 0x100]
mov dword [rsp + 0x3c], eax
mov eax, dword [rsp + 0x3c]
shr eax, 4
mov eax, eax
mov rcx, qword [rsp + 0xa8]
mov eax, dword [rcx + rax*4]
mov ecx, dword [rsp + 0x30]
add ecx, eax
mov eax, ecx
mov ecx, dword [rsp + 0x20]
shl rcx, 1
mov rdx, qword [rsp + 0x68]
mov dword [rdx + rcx*4], eax
mov eax, dword [rsp + 0x3c]
xor eax, 0x7ff
shr eax, 4
mov eax, eax
mov rcx, qword [rsp + 0xa8]
mov eax, dword [rcx + rax*4]
mov ecx, dword [rsp + 0x30]
add ecx, eax
mov eax, ecx
mov ecx, dword [rsp + 0x20]
shl rcx, 1
mov rdx, qword [rsp + 0x68]
mov dword [rdx + rcx*4 + 4], eax
cmp dword [rsp + 0x20], 0
jne 0x180051c09
mov rax, qword [rsp + 0x90]
mov eax, dword [rax]
sub eax, 0x10
mov eax, eax
shl rax, 2
mov qword [rsp + 0x70], rax
mov dword [rsp + 0x34], 1
jmp 0x180051d23
mov eax, dword [rsp + 0x34]
inc eax
mov dword [rsp + 0x34], eax
mov eax, dword [rsp + 0x98]
cmp dword [rsp + 0x34], eax
jae 0x180051d6d
mov eax, 0x440
imul rax, rax, 0
mov rcx, qword [rsp + 0x90]
lea rax, [rcx + rax + 0x44]
mov ecx, dword [rsp + 0x34]
imul rcx, rcx, 0x440
mov rdx, qword [rsp + 0x90]
lea rcx, [rdx + rcx + 0x44]
mov r8, qword [rsp + 0x70]
mov rdx, rax
call fcn.18008f5a0
jmp 0x180051d19
add rsp, 0x88
ret