Function at 0x140005440
Capabilities:
Allocate or change rwx memory
Attach user process memory

Disassembly:
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0xf0
mov rax, qword [0x140011ca0]
xor rax, rsp
mov qword [rsp + 0xe0], rax
mov dword [rsp + 0x50], r9d
mov r14d, r8d
mov r15, rdx
mov rax, qword [rsp + 0x160]
mov qword [rsp + 0x90], rax
mov qword [rsp + 0xa8], rax
mov r8d, 0xc0000001
mov dword [rsp + 0x40], r8d
xor ebx, ebx
test rcx, rcx
je 0x140005898
lea rax, [rdx - 1]
movabs rdx, 0x7ffffffffffe
cmp rax, rdx
ja 0x140005898
test r14d, r14d
je 0x140005898
call fcn.1400039b8
mov rdi, rax
mov qword [rsp + 0x98], rax
call qword [sym.imp.ntoskrnl.exe_IoGetCurrentProcess]
mov qword [rsp + 0x88], rax
test rdi, rdi
jne 0x1400054ea
mov eax, dword [rsp + 0x40]
jmp 0x14000589b
mov rsi, rbx
mov qword [rsp + 0x68], rbx
lea eax, [r14 + 1]
mov r13d, eax
mov ecx, eax
call fcn.1400059f4
mov r12, rax
mov qword [rsp + 0xa0], rax
test rax, rax
je 0x1400054e1
mov r8, r14
mov rdx, r15
mov rcx, rax
call fcn.140009600
mov rcx, rdi
call qword [sym.imp.ntoskrnl.exe_PsAcquireProcessExitSynchronization]
test eax, eax
js 0x140005872
mov rcx, rdi
call sub.ntoskrnl.exe_PsGetProcessWow64Process
test rax, rax
setne byte [rsp + 0x44]
mov qword [rsp + 0x48], rbx
xorps xmm0, xmm0
movups xmmword [rsp + 0xb0], xmm0
movups xmmword [rsp + 0xc0], xmm0
movups xmmword [rsp + 0xd0], xmm0
mov r15, qword [rsp + 0x88]
cmp rdi, r15
je 0x14000557e
lea rdx, [rsp + 0xb0]
mov rcx, rdi
call qword [sym.imp.ntoskrnl.exe_KeStackAttachProcess]
nop
mov qword [rsp + 0x58], rbx
mov qword [rsp + 0x70], r13
mov dword [rsp + 0x28], 0x40
mov dword [rsp + 0x20], 0x1000
lea r9, [rsp + 0x70]
xor r8d, r8d
lea rdx, [rsp + 0x58]
or rcx, 0xffffffffffffffff
call qword [sym.imp.ntoskrnl.exe_ZwAllocateVirtualMemory]
mov rcx, qword [rsp + 0x58]
test rcx, rcx
je 0x14000581b
mov r8, qword [rsp + 0x70]
xor edx, edx
call fcn.1400098c0
mov r8, r14
mov rdx, r12
mov rcx, qword [rsp + 0x58]
call fcn.140009600
mov r13b, byte [rsp + 0x44]
mov rcx, qword [rsp + 0x58]
test r13b, r13b
je 0x1400055ef
call fcn.140003ad0
jmp 0x1400055f4
call fcn.1400037bc
mov qword [rsp + 0x48], rax
mov eax, dword [rsp + 0x50]
test eax, eax
jne 0x140005662
mov qword [rsp + 0x50], rbx
lea rax, [rsp + 0x50]
mov qword [rsp + 0x30], rax
mov byte [rsp + 0x28], bl
mov qword [rsp + 0x20], rbx
mov r9d, 0x1fffff
xor r8d, r8d
mov edx, 0x200
mov rcx, rdi
call qword [sym.imp.ntoskrnl.exe_ObOpenObjectByPointer]
mov rax, qword [rsp + 0x50]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x40]
mov qword [rsp + 0x20], rax
movzx r9d, byte [rsp + 0x150]
xor edx, edx
lea r8d, [rdx + 4]
mov rcx, qword [rsp + 0x48]
call fcn.140006084
jmp 0x140005759
cmp eax, 1
jne 0x140005759
mov r8b, al
lea rdx, [rsp + 0x50]
mov rcx, rdi
call fcn.140002104
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.ntoskrnl.exe_MmIsAddressValid]
test al, al
je 0x140005759
mov byte [rsp + 0x28], 1
mov qword [rsp + 0x20], rbx
xor r9d, r9d
xor r8d, r8d
mov rdx, qword [rsp + 0x48]
mov rcx, qword [rsp + 0x50]
call fcn.140002264
mov dword [rsp + 0x40], eax
test eax, eax
js 0x140005759
cmp dword [rsp + 0x150], 1
jne 0x140005759
mov qword [rsp + 0x78], rbx
mov qword [rsp + 0x78], 0xffffffffffff3cb0
mov r14d, ebx
mov dword [rsp + 0x60], ebx
cmp r14d, 0x7d0
jae 0x140005740
call qword [sym.imp.ntoskrnl.exe_IoGetCurrentProcess]
mov rcx, rax
call fcn.1400020d8
test al, al
jne 0x140005738
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.ntoskrnl.exe_PsIsThreadTerminating]
test al, al
jne 0x140005738
mov rax, qword [rsp + 0x48]
cmp dword [rax + 0x5e8], 0xc0371e7e
je 0x140005740
lea r8, [rsp + 0x78]
xor edx, edx
xor ecx, ecx
call qword [sym.imp.ntoskrnl.exe_KeDelayExecutionThread]
mov dword [rsp + 0x40], eax
test eax, eax
js 0x140005740
inc r14d
mov dword [rsp + 0x60], r14d
jmp 0x1400056dc
mov dword [rsp + 0x40], 0xc000010a
cmp dword [rsp + 0x40], ebx
jl 0x14000581b
mov rax, qword [rsp + 0x48]
mov ecx, dword [rax + 0x5ec]
mov dword [rsp + 0x40], ecx
cmp dword [rsp + 0x40], ebx
jl 0x14000581b
mov rax, qword [rsp + 0x48]
mov rcx, qword [rax + 0x5e0]
test rcx, rcx
je 0x14000578e
cmp dword [rsp + 0x150], ebx
je 0x14000578e
test r13b, r13b
je 0x140005786
mov esi, dword [rcx]
jmp 0x140005789
mov rsi, qword [rcx]
mov qword [rsp + 0x68], rsi
cmp dword [rsp + 0x40], ebx
jl 0x14000581b
test rsi, rsi
je 0x1400057bd
cmp dword [rsp + 0x150], ebx
je 0x1400057bd
cmp dword [rsp + 0x158], 1
jne 0x1400057bd
mov edx, 0x1000
mov rcx, rsi
call fcn.140004d20
cmp dword [rsp + 0x40], ebx
jl 0x14000581b
cmp dword [rsp + 0x150], ebx
je 0x14000581b
mov qword [rsp + 0x80], 0x1000
mov rdx, qword [rsp + 0x48]
add rdx, 0x5f0
mov r14d, 0x8000
mov r9d, r14d
lea r8, [rsp + 0x80]
or r13, 0xffffffffffffffff
mov rcx, r13
call qword [sym.imp.ntoskrnl.exe_ZwFreeVirtualMemory]
mov r9d, r14d
lea r8, [rsp + 0x80]
lea rdx, [rsp + 0x48]
mov rcx, r13
call qword [sym.imp.ntoskrnl.exe_ZwFreeVirtualMemory]
mov r14, qword [rsp + 0x90]
jmp 0x140005854
cmp rdi, r15
je 0x140005867
lea rcx, [rsp + 0xb0]
call qword [sym.imp.ntoskrnl.exe_KeUnstackDetachProcess]
mov rcx, rdi
call qword [sym.imp.ntoskrnl.exe_PsReleaseProcessExitSynchronization]
jmp 0x14000587a
mov r14, qword [rsp + 0x90]
cmp dword [rsp + 0x40], ebx
jl 0x140005888
test r14, r14
je 0x140005888
mov qword [r14], rsi
xor edx, edx
mov rcx, r12
call qword [sym.imp.ntoskrnl.exe_ExFreePoolWithTag]
jmp 0x1400054e1
mov eax, r8d
mov rcx, qword [rsp + 0xe0]
xor rcx, rsp
call fcn.140009400
add rsp, 0xf0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
ret