Function at 0x1800409e0
Capabilities:
Allocate or change rwx memory
Get system information on windows

Disassembly:
mov qword [rsp + 8], rcx
push rdi
sub rsp, 0xa0
mov rdi, rsp
mov ecx, 0x28
mov eax, 0xcccccccc
rep stosd dword [rdi], eax
mov rcx, qword [rsp + 0xb0]
lea rcx, [rsp + 0x48]
call qword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov rax, qword [rsp + 0x50]
mov qword [rsp + 0x28], rax
mov rax, qword [rsp + 0x58]
mov qword [rsp + 0x30], rax
cmp qword [rsp + 0xb0], 0x40000000
jbe 0x180040a59
mov rax, qword [rsp + 0xb0]
sub rax, 0x40000000
cmp qword [rsp + 0x28], rax
jae 0x180040a59
mov rax, qword [rsp + 0xb0]
sub rax, 0x40000000
mov qword [rsp + 0x28], rax
mov rax, qword [rsp + 0xb0]
add rax, 0x40000000
cmp qword [rsp + 0x30], rax
jbe 0x180040a81
mov rax, qword [rsp + 0xb0]
add rax, 0x40000000
mov qword [rsp + 0x30], rax
mov rax, qword [rsp + 0x30]
sub rax, 0xfff
mov qword [rsp + 0x30], rax
mov rax, qword [0x180094628]
mov qword [rsp + 0x20], rax
jmp 0x180040aac
mov rax, qword [rsp + 0x20]
mov rax, qword [rax]
mov qword [rsp + 0x20], rax
cmp qword [rsp + 0x20], 0
je 0x180040ae6
mov rax, qword [rsp + 0x28]
cmp qword [rsp + 0x20], rax
jb 0x180040acc
mov rax, qword [rsp + 0x30]
cmp qword [rsp + 0x20], rax
jb 0x180040ace
jmp 0x180040a9f
mov rax, qword [rsp + 0x20]
cmp qword [rax + 8], 0
je 0x180040ae4
mov rax, qword [rsp + 0x20]
jmp 0x180040c8e
jmp 0x180040a9f
mov rax, qword [rsp + 0xb0]
mov qword [rsp + 0x88], rax
mov rax, qword [rsp + 0x28]
cmp qword [rsp + 0x88], rax
jb 0x180040b61
mov r8d, dword [rsp + 0x70]
mov rdx, qword [rsp + 0x28]
mov rcx, qword [rsp + 0x88]
call fcn.180040780
mov qword [rsp + 0x88], rax
cmp qword [rsp + 0x88], 0
jne 0x180040b31
jmp 0x180040b61
mov r9d, 0x40
mov r8d, 0x3000
mov edx, 0x1000
mov rcx, qword [rsp + 0x88]
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov qword [rsp + 0x20], rax
cmp qword [rsp + 0x20], 0
je 0x180040b5f
jmp 0x180040b61
jmp 0x180040af6
cmp qword [rsp + 0x20], 0
jne 0x180040be4
mov rax, qword [rsp + 0xb0]
mov qword [rsp + 0x90], rax
mov rax, qword [rsp + 0x30]
cmp qword [rsp + 0x90], rax
ja 0x180040be4
mov r8d, dword [rsp + 0x70]
mov rdx, qword [rsp + 0x30]
mov rcx, qword [rsp + 0x90]
call fcn.180040890
mov qword [rsp + 0x90], rax
cmp qword [rsp + 0x90], 0
jne 0x180040bb4
jmp 0x180040be4
mov r9d, 0x40
mov r8d, 0x3000
mov edx, 0x1000
mov rcx, qword [rsp + 0x90]
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov qword [rsp + 0x20], rax
cmp qword [rsp + 0x20], 0
je 0x180040be2
jmp 0x180040be4
jmp 0x180040b79
cmp qword [rsp + 0x20], 0
je 0x180040c89
mov rax, qword [rsp + 0x20]
add rax, 0x40
mov qword [rsp + 0x98], rax
mov rax, qword [rsp + 0x20]
mov qword [rax + 8], 0
mov rax, qword [rsp + 0x20]
mov dword [rax + 0x10], 0
mov rax, qword [rsp + 0x98]
mov rcx, qword [rsp + 0x20]
mov rcx, qword [rcx + 8]
mov qword [rax], rcx
mov rax, qword [rsp + 0x20]
mov rcx, qword [rsp + 0x98]
mov qword [rax + 8], rcx
mov rax, qword [rsp + 0x98]
add rax, 0x40
mov qword [rsp + 0x98], rax
mov rax, qword [rsp + 0x20]
mov rcx, qword [rsp + 0x98]
sub rcx, rax
mov rax, rcx
cmp rax, 0xfc0
jbe 0x180040c1a
mov rax, qword [rsp + 0x20]
mov rcx, qword [0x180094628]
mov qword [rax], rcx
mov rax, qword [rsp + 0x20]
mov qword [0x180094628], rax
mov rax, qword [rsp + 0x20]
mov rdi, rax
mov rcx, rsp
lea rdx, [0x1800732c0]
call fcn.180043524
mov rax, rdi
add rsp, 0xa0
pop rdi
ret