Function at 0x1800596e4
Capabilities:
Encode data using xor

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rbp
mov qword [rax + 0x20], rsi
mov qword [rax + 0x18], r8
push rdi
push r12
push r13
push r14
push r15
cmp byte [rcx + 8], 0
mov r12, r8
mov rbp, rcx
je 0x180059b12
movzx ebx, byte [rdx]
lea r15, [0x180000000]
movsxd r14, dword [rbp + 0x3d4]
mov r8d, 1
add rdx, r8
shl ebx, 0x18
movzx eax, byte [rdx]
add rdx, r8
shl eax, 0x10
or ebx, eax
movzx eax, byte [rdx]
add rdx, r8
shl eax, 8
or ebx, eax
movzx eax, byte [rdx]
add rdx, r8
or ebx, eax
xor ebx, dword [rcx + 0x1ec]
movzx edi, byte [rdx]
add rdx, r8
shl edi, 0x18
movzx eax, byte [rdx]
add rdx, r8
shl eax, 0x10
or edi, eax
movzx eax, byte [rdx]
add rdx, r8
shl eax, 8
or edi, eax
movzx eax, byte [rdx]
add rdx, r8
or edi, eax
xor edi, dword [rcx + 0x1f0]
movzx esi, byte [rdx]
add rdx, r8
shl esi, 0x18
movzx eax, byte [rdx]
add rdx, r8
shl eax, 0x10
or esi, eax
movzx eax, byte [rdx]
add rdx, r8
shl eax, 8
or esi, eax
movzx eax, byte [rdx]
add rdx, r8
or esi, eax
xor esi, dword [rcx + 0x1f4]
movzx ecx, byte [rdx]
add rdx, r8
shl ecx, 0x18
movzx eax, byte [rdx]
movzx r9d, byte [rdx + r8]
shl r9d, 8
shl eax, 0x10
or ecx, eax
movzx eax, byte [rdx + r8 + 1]
or r9d, eax
or r9d, ecx
xor r9d, dword [rbp + 0x1f8]
cmp r14, r8
jle 0x18005992a
lea r15, [rbp + 0x214]
lea r13, [r14 - 1]
lea r12, [0x180000000]
movsxd r11, ebx
movsxd r9, r9d
mov rax, r11
sar rax, 0x18
movzx edx, al
mov rax, r9
sar rax, 0x10
movzx ecx, al
movsxd r10, esi
mov ebx, dword [r12 + rdx*4 + 0x27bd00]
mov rax, r10
sar rax, 8
xor ebx, dword [r12 + rcx*4 + 0x27b900]
movzx ecx, al
movsxd r8, edi
movzx eax, r8b
xor ebx, dword [r12 + rcx*4 + 0x27b500]
xor ebx, dword [r12 + rax*4 + 0x27b100]
mov rax, r11
xor ebx, dword [r15 - 8]
sar rax, 0x10
movzx edx, al
mov rax, r8
sar rax, 0x18
movzx ecx, al
mov rax, r9
sar rax, 8
mov edi, dword [r12 + rdx*4 + 0x27b900]
xor edi, dword [r12 + rcx*4 + 0x27bd00]
movzx ecx, al
movzx eax, r10b
xor edi, dword [r12 + rcx*4 + 0x27b500]
xor edi, dword [r12 + rax*4 + 0x27b100]
mov rax, r11
xor edi, dword [r15 - 4]
sar rax, 8
movzx edx, al
mov rax, r8
sar rax, 0x10
movzx ecx, al
mov rax, r10
sar rax, 0x18
mov esi, dword [r12 + rdx*4 + 0x27b500]
sar r8, 8
xor esi, dword [r12 + rcx*4 + 0x27b900]
movzx ecx, al
movzx eax, r9b
sar r9, 0x18
sar r10, 0x10
xor esi, dword [r12 + rcx*4 + 0x27bd00]
xor esi, dword [r12 + rax*4 + 0x27b100]
xor esi, dword [r15]
lea r15, [r15 + 0x20]
movzx eax, r9b
movzx ecx, r8b
mov r9d, dword [r12 + rcx*4 + 0x27b500]
xor r9d, dword [r12 + rax*4 + 0x27bd00]
movzx eax, r10b
xor r9d, dword [r12 + rax*4 + 0x27b900]
movzx eax, r11b
xor r9d, dword [r12 + rax*4 + 0x27b100]
xor r9d, dword [r15 - 0x1c]
sub r13, 1
jne 0x1800597f3
mov r12, qword [rsp + 0x40]
lea r15, [0x180000000]
shl r14, 5
movsxd rbx, ebx
movsxd r11, r9d
mov rax, rbx
sar rax, 0x18
mov r8d, dword [r14 + rbp + 0x1ec]
mov ecx, r8d
movzx edx, al
sar ecx, 0x18
movsxd r10, esi
movsxd r9, edi
mov al, byte [rdx + r15 + 0x27d100]
xor al, cl
mov ecx, r8d
mov byte [r12], al
mov rax, r11
sar rax, 0x10
movzx edx, al
sar ecx, 0x10
mov al, byte [rdx + r15 + 0x27d100]
xor al, cl
mov ecx, r8d
mov byte [r12 + 1], al
mov rax, r10
sar rax, 8
movzx edx, al
sar ecx, 8
mov al, byte [rdx + r15 + 0x27d100]
xor al, cl
mov byte [r12 + 2], al
movzx eax, r9b
mov al, byte [rax + r15 + 0x27d100]
xor al, r8b
mov byte [r12 + 3], al
mov rax, r9
mov r8d, dword [r14 + rbp + 0x1f0]
mov ecx, r8d
sar rax, 0x18
movzx edx, al
sar ecx, 0x18
mov al, byte [rdx + r15 + 0x27d100]
xor al, cl
mov ecx, r8d
mov byte [r12 + 4], al
mov rax, rbx
sar rax, 0x10
movzx edx, al
sar ecx, 0x10
mov al, byte [rdx + r15 + 0x27d100]
xor al, cl
mov ecx, r8d
mov byte [r12 + 5], al
mov rax, r11
sar rax, 8
movzx edx, al
sar ecx, 8
mov al, byte [rdx + r15 + 0x27d100]
xor al, cl
mov byte [r12 + 6], al
movzx eax, r10b
mov al, byte [rax + r15 + 0x27d100]
xor al, r8b
mov byte [r12 + 7], al
mov rax, r10
mov r8d, dword [r14 + rbp + 0x1f4]
mov ecx, r8d
sar rax, 0x18
movzx edx, al
sar ecx, 0x18
mov al, byte [rdx + r15 + 0x27d100]
xor al, cl
mov ecx, r8d
mov byte [r12 + 8], al
mov rax, r9
sar rax, 0x10
movzx edx, al
sar ecx, 0x10
mov al, byte [rdx + r15 + 0x27d100]
xor al, cl
mov byte [r12 + 9], al
mov rax, rbx
sar rax, 8
mov ecx, r8d
movzx edx, al
sar ecx, 8
sar r10, 0x10
sar r9, 8
mov al, byte [rdx + r15 + 0x27d100]
xor al, cl
mov byte [r12 + 0xa], al
movzx eax, r11b
sar r11, 0x18
mov al, byte [rax + r15 + 0x27d100]
xor al, r8b
mov byte [r12 + 0xb], al
mov edx, dword [r14 + rbp + 0x1f8]
mov ecx, edx
sar ecx, 0x18
movzx eax, r11b
mov al, byte [rax + r15 + 0x27d100]
xor al, cl
mov ecx, edx
mov byte [r12 + 0xc], al
sar ecx, 0x10
movzx eax, r10b
mov al, byte [rax + r15 + 0x27d100]
xor al, cl
mov ecx, edx
mov byte [r12 + 0xd], al
movzx eax, r9b
sar ecx, 8
mov al, byte [rax + r15 + 0x27d100]
xor al, cl
mov byte [r12 + 0xe], al
movzx eax, bl
mov al, byte [rax + r15 + 0x27d100]
xor al, dl
mov byte [r12 + 0xf], al
mov rbx, qword [rsp + 0x30]
mov rbp, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x48]
pop r15
pop r14
pop r13
pop r12
pop rdi
ret