Function at 0x10005860
Capabilities:
Acquire debug privileges
Enumerate processes via ntquerysysteminformation
Get system information on windows

Disassembly:
sub esp, 0x34
push ebx
push edi
lea eax, [esp + 0x14]
push eax
push 0x28
xor ebx, ebx
xor edi, edi
push 0xffffffffffffffff
mov dword [esp + 0x2c], edi
mov dword [esp + 0x20], ebx
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x10005a96
lea ecx, [esp + 0x30]
push ecx
push 0x10001878
push ebx
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
test eax, eax
je 0x10005a8c
mov eax, dword [esp + 0x14]
push ebx
push ebx
push 0x10
lea edx, [esp + 0x38]
push edx
push ebx
push eax
mov dword [esp + 0x44], 1
mov dword [esp + 0x50], 2
call dword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
test eax, eax
je 0x10005a8c
lea ecx, [esp + 8]
push ecx
push ebx
push ebx
push 5
mov dword [esp + 0x18], ebx
call sub.NTDLL.dll_NtQuerySystemInformation
cmp eax, 0xc0000004
jne 0x10005a8c
mov eax, dword [esp + 8]
cmp eax, ebx
jbe 0x10005a8c
push esi
push 4
push 0x1000
push eax
push ebx
call fcn.1000f100
mov esi, eax
mov dword [esp + 0x2c], esi
cmp esi, ebx
je 0x10005a8b
mov eax, dword [esp + 0xc]
lea edx, [esp + 0xc]
push edx
push eax
push esi
push 5
call sub.NTDLL.dll_NtQuerySystemInformation
test eax, eax
js 0x10005a77
cmp dword [esp + 0xc], ebx
jbe 0x10005a7b
push ebp
mov dword [esp + 0x24], ebx
call fcn.1000d4c0
mov dword [esp + 0x2c], eax
mov ebp, esi
jmp 0x10005950
mov eax, dword [ebp + 0x44]
cmp eax, dword [esp + 0x2c]
je 0x10005a67
mov ecx, dword [esp + 0x48]
cmp dword [ebp + 0x50], ecx
jne 0x10005a67
push eax
push ebx
push 0x400
call fcn.10007730
mov edi, eax
cmp edi, ebx
je 0x10005a67
lea edx, [esp + 0x14]
push edx
push 0xa
push edi
mov dword [esp + 0x20], ebx
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x10005a5b
mov ecx, dword [esp + 0x14]
lea eax, [esp + 0x18]
push eax
push ebx
push ebx
push 1
push ecx
mov dword [esp + 0x2c], ebx
call dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
jne 0x10005a4d
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x10005a4d
mov edx, dword [esp + 0x18]
push edx
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call fcn.1000abd0
mov esi, eax
cmp esi, ebx
je 0x10005a4d
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x14]
lea eax, [esp + 0x18]
push eax
push ecx
push esi
push 1
push edx
call dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
je 0x10005a3f
mov eax, dword [esi]
push 0x16
push eax
call dword [sym.imp.ADVAPI32.dll_IsWellKnownSid]
test eax, eax
je 0x10005a3f
mov edx, dword [esp + 0x14]
lea ecx, [esp + 0x20]
push ecx
push 1
push 2
push ebx
push 0x2000000
push edx
mov dword [esp + 0x38], ebx
call dword [sym.imp.ADVAPI32.dll_DuplicateTokenEx]
test eax, eax
je 0x10005a3f
mov eax, dword [esp + 0x20]
mov dword [esp + 0x28], eax
mov dword [esp + 0x24], 1
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call fcn.1000b040
mov ecx, dword [esp + 0x14]
push ecx
call sub.NTDLL.dll_NtClose
mov esi, dword [esp + 0x30]
push edi
call sub.NTDLL.dll_NtClose
cmp dword [esp + 0x24], ebx
jne 0x10005a76
mov eax, dword [ebp]
cmp eax, ebx
je 0x10005a76
add ebp, eax
jne 0x10005950
pop ebp
mov edi, dword [esp + 0x24]
mov edx, dword [esp + 0xc]
push 0x8000
push edx
push esi
call fcn.1000c2f0
pop esi
mov eax, dword [esp + 0x14]
push eax
call sub.NTDLL.dll_NtClose
mov eax, edi
pop edi
pop ebx
add esp, 0x34
ret