Function at 0x180007128
Capabilities:
Enumerate processes

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
mov qword [rsp + 0x20], rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x2b0
mov rax, qword [0x18010e350]
xor rax, rsp
mov qword [rsp + 0x2a0], rax
lea r12, [rcx + 0x18]
mov r15, rcx
mov rcx, qword [r12]
test rcx, rcx
je 0x180007174
call qword [sym.imp.KERNEL32.dll_CloseHandle]
and qword [r12], 0
mov ebp, 1
xor edx, edx
lea ecx, [rbp + 1]
mov edi, ebp
call sub.KERNEL32.dll_CreateToolhelp32Snapshot
cmp rax, 0xffffffffffffffff
mov r13, rax
je 0x180007491
lea rcx, [rsp + 0x64]
mov ebx, ebp
xor edx, edx
mov r8d, 0x234
mov dword [rsp + 0x40], ebx
call fcn.180086e90
lea rdx, [rsp + 0x60]
mov rcx, r13
mov dword [rsp + 0x60], 0x238
call sub.KERNEL32.dll_Process32FirstW
jmp 0x18000747e
test ebx, ebx
je 0x180007486
mov r8d, dword [rsp + 0x68]
xor edx, edx
mov ecx, 0x400
call qword [sym.imp.KERNEL32.dll_OpenProcess]
and qword [rsp + 0x38], 0
xor ebx, ebx
test rax, rax
mov r14, rax
je 0x180007201
lea r8, [rsp + 0x38]
lea edx, [rbx + 0xa]
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
mov ebx, eax
and dword [rsp + 0x30], 0
xor esi, esi
test ebx, ebx
je 0x180007277
mov rcx, qword [rsp + 0x38]
lea rax, [rsp + 0x30]
xor r9d, r9d
xor r8d, r8d
mov edx, ebp
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
mov ebx, eax
jne 0x180007277
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x180007277
mov eax, dword [rsp + 0x30]
test eax, eax
je 0x180007277
lea ecx, [rsi + 0x40]
mov rdx, rax
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
test rax, rax
mov rsi, rax
je 0x180007277
mov r9d, dword [rsp + 0x30]
mov rcx, qword [rsp + 0x38]
lea rax, [rsp + 0x30]
mov r8, rsi
mov edx, ebp
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_GetTokenInformation]
mov ebx, eax
xor ebp, ebp
test ebx, ebx
je 0x180007414
mov rcx, qword [rsp + 0x38]
lea rax, [rsp + 0x30]
lea edx, [rbp + 6]
xor r9d, r9d
xor r8d, r8d
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
mov ebx, eax
jne 0x1800072f6
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x1800072ee
mov eax, dword [rsp + 0x30]
test eax, eax
je 0x1800072ee
lea ecx, [rbp + 0x40]
mov rdx, rax
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
test rax, rax
mov rbp, rax
je 0x1800072ee
mov r9d, dword [rsp + 0x30]
mov rcx, qword [rsp + 0x38]
lea rax, [rsp + 0x30]
lea edx, [rbx + 6]
mov r8, rbp
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_GetTokenInformation]
mov ebx, eax
test ebx, ebx
je 0x180007414
test rsi, rsi
je 0x180007410
mov rcx, qword [rsi]
test rcx, rcx
je 0x180007410
call qword [sym.imp.ADVAPI32.dll_IsValidSid]
test eax, eax
je 0x180007410
mov rcx, qword [rsi]
and qword [rsp + 0x48], 0
lea rdx, [rsp + 0x48]
call sub.ADVAPI32.dll_ConvertSidToStringSidW
test eax, eax
mov ebx, eax
je 0x180007400
mov rcx, qword [rsp + 0x48]
test rcx, rcx
je 0x180007410
cmp word [rcx], 0
je 0x180007405
mov rdx, qword [r15 + 0x10]
call fcn.180086a50
test eax, eax
jne 0x180007400
mov rcx, qword [rsp + 0x38]
lea r9d, [rax + 2]
xor r8d, r8d
mov edx, 0x2000000
mov qword [rsp + 0x28], r12
mov dword [rsp + 0x20], 1
call qword [sym.imp.ADVAPI32.dll_DuplicateTokenEx]
test eax, eax
mov ebx, eax
je 0x1800073ec
mov r9d, dword [rsp + 0x30]
mov rcx, qword [r12]
mov r8, rbp
mov edx, 6
call qword [sym.imp.ADVAPI32.dll_SetTokenInformation]
test eax, eax
mov ebx, eax
je 0x1800073ec
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
and dword [rsp + 0x50], 0
lea rdx, [rsp + 0x50]
mov ecx, eax
call qword [sym.imp.KERNEL32.dll_ProcessIdToSessionId]
test eax, eax
mov ebx, eax
je 0x1800073ec
mov rcx, qword [r12]
mov r9d, 4
lea r8, [rsp + 0x50]
lea edx, [r9 + 8]
call qword [sym.imp.ADVAPI32.dll_SetTokenInformation]
test eax, eax
mov ebx, eax
je 0x1800073ec
and dword [rsp + 0x40], 0
xor edi, edi
jmp 0x180007400
mov rcx, qword [r12]
test rcx, rcx
je 0x180007400
call qword [sym.imp.KERNEL32.dll_CloseHandle]
and qword [r12], 0
mov rcx, qword [rsp + 0x48]
test rcx, rcx
je 0x180007410
call qword [sym.imp.KERNEL32.dll_LocalFree]
test ebx, ebx
jne 0x180007428
call qword [sym.imp.KERNEL32.dll_GetLastError]
movzx edi, ax
or edi, 0x80070000
test eax, eax
cmovle edi, eax
test rsi, rsi
je 0x180007436
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_LocalFree]
test rbp, rbp
je 0x180007444
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov rcx, qword [rsp + 0x38]
test rcx, rcx
je 0x18000745a
call qword [sym.imp.KERNEL32.dll_CloseHandle]
and qword [rsp + 0x38], 0
test r14, r14
je 0x180007468
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea rdx, [rsp + 0x60]
mov rcx, r13
call sub.KERNEL32.dll_Process32NextW
mov ebx, dword [rsp + 0x40]
mov ebp, 1
test eax, eax
jne 0x1800071c4
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x1800074a5
call qword [sym.imp.KERNEL32.dll_GetLastError]
movzx edi, ax
or edi, 0x80070000
test eax, eax
cmovle edi, eax
mov eax, edi
mov rcx, qword [rsp + 0x2a0]
xor rcx, rsp
call fcn.180086e60
lea r11, [rsp + 0x2b0]
mov rbx, qword [r11 + 0x38]
mov rbp, qword [r11 + 0x40]
mov rsi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rdi
ret