Function at 0x100031d0
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 0x10003406
lea ecx, [esp + 0x30]
push ecx
push str.SeDebugPrivilege
push ebx
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
test eax, eax
je 0x100033fc
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 0x100033fc
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 0x100033fc
mov eax, dword [esp + 8]
cmp eax, ebx
jbe 0x100033fc
push esi
push 4
push 0x1000
push eax
push ebx
call fcn.100081b0
mov esi, eax
mov dword [esp + 0x2c], esi
cmp esi, ebx
je 0x100033fb
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 0x100033e7
cmp dword [esp + 0xc], ebx
jbe 0x100033eb
push ebp
mov dword [esp + 0x24], ebx
call fcn.100036b0
mov dword [esp + 0x2c], eax
mov ebp, esi
jmp 0x100032c0
mov eax, dword [ebp + 0x44]
cmp eax, dword [esp + 0x2c]
je 0x100033d7
mov ecx, dword [esp + 0x48]
cmp dword [ebp + 0x50], ecx
jne 0x100033d7
push eax
push ebx
push 0x400
call fcn.10008950
mov edi, eax
cmp edi, ebx
je 0x100033d7
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 0x100033cb
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 0x100033bd
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x100033bd
mov edx, dword [esp + 0x18]
push edx
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call fcn.100052e0
mov esi, eax
cmp esi, ebx
je 0x100033bd
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 0x100033af
mov eax, dword [esi]
push 0x16
push eax
call dword [sym.imp.ADVAPI32.dll_IsWellKnownSid]
test eax, eax
je 0x100033af
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 0x100033af
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.100088d0
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 0x100033e6
mov eax, dword [ebp]
cmp eax, ebx
je 0x100033e6
add ebp, eax
jne 0x100032c0
pop ebp
mov edi, dword [esp + 0x24]
mov edx, dword [esp + 0xc]
push 0x8000
push edx
push esi
call fcn.1000cea0
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