Function at 0x416da0
Capabilities:
Allocate or change rwx memory

Disassembly:
mov qword [rsp + 0x20], r9
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rdi
sub rsp, 0x250
mov dword [rsp + 0x50], 0
mov qword [rsp + 0x60], 0
lea rax, [rsp + 0x68]
mov rdi, rax
xor eax, eax
mov ecx, 0x58
rep stosb byte [rdi], al
cmp qword [rsp + 0x260], 0
jne 0x416df3
mov eax, 0xc000000d
jmp 0x4177f1
mov rax, qword [rsp + 0x260]
mov qword [rsp + 0x60], rax
lea rcx, [rsp + 0x80]
call fcn.00403440
mov eax, dword [rsp + 0x288]
and eax, 0x80
test eax, eax
je 0x416e2a
mov dword [rsp + 0x22c], 1
jmp 0x416e35
mov dword [rsp + 0x22c], 0
movzx eax, byte [rsp + 0x22c]
mov byte [0x00445b98], al
mov eax, dword [rsp + 0x288]
and eax, 0x10
test eax, eax
je 0x416e5e
mov dword [rsp + 0x230], 1
jmp 0x416e69
mov dword [rsp + 0x230], 0
movzx eax, byte [rsp + 0x230]
mov byte [0x00445b99], al
mov eax, dword [rsp + 0x288]
and eax, 0x80
test eax, eax
je 0x416e94
mov dword [rsp + 0x234], 1
jmp 0x416e9f
mov dword [rsp + 0x234], 0
movzx eax, byte [rsp + 0x234]
mov byte [rsp + 0xb9], al
lea rcx, [rsp + 0x60]
call fcn.004154c0
mov dword [rsp + 0x50], eax
cmp dword [rsp + 0x50], 0
jge 0x416f08
mov eax, dword [rsp + 0x288]
and eax, 0x10
test eax, eax
je 0x416ede
mov dword [rsp + 0x238], 1
jmp 0x416ee9
mov dword [rsp + 0x238], 0
movzx r8d, byte [rsp + 0x238]
lea rdx, [rsp + 0x60]
mov rcx, qword [rsp + 0x260]
call fcn.00414c30
mov dword [rsp + 0x50], eax
cmp dword [rsp + 0x50], 0
jl 0x417030
mov qword [rsp + 0xc0], 0x2000
mov eax, dword [rsp + 0x288]
and eax, 0x10
test eax, eax
je 0x416ffd
mov qword [rsp + 0xc8], 0
lea rax, [rsp + 0xd0]
mov rdi, rax
xor eax, eax
mov ecx, 0x28
rep stosb byte [rdi], al
mov qword [rsp + 0xf8], 0
lea rax, [rsp + 0x100]
mov rdi, rax
xor eax, eax
mov ecx, 8
rep stosb byte [rdi], al
mov rcx, qword [rsp + 0x260]
call sub.ntoskrnl.exe_PsGetProcessId
mov qword [rsp + 0xd8], rax
mov qword [rsp + 0xc8], 0
mov byte [rsp + 0xf0], 1
mov byte [rsp + 0xf1], 1
mov qword [rsp + 0xe8], 0x1000
mov qword [rsp + 0xe0], 0x40
mov rax, qword [rsp + 0xc0]
mov qword [rsp + 0xd0], rax
lea r8, [rsp + 0xf8]
lea rdx, [rsp + 0xc8]
mov rcx, qword [rsp + 0x260]
call fcn.004136a0
mov dword [rsp + 0x50], eax
mov rax, qword [rsp + 0xf8]
mov qword [rsp + 0x90], rax
jmp 0x417030
mov dword [rsp + 0x28], 0x40
mov dword [rsp + 0x20], 0x1000
lea r9, [rsp + 0xc0]
xor r8d, r8d
lea rdx, [rsp + 0x90]
mov rcx, 0xffffffffffffffff
call sub.ntoskrnl.exe_ZwAllocateVirtualMemory
mov dword [rsp + 0x50], eax
cmp dword [rsp + 0x50], 0
jl 0x4171ef
mov word [rsp + 0x108], 0
lea rax, [rsp + 0x10a]
mov rdi, rax
xor eax, eax
mov ecx, 0xe
rep stosb byte [rdi], al
mov qword [rsp + 0x118], 0
mov dword [rsp + 0x120], 0
lea rax, [rsp + 0x128]
mov rdi, rax
xor eax, eax
mov ecx, 0x28
rep stosb byte [rdi], al
mov dword [rsp + 0x120], 0x30
mov qword [rsp + 0x128], 0
mov dword [rsp + 0x138], 0
mov qword [rsp + 0x130], 0
mov qword [rsp + 0x140], 0
mov qword [rsp + 0x148], 0
mov byte [rsp + 0x20], 0
xor r9d, r9d
lea r8, [rsp + 0x120]
mov edx, 0x1f0003
lea rcx, [rsp + 0x98]
call sub.ntoskrnl.exe_ZwCreateEvent
mov dword [rsp + 0x50], eax
cmp dword [rsp + 0x50], 0
jl 0x417130
mov qword [rsp + 0x28], 0
lea rax, [rsp + 0xa0]
mov qword [rsp + 0x20], rax
mov r9b, 1
mov rax, qword [sym.imp.ntoskrnl.exe_ExEventObjectType]
mov r8, qword [rax]
mov edx, 2
mov rcx, qword [rsp + 0x98]
call fcn.0040a3e0
mov dword [rsp + 0x50], eax
cmp dword [rsp + 0x50], 0
jge 0x417140
mov eax, dword [rsp + 0x50]
jmp 0x4177f1
lea rdx, [0x00434110]
lea rcx, [rsp + 0x108]
call sub.ntoskrnl.exe_RtlInitUnicodeString
mov rcx, qword [rsp + 0x260]
call sub.ntoskrnl.exe_PsGetProcessWow64Process
test rax, rax
je 0x417173
mov dword [rsp + 0x23c], 1
jmp 0x41717e
mov dword [rsp + 0x23c], 0
movzx r8d, byte [rsp + 0x23c]
lea rdx, [rsp + 0x108]
mov rcx, qword [rsp + 0x60]
call fcn.0040edb0
mov qword [rsp + 0x118], rax
xor r9d, r9d
mov r8, qword [rsp + 0x260]
lea rdx, [0x00434340]
mov rcx, qword [rsp + 0x118]
call fcn.0040f250
mov qword [rsp + 0xa8], rax
xor r9d, r9d
mov r8, qword [rsp + 0x260]
lea rdx, [0x00434330]
mov rcx, qword [rsp + 0x118]
call fcn.0040f250
mov qword [rsp + 0xb0], rax
cmp dword [rsp + 0x50], 0
jl 0x41725a
mov rax, qword [rsp + 0x2a0]
mov qword [rsp + 0x40], rax
mov rax, qword [rsp + 0x2a8]
mov qword [rsp + 0x38], rax
lea rax, [rsp + 0x60]
mov qword [rsp + 0x30], rax
mov eax, dword [rsp + 0x288]
mov dword [rsp + 0x28], eax
movzx eax, byte [rsp + 0x280]
mov byte [rsp + 0x20], al
mov r9, qword [rsp + 0x278]
mov r8, qword [rsp + 0x270]
mov rdx, qword [rsp + 0x268]
mov rcx, qword [rsp + 0x260]
call fcn.00415e10
mov dword [rsp + 0x50], eax
cmp dword [rsp + 0x50], 0
jl 0x4172db
mov eax, dword [rsp + 0x288]
and eax, 0x1000
test eax, eax
jne 0x4172db
cmp dword [0x004c6344], 0
je 0x4172db
mov eax, dword [0x004c6344]
mov rcx, qword [rsp + 0x260]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x150], rax
mov rax, qword [rsp + 0x150]
mov eax, dword [rax]
or eax, 0x20
mov rcx, qword [rsp + 0x150]
mov dword [rcx], eax
mov rax, qword [rsp + 0x150]
mov eax, dword [rax]
or eax, 0x10
mov rcx, qword [rsp + 0x150]
mov dword [rcx], eax
mov rax, qword [rsp + 0x150]
mov eax, dword [rax]
or eax, 8
mov rcx, qword [rsp + 0x150]
mov dword [rcx], eax
cmp dword [rsp + 0x50], 0
jl 0x417353
mov eax, dword [rsp + 0x288]
and eax, 0x40
test eax, eax
je 0x417353
mov rcx, qword [rsp + 0x260]
call sub.ntoskrnl.exe_PsGetProcessPeb
mov qword [rsp + 0x158], rax
mov rcx, qword [rsp + 0x260]
call sub.ntoskrnl.exe_PsGetProcessWow64Process
mov qword [rsp + 0x160], rax
mov rax, qword [rsp + 0x158]
mov rcx, qword [rsp + 0x2a8]
mov rcx, qword [rcx + 0x10]
mov qword [rax + 0x10], rcx
cmp qword [rsp + 0x160], 0
je 0x417353
mov rax, qword [rsp + 0x160]
mov rcx, qword [rsp + 0x2a8]
mov ecx, dword [rcx + 0x10]
mov dword [rax + 8], ecx
cmp dword [rsp + 0x50], 0
jl 0x4173e8
mov eax, dword [rsp + 0x288]
and eax, 0x10
test eax, eax
je 0x417379
mov dword [rsp + 0x240], 1
jmp 0x417384
mov dword [rsp + 0x240], 0
mov eax, dword [rsp + 0x288]
and eax, 0x10000
test eax, eax
je 0x4173a1
mov dword [rsp + 0x244], 1
jmp 0x4173ac
mov dword [rsp + 0x244], 0
movzx r9d, byte [rsp + 0x240]
movzx r8d, byte [rsp + 0x244]
lea rdx, [rsp + 0x60]
mov rcx, qword [rsp + 0x260]
call fcn.00410ae0
mov dword [rsp + 0x50], eax
jmp 0x4173e8
cmp dword [rsp + 0x50], 0
jl 0x417496
cmp dword [rsp + 0x290], 0
je 0x417496
mov eax, dword [rsp + 0x290]
mov rcx, qword [rsp + 0x2a8]
add rax, qword [rcx + 0x10]
mov qword [rsp + 0x168], rax
mov rax, qword [rsp + 0x90]
add rax, 0x1010
mov r8d, 0x400
mov rdx, qword [rsp + 0x298]
mov rcx, rax
call fcn.004319d0
movzx eax, byte [0x00445b98]
test eax, eax
jne 0x417458
mov dword [rsp + 0x248], 1
jmp 0x417463
mov dword [rsp + 0x248], 0
mov rax, qword [rsp + 0x90]
add rax, 0x1010
mov qword [rsp + 0x20], rax
mov r9d, 1
mov r8, qword [rsp + 0x168]
lea rdx, [rsp + 0x60]
movzx ecx, byte [rsp + 0x248]
call fcn.00412db0
cmp qword [rsp + 0xa0], 0
je 0x4174ae
mov rcx, qword [rsp + 0xa0]
call sub.ntoskrnl.exe_ObfDereferenceObject
cmp qword [rsp + 0x98], 0
je 0x4174c6
mov rcx, qword [rsp + 0x98]
call sub.ntoskrnl.exe_ZwClose
cmp qword [rsp + 0x78], 0
je 0x4174d8
mov rcx, qword [rsp + 0x78]
call sub.ntoskrnl.exe_ObfDereferenceObject
cmp qword [rsp + 0x70], 0
je 0x417535
mov dword [rsp + 0x170], 0
lea rax, [rsp + 0x174]
mov rdi, rax
xor eax, eax
mov ecx, 4
rep stosb byte [rdi], al
mov qword [rsp + 0x170], 0xfffffffffffe7960
xor edx, edx
mov rcx, qword [rsp + 0x70]
call fcn.0042af50
lea r8, [rsp + 0x170]
mov dl, 1
mov rcx, qword [rsp + 0x70]
call sub.ntoskrnl.exe_ZwWaitForSingleObject
mov rcx, qword [rsp + 0x70]
call sub.ntoskrnl.exe_ZwClose
cmp qword [rsp + 0x68], 0
je 0x417663
mov eax, dword [rsp + 0x288]
and eax, 0x10
test eax, eax
je 0x417638
mov qword [rsp + 0x178], 0x1000
mov qword [rsp + 0x180], 0
lea rax, [rsp + 0x188]
mov rdi, rax
xor eax, eax
mov ecx, 0x28
rep stosb byte [rdi], al
mov qword [rsp + 0x1b0], 0
lea rax, [rsp + 0x1b8]
mov rdi, rax
xor eax, eax
mov ecx, 8
rep stosb byte [rdi], al
mov rcx, qword [rsp + 0x260]
call sub.ntoskrnl.exe_PsGetProcessId
mov qword [rsp + 0x190], rax
mov rax, qword [rsp + 0x68]
mov qword [rsp + 0x180], rax
mov byte [rsp + 0x1a8], 0
mov byte [rsp + 0x1a9], 1
mov qword [rsp + 0x1a0], 0x8000
mov qword [rsp + 0x198], 0x40
lea rax, [rsp + 0x68]
and rax, 0xfff
mov rcx, qword [rsp + 0x178]
lea rax, [rax + rcx + 0xfff]
shr rax, 0xc
shl eax, 0xc
mov eax, eax
mov qword [rsp + 0x188], rax
lea r8, [rsp + 0x1b0]
lea rdx, [rsp + 0x180]
mov rcx, qword [rsp + 0x260]
call fcn.004136a0
mov dword [rsp + 0x50], eax
jmp 0x417663
mov qword [rsp + 0x1c0], 0
mov r9d, 0x8000
lea r8, [rsp + 0x1c0]
lea rdx, [rsp + 0x68]
mov rcx, 0xffffffffffffffff
call sub.ntoskrnl.exe_ZwFreeVirtualMemory
cmp qword [rsp + 0x90], 0
je 0x41779a
mov eax, dword [rsp + 0x288]
and eax, 0x10
test eax, eax
je 0x41776f
mov qword [rsp + 0x1c8], 0x2000
mov qword [rsp + 0x1d0], 0
lea rax, [rsp + 0x1d8]
mov rdi, rax
xor eax, eax
mov ecx, 0x28
rep stosb byte [rdi], al
mov qword [rsp + 0x200], 0
lea rax, [rsp + 0x208]
mov rdi, rax
xor eax, eax
mov ecx, 8
rep stosb byte [rdi], al
mov rcx, qword [rsp + 0x260]
call sub.ntoskrnl.exe_PsGetProcessId
mov qword [rsp + 0x1e0], rax
mov rax, qword [rsp + 0x90]
mov qword [rsp + 0x1d0], rax
mov byte [rsp + 0x1f8], 0
mov byte [rsp + 0x1f9], 1
mov qword [rsp + 0x1f0], 0x8000
mov qword [rsp + 0x1e8], 0x40
lea rax, [rsp + 0x90]
and rax, 0xfff
mov rcx, qword [rsp + 0x1c8]
lea rax, [rax + rcx + 0xfff]
shr rax, 0xc
shl eax, 0xc
mov eax, eax
mov qword [rsp + 0x1d8], rax
lea r8, [rsp + 0x200]
lea rdx, [rsp + 0x1d0]
mov rcx, qword [rsp + 0x260]
call fcn.004136a0
mov dword [rsp + 0x50], eax
jmp 0x41779a
mov qword [rsp + 0x210], 0
mov r9d, 0x8000
lea r8, [rsp + 0x210]
lea rdx, [rsp + 0x68]
mov rcx, 0xffffffffffffffff
call sub.ntoskrnl.exe_ZwFreeVirtualMemory
lea rax, [rsp + 0x80]
cmp qword [rsp + 0x80], rax
je 0x4177ed
mov rax, qword [rsp + 0x80]
mov qword [rsp + 0x220], rax
mov rax, qword [rsp + 0x220]
mov qword [rsp + 0x218], rax
lea rcx, [rsp + 0x80]
call fcn.00417820
mov edx, 0x486e7367
mov rcx, qword [rsp + 0x220]
call sub.ntoskrnl.exe_ExFreePoolWithTag
jmp 0x41779a
mov eax, dword [rsp + 0x50]
add rsp, 0x250
pop rdi
ret