Function at 0x5838a0
Capabilities:
Encode data using xor

Disassembly:
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0xb40
xor eax, eax
lea rbp, [rsp + 0x8f]
mov rbx, rcx
mov ecx, 0xc8
mov r13, rdx
and rbp, 0xffffffffffffffc0
movsxd rsi, r8d
lea r12, [rbp + 0x640]
mov rdi, rbp
shl rsi, 7
rep stosq qword [rdi], rax
mov rcx, r12
call fcn.00436f50
mov r8d, 0x50
mov rdx, r13
mov rcx, r12
call fcn.00436fb0
mov rdx, rbp
mov rcx, r12
lea r13, [rbp + 0x40]
call fcn.004370c0
mov rcx, r12
call fcn.0044f920
mov r8d, 0x40
mov rdx, rbp
mov rcx, r12
call fcn.0044f9b0
mov rdx, r13
mov rcx, r12
call fcn.0044faf0
mov rcx, r12
call fcn.0046fc10
mov r8d, 0x40
mov rdx, r13
mov rcx, r12
call fcn.0046fc70
lea r13, [rbp + 0x80]
mov rcx, r12
mov rdx, r13
call fcn.0046fc80
mov rcx, r12
call fcn.0054bcc0
mov r8d, 0x40
mov rdx, r13
mov rcx, r12
call fcn.0054bd00
lea r13, [rbp + 0xc0]
mov rcx, r12
mov rdx, r13
call fcn.0054bd10
mov rcx, r12
call fcn.004af080
mov r8d, 0x40
mov rdx, r13
mov rcx, r12
call fcn.004af100
lea r13, [rbp + 0x100]
mov rcx, r12
mov rdx, r13
call fcn.004af110
mov rcx, r12
call fcn.004bee40
mov rdx, r13
mov r8d, 0x40
mov rcx, r12
call fcn.004beec0
lea r13, [rbp + 0x140]
mov rcx, r12
mov rdx, r13
call fcn.004beed0
mov rdi, qword [0x00664b80]
mov rax, qword [rdi]
add rax, rsi
movzx eax, byte [rax]
test al, al
je 0x5839fe
xor eax, eax
add rsp, 0xb40
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
ret
mov edx, 0x200
mov rcx, r12
lea r14, [rbp + 0x180]
call fcn.004dac50
mov r9, r13
mov rdx, r14
mov rcx, r12
mov qword [rsp + 0x20], 0x40
mov r8d, 0x200
lea r13, [rbp + 0x1c0]
call fcn.004db190
mov r9d, 0x20
mov edx, 0x200
mov rcx, r12
mov r8d, 0x10
call fcn.00459650
mov r8, r14
mov rdx, r13
mov rcx, r12
mov r9d, 0x40
lea r14, [rbp + 0x200]
call fcn.00459900
mov rcx, r12
call fcn.005351a0
mov r8d, 0x40
mov rdx, r13
mov rcx, r12
call fcn.00535200
lea r13, [rbp + 0x240]
mov rdx, r14
mov rcx, r12
call fcn.005352c0
mov rdx, r13
mov r8, r14
mov rcx, r12
mov r9d, 0x200
call fcn.00536e40
mov rcx, r12
call fcn.004672b0
mov rdx, r13
mov r8d, 0x40
mov rcx, r12
call fcn.00467310
lea r13, [rbp + 0x280]
mov rcx, r12
mov rdx, r13
call fcn.00467320
mov rax, qword [rdi]
add rax, rsi
movzx eax, byte [rax]
test al, al
jne 0x5839ea
mov rcx, r12
lea r14, [rbp + 0x340]
call fcn.004857f0
mov r8d, 0x40
mov rdx, r13
mov rcx, r12
call fcn.00485840
lea r13, [rbp + 0x2c0]
mov rcx, r12
mov rdx, r13
call fcn.00485900
mov rcx, r12
call fcn.00479520
mov r8d, 0x40
mov rdx, r13
mov rcx, r12
call fcn.004795c0
lea r13, [rbp + 0x300]
mov rcx, r12
mov rdx, r13
call fcn.004795d0
mov rcx, r12
call fcn.0052c1b0
mov r8d, 0x40
mov rdx, r13
mov rcx, r12
call fcn.0052c270
mov rdx, r14
mov rcx, r12
call fcn.0052c280
mov rcx, r12
call fcn.005719b0
mov r8d, 0x40
mov rdx, r14
mov rcx, r12
call fcn.00571a00
lea r14, [rbp + 0x380]
mov rcx, r12
mov rdx, r14
call fcn.00572060
mov rcx, r12
call fcn.0050c700
mov r8d, 0x40
mov rdx, r14
mov rcx, r12
call fcn.0050c750
lea r14, [rbp + 0x400]
lea rdx, [rbp + 0x3c0]
mov rcx, r12
call fcn.0050cdf0
mov rdx, r14
mov rcx, r13
lea r13, [rbp + 0x440]
call fcn.00569710
mov rcx, r12
call fcn.0049f210
mov r8d, 0x40
mov rdx, r14
mov rcx, r12
call fcn.0049f250
mov rdx, r13
mov rcx, r12
call fcn.0049f260
add rsi, qword [rdi]
movzx eax, byte [rsi]
test al, al
jne 0x5839ea
mov rcx, r12
lea rsi, [rbp + 0x480]
lea r14, [rbp + 0x500]
call fcn.0056b0d0
mov r8d, 0x40
mov rdx, r13
mov rcx, r12
call fcn.0056b0f0
mov rdx, rsi
mov rcx, r12
lea r13, [rbp + 0x4c0]
call fcn.0056b300
mov qword [rsp + 0x20], rsi
mov r8, rsi
mov rcx, r13
mov qword [rsp + 0x40], 4
mov r9d, 0x20
mov edx, 0x20
lea rsi, [rbp + 0x5fe]
mov qword [rsp + 0x38], 4
mov qword [rsp + 0x30], 1
mov qword [rsp + 0x28], 0x20
call fcn.004e2620
mov rcx, r12
call fcn.004688e0
mov r8d, 0x40
mov rdx, r13
mov rcx, r12
call fcn.004688f0
lea r13, [rbp + 0x540]
mov rdx, r14
mov rcx, r12
call fcn.00468960
mov r8d, 0x40
mov rdx, r14
mov rcx, r13
call fcn.0050bec0
mov rcx, r12
call fcn.004f0090
mov r8d, 0x40
mov rdx, r13
mov rcx, r12
call fcn.004f0140
lea r13, [rbp + 0x580]
mov rcx, r12
mov rdx, r13
call fcn.004f0800
lea r9, [rbp + 0x5c0]
mov r8d, 0x200
mov rdx, r13
mov ecx, 0x200
call fcn.004d8220
lea r11, [0x0065f630]
lea rdi, [r11 + 0x18]
movzx r10d, word [r11]
mov r9, rsi
mov r8, rbp
xor edx, edx
nop dword [rax + rax]
movzx eax, word [r9]
mov r14d, r10d
sub r9, 2
mov ecx, eax
imul eax, eax, 0xaaab
shr eax, 0x19
lea eax, [rax + rax*2]
shl eax, 8
sub ecx, eax
movzx eax, cx
mov ecx, edx
add edx, 1
and ecx, 0xf
shl r14d, cl
mov ecx, r14d
add cx, word [rbp + rax*2]
xor word [r8], cx
add r8, 2
cmp edx, 0x300
jne 0x583d20
add r11, 2
cmp rdi, r11
jne 0x583d0f
mov dword [rsp + 0x28], 0
lea rsi, [rbp + 0x600]
mov rdx, rbp
xor r8d, r8d
mov qword [rsp + 0x20], 0x600
mov r9d, 0x20
mov rcx, rsi
call fcn.00445770
mov rax, qword [rbp + 0x600]
mov rdx, qword [rbp + 0x608]
mov qword [rbx], rax
mov rax, qword [rbp + 0x610]
mov qword [rbx + 8], rdx
mov rdx, qword [rbp + 0x618]
mov qword [rbx + 0x10], rax
mov eax, 1
mov qword [rbx + 0x18], rdx
jmp 0x5839ec