Function at 0x180009d40
Capabilities:
Enumerate processes

Disassembly:
mov dword [rsp + 0x10], edx
mov qword [rsp + 8], rcx
push rdi
sub rsp, 0x400
mov rax, qword [0x1803a5f20]
xor rax, rsp
mov qword [rsp + 0x3f0], rax
mov byte [rsp + 0x30], 0
cmp dword [rsp + 0x418], 0
je 0x180009d7d
cmp qword [rsp + 0x410], 0
jne 0x180009d87
movzx eax, byte [rsp + 0x30]
jmp 0x18000a1c8
mov qword [rsp + 0x38], 0
mov dword [rsp + 0x48], 4
mov dword [rsp + 0x4c], 0
mov dword [rsp + 0x50], 0xffffffff
call qword [sym.imp.KERNEL32.dll_WTSGetActiveConsoleSessionId]
mov dword [rsp + 0x50], eax
mov qword [rsp + 0x58], 0
mov dword [rsp + 0x90], 0x238
xor edx, edx
mov ecx, 2
call sub.KERNEL32.dll_CreateToolhelp32Snapshot
mov qword [rsp + 0x58], rax
cmp qword [rsp + 0x58], 0xffffffffffffffff
je 0x18000a1c3
lea rdx, [rsp + 0x90]
mov rcx, qword [rsp + 0x58]
call sub.KERNEL32.dll_Process32FirstW
cmp eax, 1
jne 0x18000a1b8
mov eax, 2
imul rax, rax, 9
mov ecx, 0x65
mov word [rsp + rax + 0x3d0], cx
mov eax, 2
imul rax, rax, 0xa
mov ecx, 0x78
mov word [rsp + rax + 0x3d0], cx
mov eax, 2
imul rax, rax, 0
mov ecx, 0x65
mov word [rsp + rax + 0x3d0], cx
mov eax, 2
imul rax, rax, 7
mov ecx, 0x72
mov word [rsp + rax + 0x3d0], cx
mov eax, 2
imul rax, rax, 1
mov ecx, 0x78
mov word [rsp + rax + 0x3d0], cx
mov eax, 2
imul rax, rax, 2
mov ecx, 0x70
mov word [rsp + rax + 0x3d0], cx
mov eax, 2
imul rax, rax, 8
mov ecx, 0x2e
mov word [rsp + rax + 0x3d0], cx
mov eax, 2
imul rax, rax, 6
mov ecx, 0x65
mov word [rsp + rax + 0x3d0], cx
mov eax, 2
imul rax, rax, 5
mov ecx, 0x72
mov word [rsp + rax + 0x3d0], cx
mov eax, 2
imul rax, rax, 0xc
mov qword [rsp + 0x78], rax
cmp qword [rsp + 0x78], 0x1a
jae 0x180009edc
jmp 0x180009ee1
call fcn.1800f1588
xor eax, eax
mov rcx, qword [rsp + 0x78]
mov word [rsp + rcx + 0x3d0], ax
mov eax, 2
imul rax, rax, 3
mov ecx, 0x6c
mov word [rsp + rax + 0x3d0], cx
mov eax, 2
imul rax, rax, 0xb
mov ecx, 0x65
mov word [rsp + rax + 0x3d0], cx
mov eax, 2
imul rax, rax, 4
mov ecx, 0x6f
mov word [rsp + rax + 0x3d0], cx
lea rdx, [rsp + 0xbc]
lea rcx, [rsp + 0x3d0]
call fcn.1800fc1b0
test eax, eax
jne 0x18000a19d
mov qword [rsp + 0x40], 0
mov r8d, dword [rsp + 0x98]
xor edx, edx
mov ecx, 0x1fffff
call qword [sym.imp.KERNEL32.dll_OpenProcess]
mov qword [rsp + 0x40], rax
cmp qword [rsp + 0x40], 0
je 0x18000a19d
lea r8, [rsp + 0x38]
mov edx, 8
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x18000a181
lea rax, [rsp + 0x48]
mov qword [rsp + 0x20], rax
mov r9d, dword [rsp + 0x48]
lea r8, [rsp + 0x4c]
mov edx, 0xc
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
je 0x18000a12d
mov eax, dword [rsp + 0x4c]
cmp dword [rsp + 0x50], eax
jne 0x18000a0f3
mov dword [rsp + 0x68], 0
mov dword [rsp + 0x2d0], 0
lea rax, [rsp + 0x2d4]
mov rdi, rax
xor eax, eax
mov ecx, 0xfc
rep stosb byte [rdi], al
lea rax, [rsp + 0x68]
mov qword [rsp + 0x20], rax
mov r9d, 0x100
lea r8, [rsp + 0x2d0]
mov edx, 1
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
je 0x18000a0b4
lea rdx, [rsp + 0x70]
mov rcx, qword [rsp + 0x2d0]
call sub.ADVAPI32.dll_ConvertSidToStringSidW
test eax, eax
je 0x18000a0b4
mov rax, qword [rsp + 0x70]
mov qword [rsp + 0x80], rax
mov qword [rsp + 0x60], 0xffffffffffffffff
inc qword [rsp + 0x60]
mov rax, qword [rsp + 0x80]
mov rcx, qword [rsp + 0x60]
cmp word [rax + rcx*2], 0
jne 0x18000a058
mov rax, qword [rsp + 0x60]
mov ecx, dword [rsp + 0x418]
cmp rax, rcx
jae 0x18000a0a9
mov eax, dword [rsp + 0x418]
mov r9, qword [rsp + 0x70]
lea r8, [0x18010cf68]
mov edx, eax
mov rcx, qword [rsp + 0x410]
call fcn.180013aa0
mov byte [rsp + 0x30], 1
mov rcx, qword [rsp + 0x70]
call qword [sym.imp.KERNEL32.dll_LocalFree]
cmp qword [rsp + 0x38], 0
je 0x18000a0d0
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rsp + 0x38], 0
cmp qword [rsp + 0x40], 0
je 0x18000a0ec
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rsp + 0x40], 0
jmp 0x18000a1b8
cmp qword [rsp + 0x38], 0
je 0x18000a10f
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rsp + 0x38], 0
cmp qword [rsp + 0x40], 0
je 0x18000a12b
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rsp + 0x40], 0
jmp 0x18000a165
cmp qword [rsp + 0x38], 0
je 0x18000a149
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rsp + 0x38], 0
cmp qword [rsp + 0x40], 0
je 0x18000a165
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rsp + 0x40], 0
cmp qword [rsp + 0x38], 0
je 0x18000a181
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rsp + 0x38], 0
cmp qword [rsp + 0x40], 0
je 0x18000a19d
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rsp + 0x40], 0
lea rdx, [rsp + 0x90]
mov rcx, qword [rsp + 0x58]
call sub.KERNEL32.dll_Process32NextW
cmp eax, 1
je 0x180009dfe
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
movzx eax, byte [rsp + 0x30]
mov rcx, qword [rsp + 0x3f0]
xor rcx, rsp
call fcn.1800f1430
add rsp, 0x400
pop rdi
ret