Function at 0x14000572c
Capabilities:
Enumerate processes via ntquerysysteminformation
Get system information on windows

Disassembly:
mov qword [rsp + 8], rbx
push rbp
push rsi
push rdi
push r14
push r15
lea rbp, [rsp - 0x37]
sub rsp, 0x90
mov eax, 0x40000
mov rsi, rcx
mov dword [rbp + 0x6f], eax
mov r15d, 0xc000009a
mov ebx, eax
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8d, ebx
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov r14, rax
test rax, rax
je 0x14000594d
mov r8d, dword [rbp + 0x6f]
lea r9, [rbp + 0x6f]
mov rdx, rax
mov ecx, 5
call qword [sym.imp.ntdll.dll_NtQuerySystemInformation]
mov r15d, eax
test eax, eax
js 0x140005923
mov rbx, r14
xor ecx, ecx
add rbx, rcx
cmp dword [rbx + 4], 0
je 0x1400057f7
lea r9, [rbx + 0x128]
mov edx, 0x200
lea r8, [0x14000e008]
lea rcx, [rbp + 0x7f]
call qword [sym.imp.ntdll.dll_NtOpenThread]
test eax, eax
js 0x1400057f7
mov rdx, qword [rbp + 0x7f]
lea r8, [0x14000e1e0]
mov rcx, 0xfffffffffffffffe
call qword [sym.imp.ntdll.dll_NtImpersonateThread]
xor edi, edi
test eax, eax
lea ecx, [rdi + 1]
cmovns edi, ecx
mov rcx, qword [rbp + 0x7f]
call qword [sym.imp.ntdll.dll_NtClose]
test edi, edi
jne 0x14000580c
mov ecx, dword [rbx]
test ecx, ecx
jne 0x14000579d
lea rdx, str.Impersonate_error_r_n
mov rcx, rsi
call fcn.14000108c
mov rbx, r14
xor eax, eax
add rbx, rax
xor ecx, ecx
mov qword [rbp - 0x11], rcx
mov rax, qword [rbx + 0x50]
mov qword [rbp - 0x19], rax
test rax, rax
je 0x140005907
lea r9, [rbp - 0x19]
mov edx, 0x1000
lea r8, [0x14000e008]
lea rcx, [rbp - 0x21]
call qword [sym.imp.ntdll.dll_NtOpenProcess]
test eax, eax
jns 0x140005869
mov r8, qword [rbp - 0x19]
lea r9, [rbx + 0x38]
lea rdx, str.OpenProcess__p__wZ__x_r_n
mov dword [rsp + 0x20], eax
mov rcx, rsi
call fcn.14000108c
jmp 0x14000590e
mov rcx, qword [rbp - 0x21]
lea r8, [rbp - 0x29]
mov edx, 8
call qword [sym.imp.ntdll.dll_NtOpenProcessToken]
test eax, eax
jns 0x14000589d
mov r8, qword [rbp - 0x19]
lea r9, [rbx + 0x38]
lea rdx, str.OpenProcessToken__p__wZ__x_r_n
mov dword [rsp + 0x20], eax
mov rcx, rsi
call fcn.14000108c
jmp 0x1400058fb
mov rcx, qword [rbp - 0x29]
lea rax, [rbp + 0x77]
mov r9d, 0x38
mov qword [rsp + 0x20], rax
lea r8, [rbp - 9]
lea edx, [r9 - 0x2e]
call qword [sym.imp.ntdll.dll_NtQueryInformationToken]
test eax, eax
jns 0x1400058df
mov r8, qword [rbp - 0x19]
lea r9, [rbx + 0x38]
lea rdx, str.QueryInformationToken__p__wZ__x_r_n
mov dword [rsp + 0x20], eax
mov rcx, rsi
call fcn.14000108c
jmp 0x1400058f1
mov eax, dword [rbp - 1]
mov dword [rbx + 0xe8], eax
mov eax, dword [rbp + 3]
mov dword [rbx + 0xec], eax
mov rcx, qword [rbp - 0x29]
call qword [sym.imp.ntdll.dll_NtClose]
mov rcx, qword [rbp - 0x21]
call qword [sym.imp.ntdll.dll_NtClose]
jmp 0x14000590e
and qword [rbx + 0xe8], rcx
mov eax, dword [rbx]
test eax, eax
jne 0x140005811
mov rdx, r14
mov rcx, rsi
call fcn.140005134
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, r14
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
cmp r15d, 0xc0000004
jne 0x140005948
mov eax, dword [rbp + 0x6f]
jmp 0x14000574f
test r15d, r15d
jns 0x14000595f
mov r8d, r15d
lea rdx, str.QuerySystemInformation_SystemProcessInformation__x_r_n
mov rcx, rsi
call fcn.14000108c
mov rbx, qword [rsp + 0xc0]
add rsp, 0x90
pop r15
pop r14
pop rdi
pop rsi
pop rbp
ret