Function at 0x180059e4c
Capabilities:
Encode data using xor

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], r8
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x50
xor edi, edi
mov r15, r8
mov r9, rdx
mov rbx, rcx
cmp byte [rcx + 8], dil
je 0x18005a15c
mov eax, dword [rcx + 0x3d0]
cmp eax, 0x10
jne 0x180059e8f
call fcn.1800596e4
jmp 0x18005a15c
cdq
lea r8, [rbx + 0x458]
and edx, 3
mov rcx, rdi
add eax, edx
sar eax, 2
movsxd rbp, eax
lea rax, [0x180000000]
cmp ebp, 6
mov rsi, rbp
setne cl
inc rcx
cmp ebp, 4
cmove rcx, rdi
shl rcx, 5
mov r14d, dword [rcx + rax + 0x27a08c]
mov r12d, dword [rcx + rax + 0x27a094]
mov r11d, dword [rcx + rax + 0x27a09c]
mov dword [rsp + 0x24], r14d
mov dword [rsp + 0x28], r12d
mov dword [rsp + 0x90], r11d
test ebp, ebp
jle 0x180059f45
lea r10, [rbx + 0x1ec]
mov r13, rbp
movzx eax, byte [r9]
mov rdx, r8
shl eax, 0x18
lea r9, [r9 + 4]
mov dword [r8], eax
movzx ecx, byte [r9 - 3]
shl ecx, 0x10
or ecx, eax
mov dword [r8], ecx
movzx eax, byte [r9 - 2]
shl eax, 8
or eax, ecx
mov dword [r8], eax
movzx ecx, byte [r9 - 1]
or ecx, eax
mov dword [r8], ecx
add r8, 4
mov eax, dword [r10]
lea r10, [r10 + 4]
xor eax, ecx
mov dword [rdx], eax
sub r13, 1
jne 0x180059efb
mov r13d, 1
cmp dword [rbx + 0x3d4], r13d
jle 0x18005a085
mov eax, ebp
mov r10d, 0x22c
shl eax, 2
mov r15d, r11d
cdqe
mov qword [rsp + 0x48], rax
lea rax, [rbx + 0x20c]
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x38], r10
test rsi, rsi
jle 0x18005a031
mov r11d, r12d
sub r11d, r14d
mov rdi, rsi
sub r15d, r14d
mov esi, r14d
lea r14, [0x180000000]
mov r12, rax
lea eax, [rsi + r11]
cdq
idiv ebp
movsxd rax, edx
mov ecx, dword [rbx + rax*4 + 0x458]
lea eax, [rsi + r15]
cdq
sar rcx, 8
idiv ebp
movzx r8d, cl
movsxd rax, edx
mov r9d, dword [r14 + r8*4 + 0x27b500]
movzx ecx, byte [rbx + rax*4 + 0x458]
mov eax, esi
cdq
inc esi
idiv ebp
xor r9d, dword [r14 + rcx*4 + 0x27b100]
movsxd rax, edx
mov ecx, dword [rbx + rax*4 + 0x458]
sar rcx, 0x10
movzx eax, cl
xor r9d, dword [r14 + rax*4 + 0x27b900]
movzx eax, byte [r10 + r12 + 0x23]
xor r9d, dword [r14 + rax*4 + 0x27bd00]
xor r9d, dword [r12]
mov dword [r10 + r12], r9d
lea r12, [r12 + 4]
sub rdi, 1
jne 0x180059fa0
mov r14d, dword [rsp + 0x24]
mov rsi, rbp
mov r12d, dword [rsp + 0x28]
mov r15d, dword [rsp + 0x90]
mov r8, qword [rsp + 0x48]
lea rdx, [rbx + 0x438]
lea rcx, [rbx + 0x458]
call fcn.1801c2370
mov rax, qword [rsp + 0x30]
inc r13d
mov r10, qword [rsp + 0x38]
add rax, 0x20
sub r10, 0x20
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x38], r10
cmp r13d, dword [rbx + 0x3d4]
jl 0x180059f7e
mov r15, qword [rsp + 0xa0]
mov r11d, dword [rsp + 0x90]
test rsi, rsi
jle 0x18005a15c
sub r14d, r12d
lea r9, [rbx + 0x458]
sub r11d, r12d
lea r10, [0x180000000]
movsxd rax, dword [rbx + 0x3d4]
lea r9, [r9 + 4]
lea rcx, [rdi + rax*8]
movzx eax, byte [r9 - 1]
mov r8d, dword [rbx + rcx*4 + 0x1ec]
inc rdi
mov ecx, r8d
sar ecx, 0x18
mov al, byte [rax + r10 + 0x27d100]
xor al, cl
mov byte [r15], al
lea eax, [r14 + r12]
cdq
lea r15, [r15 + 4]
idiv ebp
movsxd rax, edx
mov ecx, dword [rbx + rax*4 + 0x458]
sar rcx, 0x10
movzx eax, cl
mov ecx, r8d
sar ecx, 0x10
mov al, byte [rax + r10 + 0x27d100]
xor al, cl
mov byte [r15 - 3], al
mov eax, r12d
cdq
idiv ebp
movsxd rax, edx
mov ecx, dword [rbx + rax*4 + 0x458]
sar rcx, 8
movzx eax, cl
mov ecx, r8d
sar ecx, 8
mov al, byte [rax + r10 + 0x27d100]
xor al, cl
mov byte [r15 - 2], al
lea eax, [r11 + r12]
cdq
inc r12d
idiv ebp
movsxd rax, edx
movzx ecx, byte [rbx + rax*4 + 0x458]
mov al, byte [rcx + r10 + 0x27d100]
xor al, r8b
mov byte [r15 - 1], al
cmp rdi, rsi
jl 0x18005a0a2
mov rbx, qword [rsp + 0x98]
add rsp, 0x50
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret