Function at 0x18005c520
Capabilities:
Encode data using xor

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
push rsi
push rdi
push r14
sub rsp, 0x50
xor esi, esi
mov dword [rsp + 0x70], esi
mov r9, qword [0x180148790]
mov rax, qword [r9 + 0x70]
mov rcx, qword [rax]
cmp dword [rcx + 0xb094], esi
jne 0x18005c716
mov rbp, qword [0x1801487c0]
nop dword [rax]
cmp byte [rbp + 0x172], sil
je 0x18005c716
mov rbp, qword [rbp + 0x178]
mov rax, qword [r9 + 0x80]
mov qword [rax], rbp
mov rax, qword [r9 + 0x70]
mov rcx, qword [rax]
mov rax, qword [rcx + 0xaa30]
test rax, rax
je 0x18005c598
mov qword [rax + 0x8b8], rbp
mov rax, qword [0x180148790]
mov rcx, qword [rax + 0x88]
mov qword [rcx + 0xc0], rbp
mov rax, qword [0x180148790]
mov rcx, qword [rax + 0x90]
mov qword [rcx + 0xc0], rbp
mov rax, qword [0x180148790]
mov rcx, qword [rax + 0x98]
mov rax, qword [rcx]
mov rcx, qword [rax + 0x2338]
mov qword [rcx + 0xc0], rbp
lea rdx, [rsp + 0x30]
call fcn.180059b80
nop
mov ecx, 1
mov dword [rsp + 0x70], ecx
cmp qword [rax], 0
je 0x18005c628
lea rdx, [rsp + 0x20]
call fcn.180059b80
mov ecx, 3
mov dword [rsp + 0x70], ecx
mov rax, qword [rax]
mov rdx, qword [rax]
test rdx, rdx
je 0x18005c628
cmp qword [rdx + 0xa8], 0
je 0x18005c628
mov r14b, 1
jmp 0x18005c62b
xor r14b, r14b
mov edi, 0xffffffff
test cl, 2
je 0x18005c673
and ecx, 0xfffffffd
mov dword [rsp + 0x70], ecx
mov rbx, qword [rsp + 0x28]
test rbx, rbx
je 0x18005c673
mov eax, edi
lock xadd dword [rbx + 8], eax
cmp eax, 1
jne 0x18005c66f
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax]
mov eax, edi
lock xadd dword [rbx + 0xc], eax
cmp eax, 1
jne 0x18005c66f
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax + 8]
mov ecx, dword [rsp + 0x70]
test cl, 1
je 0x18005c6ae
mov rbx, qword ds:[rsp + 0x38]
test rbx, rbx
je 0x18005c6ae
mov eax, edi
lock xadd dword [rbx + 8], eax
cmp eax, 1
jne 0x18005c6ae
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax]
mov eax, edi
lock xadd dword [rbx + 0xc], eax
cmp eax, 1
jne 0x18005c6ae
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax + 8]
test r14b, r14b
je 0x18005c70f
lea rdx, [rsp + 0x40]
call fcn.180059b80
mov rcx, qword [rax]
mov rax, qword [rcx]
test rax, rax
je 0x18005c6d4
mov rax, qword [rax + 0xa8]
test rax, rax
jne 0x18005c6d7
mov rax, rsi
mov qword [rax + 0xe0], rbp
mov rbx, qword [rsp + 0x48]
test rbx, rbx
je 0x18005c70f
mov eax, edi
lock xadd dword [rbx + 8], eax
cmp eax, 1
jne 0x18005c70f
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax]
lock xadd dword [rbx + 0xc], edi
cmp edi, 1
jne 0x18005c70f
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax + 8]
mov r9, qword [0x180148790]
mov rax, qword ds:[r9 + 0x60]
cmp byte [rax], 0
je 0x18005c7ef
lea r11, [0x1800c7680]
lea r10, str.freemode
nop dword [rax]
nop dword [rax + rax]
movzx r8d, byte [r10]
lea edx, [r8 - 0x41]
movzx eax, r8b
or al, 0x20
movzx ecx, al
cmp dl, 0x19
cmova ecx, r8d
movsx eax, cl
add eax, esi
imul esi, eax, 0x401
mov eax, esi
shr eax, 6
xor esi, eax
inc r10
cmp r10, r11
jne 0x18005c740
lea eax, [rsi + rsi*8]
mov ecx, eax
shr ecx, 0xb
xor ecx, eax
imul r10d, ecx, 0x8001
mov rax, qword [r9 + 0x50]
mov rcx, qword [rax]
movzx eax, word [rax + 8]
lea r8, [rcx + rax*8]
cmp rcx, r8
je 0x18005c7ef
mov rdx, qword [rcx]
test rdx, rdx
je 0x18005c7ab
cmp dword [rdx + 8], 0
je 0x18005c7ab
cmp dword [rdx + 0xc], r10d
je 0x18005c7b6
add rcx, 8
cmp rcx, r8
jne 0x18005c797
jmp 0x18005c7ef
mov rax, qword gs:[0x58]
mov rdi, qword [rax]
mov rbx, qword [rdi + 0x848]
mov qword [rdi + 0x848], rdx
mov byte [rdi + 0x850], 1
call fcn.18005c820
mov qword [rdi + 0x848], rbx
test rbx, rbx
setne al
mov byte [rdi + 0x850], al
mov rbx, qword [rsp + 0x78]
mov rbp, qword [rsp + 0x80]
add rsp, 0x50
pop r14
pop rdi
pop rsi
ret