Function at 0x58c670
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.004356f0
mov r8d, 0x50
mov rdx, r13
mov rcx, r12
call fcn.00435750
mov rdx, rbp
mov rcx, r12
lea r13, [rbp + 0x40]
call fcn.00435860
mov rcx, r12
call fcn.0044c8a0
mov r8d, 0x40
mov rdx, rbp
mov rcx, r12
call fcn.0044c930
mov rdx, r13
mov rcx, r12
call fcn.0044ca70
mov rcx, r12
call fcn.0046cca0
mov r8d, 0x40
mov rdx, r13
mov rcx, r12
call fcn.0046cd00
lea r13, [rbp + 0x80]
mov rcx, r12
mov rdx, r13
call fcn.0046cd10
mov rcx, r12
call fcn.00550220
mov r8d, 0x40
mov rdx, r13
mov rcx, r12
call fcn.00550260
lea r13, [rbp + 0xc0]
mov rcx, r12
mov rdx, r13
call fcn.00550270
mov rcx, r12
call fcn.004ab800
mov r8d, 0x40
mov rdx, r13
mov rcx, r12
call fcn.004ab880
lea r13, [rbp + 0x100]
mov rcx, r12
mov rdx, r13
call fcn.004ab890
mov rcx, r12
call fcn.004bb1f0
mov rdx, r13
mov r8d, 0x40
mov rcx, r12
call fcn.004bb270
lea r13, [rbp + 0x140]
mov rcx, r12
mov rdx, r13
call fcn.004bb280
mov rdi, qword [0x0063fef0]
mov rax, qword [rdi]
add rax, rsi
movzx eax, byte [rax]
test al, al
je 0x58c7ce
xor eax, eax
add rsp, 0xb40
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
ret
mov qword [rsp + 0x20], 0x40
lea r14, [rbp + 0x180]
mov r9, r13
mov rcx, r12
mov rdx, r14
mov r8d, 0x200
lea r13, [rbp + 0x1c0]
call fcn.004d7c90
mov r9, r14
mov rdx, r13
mov rcx, r12
mov qword [rsp + 0x20], 0x40
mov r8d, 0x200
lea r14, [rbp + 0x200]
call fcn.00456b20
mov rcx, r12
call fcn.00535a20
mov r8d, 0x40
mov rdx, r13
mov rcx, r12
call fcn.00535a80
lea r13, [rbp + 0x240]
mov rdx, r14
mov rcx, r12
call fcn.00535b40
mov rdx, r13
mov r8, r14
mov rcx, r12
mov r9d, 0x40
call fcn.0054d7b0
mov rcx, r12
call fcn.00464340
mov rdx, r13
mov r8d, 0x40
mov rcx, r12
call fcn.004643a0
lea r13, [rbp + 0x280]
mov rcx, r12
mov rdx, r13
call fcn.004643b0
mov rax, qword [rdi]
add rax, rsi
movzx eax, byte [rax]
test al, al
jne 0x58c7ba
mov rcx, r12
lea r14, [rbp + 0x340]
call fcn.00482880
mov r8d, 0x40
mov rdx, r13
mov rcx, r12
call fcn.004828d0
lea r13, [rbp + 0x2c0]
mov rcx, r12
mov rdx, r13
call fcn.00482990
mov rcx, r12
call fcn.004765b0
mov r8d, 0x40
mov rdx, r13
mov rcx, r12
call fcn.00476650
lea r13, [rbp + 0x300]
mov rcx, r12
mov rdx, r13
call fcn.00476660
mov rcx, r12
call fcn.00523af0
mov r8d, 0x40
mov rdx, r13
mov rcx, r12
call fcn.00523bb0
mov rdx, r14
mov rcx, r12
call fcn.00523bc0
mov rcx, r12
call fcn.00576520
mov r8d, 0x40
mov rdx, r14
mov rcx, r12
call fcn.00576570
lea r14, [rbp + 0x380]
mov rcx, r12
mov rdx, r14
call fcn.00576bd0
mov rcx, r12
call fcn.0050af60
mov r8d, 0x40
mov rdx, r14
mov rcx, r12
call fcn.0050afb0
lea r14, [rbp + 0x400]
lea rdx, [rbp + 0x3c0]
mov rcx, r12
call fcn.0050b650
mov rdx, r14
mov rcx, r13
lea r13, [rbp + 0x440]
call fcn.0056e280
mov rcx, r12
call fcn.0049c2a0
mov r8d, 0x40
mov rdx, r14
mov rcx, r12
call fcn.0049c2e0
mov rdx, r13
mov rcx, r12
call fcn.0049c2f0
add rsi, qword [rdi]
movzx eax, byte [rsi]
test al, al
jne 0x58c7ba
mov rcx, r12
lea rsi, [rbp + 0x480]
lea r14, [rbp + 0x500]
call fcn.0056fc40
mov r8d, 0x40
mov rdx, r13
mov rcx, r12
call fcn.0056fc60
mov rdx, rsi
mov rcx, r12
lea r13, [rbp + 0x4c0]
call fcn.0056fe70
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.004df0f0
mov rcx, r12
call fcn.00465970
mov r8d, 0x40
mov rdx, r13
mov rcx, r12
call fcn.00465980
lea r13, [rbp + 0x540]
mov rdx, r14
mov rcx, r12
call fcn.004659f0
mov r8d, 0x40
mov rdx, r14
mov rcx, r13
call fcn.0050a720
mov rcx, r12
call fcn.004ec020
mov r8d, 0x40
mov rdx, r13
mov rcx, r12
call fcn.004ec0d0
lea r13, [rbp + 0x580]
mov rcx, r12
mov rdx, r13
call fcn.004ec790
lea r9, [rbp + 0x5c0]
mov r8d, 0x200
mov rdx, r13
mov ecx, 0x200
call fcn.004d4d80
lea r11, [0x0063a9d0]
lea rdi, [r11 + 0x18]
movzx r10d, word [r11]
mov r9, rsi
mov r8, rbp
xor edx, edx
nop
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 0x58cad0
add r11, 2
cmp rdi, r11
jne 0x58cac2
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.00442940
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 0x58c7bc