Function at 0x18000398c
Capabilities:
Encode data using xor

Disassembly:
mov qword [rsp + 0x20], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x160]
sub rsp, 0x260
mov eax, dword [rdx]
mov r14d, 0x50000
mov dword [rbp - 0x80], eax
mov r13, r9
mov r15, r8
mov rdi, rdx
mov ebx, ecx
mov r12d, 0x60000
mov esi, 0x10
cmp eax, r14d
jne 0x1800039e7
lea r14, [rdx + 4]
mov r8d, esi
mov rdx, r14
lea rcx, [rbp - 0x7c]
call qword [sym.imp.ntdll.dll_memcpy]
jmp 0x180003a3b
mov edx, esi
lea rcx, [rsp + 0x20]
call fcn.180003554
mov r8, rsi
mov dword [rbp + 0x1a8], esi
lea rdx, [rsp + 0x20]
lea rcx, [rbp - 0x7c]
call qword [sym.imp.ntdll.dll_memcpy]
cmp dword [rdi], r14d
je 0x180003a27
cmp dword [rdi], r12d
jne 0x180003a37
lea r8, [rbp + 0x1a8]
lea rdx, [rbp - 0x7c]
call fcn.180002f44
jmp 0x180003a37
lea r8, [rbp + 0x1a8]
lea rdx, [rbp - 0x7c]
call fcn.1800029e0
lea r14, [rdi + 4]
cmp dword [rdi], 0x50000
lea eax, [rbx - 4]
mov dword [rbp + 0x1b0], eax
je 0x180003a62
cmp dword [rdi], r12d
jne 0x180003a71
lea r8, [rbp + 0x1b0]
mov rdx, r14
call fcn.180002f44
jmp 0x180003a71
lea r8, [rbp + 0x1b0]
mov rdx, r14
call fcn.1800029e0
lea rdx, [rbp + 0xb0]
lea rcx, [rdi + 0x14]
call fcn.180003688
lea rdx, [rbp + 0xb0]
lea rcx, [rbp - 0x6c]
call fcn.180003634
movsxd rcx, eax
lea rbx, [rbp - 0x6c]
add rbx, rcx
mov edx, esi
mov rcx, rbx
call fcn.180003554
lea r8, [rbx + 0x10]
mov edx, esi
mov rcx, rbx
call fcn.180003108
mov rdx, rdi
mov r8d, 4
sub rdx, rbx
mov rcx, rbx
mov eax, dword [rdx + rcx + 4]
xor dword [rcx], eax
lea rcx, [rcx + 4]
sub r8, 1
jne 0x180003ac2
mov eax, dword [rdi]
add rbx, 0x30
cmp eax, r12d
jne 0x180003ba2
mov rax, qword [0x180005020]
lea rcx, [rbx + 8]
mov r8, rsi
mov qword [rbx], rax
mov rdx, r14
call qword [sym.imp.ntdll.dll_memcpy]
mov rax, qword [rbp + 0x148]
lea r8, [rsp + 0x40]
xor edx, edx
movabs rcx, 0x22816889bd
div rcx
movabs rcx, 0x208cbab5ed
mov edx, 8
imul rax, rcx
movabs rcx, 0x3156cd5ac628477a
add rax, rcx
lea rcx, [rbp + 0x1a8]
mov qword [rbp + 0x1a8], rax
call fcn.180003108
mov r8, rsi
lea rdx, [rsp + 0x50]
lea rcx, [rsp + 0x30]
call qword [sym.imp.ntdll.dll_memcpy]
lea rax, [rbp - 0x7c]
lea edx, [rbx + 0x18]
sub edx, eax
lea r9, [rsp + 0x60]
lea r8, [rbp - 0x7c]
lea rcx, [rsp + 0x30]
call fcn.1800032b4
mov r8, rsi
lea rdx, [rsp + 0x70]
lea rcx, [rbx + 0x18]
call qword [sym.imp.ntdll.dll_memcpy]
mov r8, rsi
lea rdx, [rsp + 0x20]
lea rcx, [rbp - 0x7c]
add rbx, 0x28
call qword [sym.imp.ntdll.dll_memcpy]
mov eax, dword [rdi]
lea rcx, [rbp - 0x6c]
sub ebx, ecx
mov dword [rbp + 0x1a0], ebx
cmp eax, 0x50000
je 0x180003bd0
cmp eax, r12d
jne 0x180003be4
lea r8, [rbp + 0x1a0]
lea rdx, [rbp - 0x6c]
lea rcx, [rbp - 0x7c]
call fcn.180002e80
jmp 0x180003be4
lea r8, [rbp + 0x1a0]
lea rdx, [rbp - 0x6c]
lea rcx, [rbp - 0x7c]
call fcn.18000280c
mov ecx, dword [rbp + 0x1a0]
xor edx, edx
add ecx, 0x14
mov dword [r15], ecx
mov rax, qword gs:[0x30]
movsxd r8, ecx
mov rcx, qword [rax + 0x60]
mov rcx, qword [rcx + 0x30]
call qword [sym.imp.ntdll.dll_RtlAllocateHeap]
movsxd r8, dword [r15]
lea rdx, [rbp - 0x80]
mov rcx, rax
mov rbx, rax
call qword [sym.imp.ntdll.dll_memcpy]
mov r8d, 0xec
lea rdx, [rdi + 0x14]
mov rcx, r13
call qword [sym.imp.ntdll.dll_memcpy]
mov rcx, qword [rbp + 0x1c0]
lea rdx, [rbp + 0xb0]
mov r8d, 0xac
call qword [sym.imp.ntdll.dll_memcpy]
mov rax, rbx
mov rbx, qword [rsp + 0x2b8]
add rsp, 0x260
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret