Function at 0x180004de0
Capabilities:
Allocate or change rwx memory

Disassembly:
mov r11, rsp
push rbp
push rbx
lea rbp, [r11 - 0x5f]
sub rsp, 0x98
mov rax, qword [0x18006b010]
xor rax, rsp
mov qword [rbp + 0x27], rax
cmp dword [rcx], 0x688
mov rbx, rcx
jne 0x180005090
cmp edx, 0x688
jb 0x180005090
mov rax, qword [rcx + 0x20]
mov qword [r11 + 0x10], rsi
mov qword [r11 + 0x18], rdi
xor edi, edi
mov qword [r11 - 0x18], r13
mov esi, edi
mov qword [r11 - 0x20], r14
mov qword [r11 - 0x28], r15
mov dword [rbp - 0xd], 0xffffffff
lea ecx, [rdi + 1]
mov dword [rbp - 0x15], 0xffffffff
mov dword [rbp - 0x19], 0xffffffff
test rax, rax
je 0x180004e5e
mov eax, dword [rax + 0x10]
cmp dword [rbx + 0x680], eax
cmovne esi, ecx
mov r13d, dword [rbx + 4]
mov r14, qword [rbx + 0x10]
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
xorps xmm0, xmm0
lea r8, [rbp - 9]
mov rcx, rax
mov r9d, 0x30
mov rdx, r14
mov r15, rax
movups xmmword [rbp - 9], xmm0
movups xmmword [rbp + 7], xmm0
movups xmmword [rbp + 0x17], xmm0
call qword [sym.imp.KERNEL32.dll_VirtualQueryEx]
test rax, rax
je 0x180005064
test byte [rbp + 0x1b], 0xf0
mov eax, 0x40
mov qword [rsp + 0xc8], r12
mov r8d, r13d
mov r12d, 4
mov rdx, r14
mov r9d, r12d
mov rcx, r15
cmovne r9d, eax
lea rax, [rbp - 0xd]
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_VirtualProtectEx]
test eax, eax
je 0x18000505c
mov r13d, dword [rbx + 8]
mov r14, qword [rbx + 0x18]
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
xorps xmm0, xmm0
lea r9d, [r12 + 0x2c]
mov rcx, rax
lea r8, [rbp - 9]
mov rdx, r14
mov r15, rax
movups xmmword [rbp - 9], xmm0
movups xmmword [rbp + 7], xmm0
movups xmmword [rbp + 0x17], xmm0
call qword [sym.imp.KERNEL32.dll_VirtualQueryEx]
test rax, rax
je 0x180005025
test byte [rbp + 0x1b], 0xf0
mov r9d, r12d
mov eax, 0x40
mov r8d, r13d
cmovne r9d, eax
mov rdx, r14
lea rax, [rbp - 0x15]
mov rcx, r15
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_VirtualProtectEx]
test eax, eax
je 0x180005025
mov r8d, dword [rbx + 4]
lea rdx, [rbx + 0x28]
mov rcx, qword [rbx + 0x10]
call sub.VCRUNTIME140.dll_memcpy
mov r8d, dword [rbx + 8]
lea rdx, [rbx + 0x68]
mov rcx, qword [rbx + 0x18]
call sub.VCRUNTIME140.dll_memcpy
mov r14, qword [rbx + 0x20]
test r14, r14
je 0x18000500b
test esi, esi
jne 0x18000500b
mov r15d, dword [rbx + 0xc]
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
xorps xmm0, xmm0
lea r9d, [r12 + 0x2c]
mov rcx, rax
lea r8, [rbp - 9]
mov rdx, r14
mov rsi, rax
movups xmmword [rbp - 9], xmm0
movups xmmword [rbp + 7], xmm0
movups xmmword [rbp + 0x17], xmm0
call qword [sym.imp.KERNEL32.dll_VirtualQueryEx]
test rax, rax
je 0x180005010
test byte [rbp + 0x1b], 0xf0
mov eax, 0x40
mov r8d, r15d
mov rdx, r14
cmovne r12d, eax
mov rcx, rsi
lea rax, [rbp - 0x19]
mov r9d, r12d
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_VirtualProtectEx]
test eax, eax
je 0x180005010
mov r8d, dword [rbx + 0xc]
lea rdx, [rbx + 0x670]
mov rcx, qword [rbx + 0x20]
call sub.VCRUNTIME140.dll_memcpy
mov edx, dword [rbx + 0xc]
lea r9, [rbp - 0x11]
mov r8d, dword [rbp - 0x19]
mov rcx, qword [rbx + 0x20]
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
mov edi, 1
mov edx, dword [rbx + 8]
lea r9, [rbp - 0x11]
mov r8d, dword [rbp - 0x15]
mov rcx, qword [rbx + 0x18]
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
mov edx, dword [rbx + 4]
lea r9, [rbp - 0x11]
mov r8d, dword [rbp - 0xd]
mov rcx, qword [rbx + 0x10]
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test edi, edi
je 0x18000505c
mov rcx, rbx
call fcn.180004b00
test rax, rax
je 0x18000505c
xor edx, edx
mov r8d, 0x8000
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_VirtualFree]
mov r12, qword [rsp + 0xc8]
mov r15, qword [rsp + 0x80]
mov eax, edi
mov rdi, qword [rsp + 0xc0]
mov r14, qword [rsp + 0x88]
mov r13, qword [rsp + 0x90]
mov rsi, qword [rsp + 0xb8]
jmp 0x18000509d
mov ecx, 0xc1
call qword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
mov rcx, qword [rbp + 0x27]
xor rcx, rsp
call fcn.1800551c0
add rsp, 0x98
pop rbx
pop rbp
ret