Function at 0x599520
Capabilities:
Encode data using xor

Disassembly:
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0xb40
lea rsi, [rsp + 0x8f]
mov r13, rdx
movsxd rdi, r8d
and rsi, 0xffffffffffffffc0
mov r8d, 0x640
xor edx, edx
lea r12, [rsi + 0x640]
mov rbx, rcx
mov rcx, rsi
call sub.msvcrt.dll_memset
lea rbp, [rsi + 0x40]
mov rcx, r12
shl rdi, 7
call fcn.00433a00
mov r8d, 0x50
mov rdx, r13
mov rcx, r12
call fcn.00433a60
mov rdx, rsi
mov rcx, r12
call fcn.00433b70
lea r13, [rsi + 0x80]
mov rcx, r12
call fcn.0044a190
mov r8d, 0x40
mov rdx, rsi
mov rcx, r12
call fcn.0044a220
mov rdx, rbp
mov rcx, r12
call fcn.0044a360
mov r8, rbp
mov rdx, r13
mov rcx, r12
mov r9d, 0x200
call fcn.004704f0
mov rcx, r12
call fcn.005610c0
mov r8d, 0x40
mov rdx, r13
mov rcx, r12
call fcn.00561100
lea r13, [rsi + 0xc0]
mov rcx, r12
mov rdx, r13
call fcn.00561110
mov rcx, r12
call fcn.004c5df0
mov r8d, 0x40
mov rdx, r13
mov rcx, r12
call fcn.004c5e70
lea r13, [rsi + 0x100]
mov rcx, r12
mov rdx, r13
call fcn.004c5e80
mov rcx, r12
call fcn.004d5770
mov rdx, r13
mov r8d, 0x40
mov rcx, r12
call fcn.004d57d0
lea r13, [rsi + 0x140]
mov rcx, r12
mov rdx, r13
call fcn.004d57e0
mov rbp, qword [0x0064ba90]
mov rax, qword [rbp]
add rax, rdi
movzx eax, byte [rax]
test al, al
je 0x599672
xor eax, eax
add rsp, 0xb40
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
ret
lea r14, [rsi + 0x180]
mov r9, r13
mov r8d, 0x200
mov qword [rsp + 0x20], 0x40
lea r13, [rsi + 0x1c0]
mov rdx, r14
mov rcx, r12
call fcn.004f1b10
mov r9, r14
mov rdx, r13
mov rcx, r12
mov qword [rsp + 0x20], 0x40
mov r8d, 0x200
call fcn.00454010
lea r14, [rsi + 0x200]
mov rcx, r12
call fcn.00546a10
mov r8d, 0x40
mov rdx, r13
mov rcx, r12
call fcn.00546a70
lea r13, [rsi + 0x240]
mov rdx, r14
mov rcx, r12
call fcn.00546b30
mov r8, r14
mov rdx, r13
mov rcx, r12
lea r14, [rsi + 0x280]
mov r9d, 0x40
call fcn.0055e750
mov r9, r13
mov rdx, r14
mov rcx, r12
mov dword [rsp + 0x20], 0x40
mov r8d, 0x200
call fcn.004651b0
mov rax, qword [rbp]
add rax, rdi
movzx eax, byte [rax]
test al, al
jne 0x59965e
lea r13, [rsi + 0x300]
mov rcx, r12
call fcn.0048fc90
mov r8d, 0x40
mov rdx, r14
mov rcx, r12
call fcn.0048fce0
lea r14, [rsi + 0x2c0]
mov rcx, r12
mov rdx, r14
call fcn.0048fda0
mov r8, r14
mov rdx, r13
mov rcx, r12
lea r14, [rsi + 0x340]
mov r9d, 0x40
call fcn.004837e0
mov rcx, r12
call fcn.0053d1b0
mov r8d, 0x40
mov rdx, r13
mov rcx, r12
call fcn.0053d270
mov rdx, r14
mov rcx, r12
call fcn.0053d280
mov rcx, r12
call fcn.005849d0
mov r8d, 0x40
mov rdx, r14
mov rcx, r12
call fcn.00584a20
lea r14, [rsi + 0x380]
mov rcx, r12
mov rdx, r14
call fcn.00585050
mov rcx, r12
call fcn.00525710
mov r8d, 0x40
mov rdx, r14
mov rcx, r12
call fcn.00525760
lea r14, [rsi + 0x400]
mov rcx, r12
lea rdx, [rsi + 0x3c0]
call fcn.00525d50
mov rdx, r14
mov rcx, r13
call fcn.0057cdb0
lea r13, [rsi + 0x440]
mov rcx, r12
call fcn.004b65c0
mov r8d, 0x40
mov rdx, r14
mov rcx, r12
call fcn.004b6600
mov rdx, r13
mov rcx, r12
call fcn.004b6610
add rdi, qword [rbp]
movzx eax, byte [rdi]
test al, al
jne 0x59965e
lea rdi, [rsi + 0x480]
mov rcx, r12
call fcn.0057e300
mov r8d, 0x40
mov rdx, r13
mov rcx, r12
call fcn.0057e320
mov rdx, rdi
mov rcx, r12
call fcn.0057e520
mov r9d, 0x20
mov r8, rdi
mov edx, 0x20
lea r13, [rsi + 0x4c0]
mov qword [rsp + 0x20], rdi
mov qword [rsp + 0x40], 4
mov rcx, r13
mov qword [rsp + 0x38], 4
lea r14, [rsi + 0x500]
mov qword [rsp + 0x30], 1
lea rdi, [rsi + 0x5fe]
mov qword [rsp + 0x28], 0x20
call fcn.004f8f70
mov rcx, r12
call fcn.00466450
mov r8d, 0x40
mov rdx, r13
mov rcx, r12
call fcn.00466460
lea r13, [rsi + 0x540]
mov rdx, r14
mov rcx, r12
call fcn.004664d0
mov r8d, 0x40
mov rdx, r14
mov rcx, r13
call fcn.00524ef0
mov rcx, r12
call fcn.00504820
mov r8d, 0x40
mov rdx, r13
mov rcx, r12
call fcn.005048c0
lea r13, [rsi + 0x580]
mov rcx, r12
mov rdx, r13
call fcn.00504f60
lea r9, [rsi + 0x5c0]
mov r8d, 0x200
mov rdx, r13
mov ecx, 0x200
call fcn.004eef40
lea r11, [0x00646550]
lea rbp, [r11 + 0x18]
movzx r10d, word [r11]
mov r9, rdi
mov r8, rsi
xor edx, edx
nop dword [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 [rsi + rax*2]
xor word [r8], cx
add r8, 2
cmp edx, 0x300
jne 0x599960
add r11, 2
cmp rbp, r11
jne 0x599950
lea rdi, [rsi + 0x600]
mov rdx, rsi
xor r8d, r8d
mov dword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0x600
mov r9d, 0x20
mov rcx, rdi
call fcn.00440850
mov rax, qword [rsi + 0x600]
mov rdx, qword [rsi + 0x608]
mov qword [rbx], rax
mov rax, qword [rsi + 0x610]
mov qword [rbx + 8], rdx
mov rdx, qword [rsi + 0x618]
mov qword [rbx + 0x10], rax
mov eax, 1
mov qword [rbx + 0x18], rdx
jmp 0x599660