Function at 0x180041270
Capabilities:
Allocate or change rwx memory

Disassembly:
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x10], rdx
mov dword [rsp + 8], ecx
sub rsp, 0x88
mov qword [rsp + 0x40], 0
cmp dword [rsp + 0x90], 0
jbe 0x180041556
mov byte [rsp + 0x30], 0
cmp qword [rsp + 0x98], 0
jne 0x1800412bf
mov byte [rsp + 0x30], 1
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov qword [rsp + 0x98], rax
mov qword [rsp + 0x38], 0
cmp qword [rsp + 0xa0], 0
je 0x1800413b8
mov rax, qword [rsp + 0xa0]
mov qword [rsp + 0x38], rax
mov r9d, 0x30
lea r8, [rsp + 0x50]
mov rdx, qword [rsp + 0x38]
mov rcx, qword [rsp + 0x98]
call qword [sym.imp.KERNEL32.dll_VirtualQueryEx]
cmp rax, 0x30
jne 0x1800413b8
mov rax, qword [rsp + 0xa0]
mov rcx, qword [rsp + 0x50]
sub rcx, rax
mov rax, rcx
cmp rax, 0x7fff0000
jge 0x1800413b8
cmp dword [rsp + 0x70], 0x10000
jne 0x180041378
mov eax, dword [rsp + 0x90]
mov dword [rsp + 0x20], 0x40
mov r9d, 0x2000
mov r8d, eax
mov rdx, qword [rsp + 0x50]
mov rcx, qword [rsp + 0x98]
call qword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov qword [rsp + 0x40], rax
cmp qword [rsp + 0x40], 0
je 0x18004136f
jmp 0x1800413b8
mov qword [rsp + 0x68], 0x10000
cmp qword [rsp + 0x68], 0x10000
jae 0x18004138e
mov qword [rsp + 0x68], 0x10000
jmp 0x18004139e
mov rax, qword [rsp + 0x68]
and rax, 0xffffffffffff0000
mov qword [rsp + 0x68], rax
mov rax, qword [rsp + 0x68]
mov rcx, qword [rsp + 0x38]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x38], rax
jmp 0x1800412e4
cmp qword [rsp + 0x40], 0
jne 0x180041526
cmp qword [rsp + 0xa0], 0
je 0x1800413fb
cmp qword [rsp + 0xa0], 0x70000000
jb 0x1800413ec
mov eax, 0x80000000
cmp qword [rsp + 0xa0], rax
jbe 0x1800413fb
mov rax, qword [rsp + 0xa0]
mov qword [rsp + 0x38], rax
jmp 0x180041447
cmp qword [rsp + 0xa0], 0
jne 0x180041438
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
cmp qword [rsp + 0x98], rax
je 0x180041427
mov rcx, qword [rsp + 0x98]
call fcn.1800416b0
test eax, eax
je 0x180041438
movabs rax, 0x7feffff0000
mov qword [rsp + 0x38], rax
jmp 0x180041447
mov ecx, 0xc
call fcn.1800419a0
mov qword [rsp + 0x38], rax
cmp qword [rsp + 0xa0], 0
jne 0x180041471
cmp qword [0x1800a5278], 0
je 0x180041471
movzx eax, byte [rsp + 0x30]
test eax, eax
je 0x180041471
mov rax, qword [0x1800a5278]
mov qword [rsp + 0x38], rax
mov r9d, 0x30
lea r8, [rsp + 0x50]
mov rdx, qword [rsp + 0x38]
mov rcx, qword [rsp + 0x98]
call qword [sym.imp.KERNEL32.dll_VirtualQueryEx]
cmp rax, 0x30
jne 0x1800414fe
cmp dword [rsp + 0x70], 0x10000
jne 0x1800414d1
mov eax, dword [rsp + 0x90]
mov dword [rsp + 0x20], 0x40
mov r9d, 0x2000
mov r8d, eax
mov rdx, qword [rsp + 0x50]
mov rcx, qword [rsp + 0x98]
call qword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov qword [rsp + 0x40], rax
jmp 0x1800414fe
mov rax, qword [rsp + 0x58]
cmp qword [rsp + 0x38], rax
jne 0x1800414ef
mov rax, qword [rsp + 0x38]
sub rax, 0x10000
mov qword [rsp + 0x38], rax
jmp 0x1800414f9
mov rax, qword [rsp + 0x58]
mov qword [rsp + 0x38], rax
jmp 0x180041471
cmp qword [rsp + 0xa0], 0
jne 0x180041526
cmp qword [rsp + 0x40], 0
je 0x180041526
movzx eax, byte [rsp + 0x30]
test eax, eax
je 0x180041526
mov rax, qword [rsp + 0x40]
mov qword [0x1800a5278], rax
mov eax, dword [rsp + 0x90]
mov dword [rsp + 0x20], 0x40
mov r9d, 0x1000
mov r8d, eax
mov rdx, qword [rsp + 0x40]
mov rcx, qword [rsp + 0x98]
call qword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov qword [rsp + 0x40], rax
jmp 0x180041561
mov rax, qword [rsp + 0x40]
add rsp, 0x88
ret