Function at 0x10005830
Capabilities:
Acquire debug privileges
Print debug messages
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x7c
mov eax, dword [0x10016034]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov edi, ecx
call fcn.100057a0
mov esi, eax
push edi
mov dword [ebp - 0x64], esi
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
test esi, esi
je 0x10005d26
push esi
push 0
push 0x401
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov esi, eax
mov dword [ebp - 0x54], esi
test esi, esi
je 0x10005d26
lea eax, [ebp - 0x50]
push eax
push 0xf01ff
push esi
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x10005d1f
lea ecx, [ebp - 0x6c]
push ecx
push str.SeDebugPrivilege
push 0
mov dword [ebp - 0x58], 0x10
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueA]
mov edx, dword [ebp - 0x6c]
mov eax, dword [ebp - 0x68]
mov esi, dword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
lea ecx, [ebp - 0x58]
push ecx
mov ecx, dword [ebp - 0x50]
mov dword [ebp - 0x2c], edx
lea edx, [ebp - 0x40]
push edx
push 0x10
mov dword [ebp - 0x28], eax
lea eax, [ebp - 0x30]
push eax
push 0
mov ebx, 1
mov edi, 2
push ecx
mov dword [ebp - 0x30], ebx
mov dword [ebp - 0x24], edi
call esi
mov eax, dword [ebp - 0x50]
push 0
push 0
push 0x10
lea edx, [ebp - 0x30]
push edx
push ebx
push eax
call esi
mov ecx, dword [ebp - 0x50]
lea edx, [ebp - 0x4c]
push edx
push str.SeDebugPrivilege
push 0
mov dword [ebp - 0x44], ecx
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueA]
test eax, eax
je 0x10005931
mov eax, dword [ebp - 0x4c]
mov ecx, dword [ebp - 0x48]
push 0
push 0
push 0x10
lea edx, [ebp - 0x14]
push edx
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x44]
push 0
push eax
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0xc], ecx
mov dword [ebp - 8], edi
call esi
mov ecx, dword [ebp - 0x50]
lea edx, [ebp - 0x4c]
push edx
push str.SeChangeNotifyPrivilege
push 0
mov dword [ebp - 0x44], ecx
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueA]
test eax, eax
je 0x10005970
mov eax, dword [ebp - 0x4c]
mov ecx, dword [ebp - 0x48]
push 0
push 0
push 0x10
lea edx, [ebp - 0x14]
push edx
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x44]
push 0
push eax
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0xc], ecx
mov dword [ebp - 8], edi
call esi
mov ecx, dword [ebp - 0x50]
lea edx, [ebp - 0x4c]
push edx
push str.SeTcbPrivilege
push 0
mov dword [ebp - 0x44], ecx
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueA]
test eax, eax
je 0x100059af
mov eax, dword [ebp - 0x4c]
mov ecx, dword [ebp - 0x48]
push 0
push 0
push 0x10
lea edx, [ebp - 0x14]
push edx
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x44]
push 0
push eax
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0xc], ecx
mov dword [ebp - 8], edi
call esi
mov ecx, dword [ebp - 0x50]
lea edx, [ebp - 0x4c]
push edx
push str.SeImpersonatePrivilege
push 0
mov dword [ebp - 0x44], ecx
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueA]
test eax, eax
je 0x100059ee
mov eax, dword [ebp - 0x4c]
mov ecx, dword [ebp - 0x48]
push 0
push 0
push 0x10
lea edx, [ebp - 0x14]
push edx
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x44]
push 0
push eax
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0xc], ecx
mov dword [ebp - 8], edi
call esi
mov ecx, dword [ebp - 0x50]
lea edx, [ebp - 0x4c]
push edx
push str.SeLoadDriverPrivilege
push 0
mov dword [ebp - 0x44], ecx
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueA]
test eax, eax
je 0x10005a2d
mov eax, dword [ebp - 0x4c]
mov ecx, dword [ebp - 0x48]
push 0
push 0
push 0x10
lea edx, [ebp - 0x14]
push edx
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x44]
push 0
push eax
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0xc], ecx
mov dword [ebp - 8], edi
call esi
mov ecx, dword [ebp - 0x50]
lea edx, [ebp - 0x4c]
push edx
push str.SeRestorePrivilege
push 0
mov dword [ebp - 0x44], ecx
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueA]
test eax, eax
je 0x10005a6c
mov eax, dword [ebp - 0x4c]
mov ecx, dword [ebp - 0x48]
push 0
push 0
push 0x10
lea edx, [ebp - 0x14]
push edx
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x44]
push 0
push eax
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0xc], ecx
mov dword [ebp - 8], edi
call esi
mov ecx, dword [ebp - 0x50]
lea edx, [ebp - 0x4c]
push edx
push str.SeBackupPrivilege
push 0
mov dword [ebp - 0x44], ecx
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueA]
test eax, eax
je 0x10005aab
mov eax, dword [ebp - 0x4c]
mov ecx, dword [ebp - 0x48]
push 0
push 0
push 0x10
lea edx, [ebp - 0x14]
push edx
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x44]
push 0
push eax
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0xc], ecx
mov dword [ebp - 8], edi
call esi
mov ecx, dword [ebp - 0x50]
lea edx, [ebp - 0x4c]
push edx
push str.SeSecurityPrivilege
push 0
mov dword [ebp - 0x44], ecx
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueA]
test eax, eax
je 0x10005aea
mov eax, dword [ebp - 0x4c]
mov ecx, dword [ebp - 0x48]
push 0
push 0
push 0x10
lea edx, [ebp - 0x14]
push edx
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x44]
push 0
push eax
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0xc], ecx
mov dword [ebp - 8], edi
call esi
mov ecx, dword [ebp - 0x50]
lea edx, [ebp - 0x4c]
push edx
push str.SeSystemEnvironmentPrivilege
push 0
mov dword [ebp - 0x44], ecx
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueA]
test eax, eax
je 0x10005b29
mov eax, dword [ebp - 0x4c]
mov ecx, dword [ebp - 0x48]
push 0
push 0
push 0x10
lea edx, [ebp - 0x14]
push edx
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x44]
push 0
push eax
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0xc], ecx
mov dword [ebp - 8], edi
call esi
mov ecx, dword [ebp - 0x50]
lea edx, [ebp - 0x4c]
push edx
push str.SeIncreaseQuotaPrivilege
push 0
mov dword [ebp - 0x44], ecx
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueA]
test eax, eax
je 0x10005b68
mov eax, dword [ebp - 0x4c]
mov ecx, dword [ebp - 0x48]
push 0
push 0
push 0x10
lea edx, [ebp - 0x14]
push edx
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x44]
push 0
push eax
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0xc], ecx
mov dword [ebp - 8], edi
call esi
mov ecx, dword [ebp - 0x50]
lea edx, [ebp - 0x4c]
push edx
push str.SeTakeOwnershipPrivilege
push 0
mov dword [ebp - 0x44], ecx
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueA]
test eax, eax
je 0x10005ba7
mov eax, dword [ebp - 0x4c]
mov ecx, dword [ebp - 0x48]
push 0
push 0
push 0x10
lea edx, [ebp - 0x14]
push edx
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x44]
push 0
push eax
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0xc], ecx
mov dword [ebp - 8], edi
call esi
mov ecx, dword [ebp - 0x50]
lea edx, [ebp - 0x4c]
push edx
push str.SeIncreaseBasePriorityPrivilege
push 0
mov dword [ebp - 0x44], ecx
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueA]
test eax, eax
je 0x10005be6
mov eax, dword [ebp - 0x4c]
mov ecx, dword [ebp - 0x48]
push 0
push 0
push 0x10
lea edx, [ebp - 0x14]
push edx
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x44]
push 0
push eax
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0xc], ecx
mov dword [ebp - 8], edi
call esi
mov ecx, dword [ebp - 0x50]
lea edx, [ebp - 0x4c]
push edx
push str.SeShutdownPrivilege
push 0
mov dword [ebp - 0x44], ecx
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueA]
test eax, eax
je 0x10005c25
mov eax, dword [ebp - 0x4c]
mov ecx, dword [ebp - 0x48]
push 0
push 0
push 0x10
lea edx, [ebp - 0x14]
push edx
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x44]
push 0
push eax
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0xc], ecx
mov dword [ebp - 8], edi
call esi
mov ecx, dword [ebp - 0x50]
lea edx, [ebp - 0x4c]
push edx
push str.SeAssignPrimaryTokenPrivilege
push 0
mov dword [ebp - 0x44], ecx
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueA]
test eax, eax
je 0x10005c64
mov eax, dword [ebp - 0x4c]
mov ecx, dword [ebp - 0x48]
push 0
push 0
push 0x10
lea edx, [ebp - 0x14]
push edx
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x44]
push 0
push eax
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0xc], ecx
mov dword [ebp - 8], edi
call esi
lea ecx, [ebp - 0x20]
xor edi, edi
mov edx, ecx
mov dword [ebp - 0x5c], edi
push edx
mov word [ebp - 0x20], 0x101
mov byte [ebp - 0x19], 0x10
mov dword [ebp - 0x18], edi
mov dword [ebp - 0x5c], 0x20
mov dword [ebp - 0x60], ecx
call dword [sym.imp.ADVAPI32.dll_GetLengthSid]
mov ecx, dword [ebp - 0x50]
add eax, 8
push eax
lea eax, [ebp - 0x60]
push eax
push 0x19
push ecx
call dword [sym.imp.ADVAPI32.dll_SetTokenInformation]
mov edx, dword [ebp - 0x64]
push edx
lea ecx, [ebp - 0x7c]
call fcn.1000e2a0
mov ecx, dword [ebp - 0x78]
mov eax, dword [ebp - 0x7c]
sub ecx, eax
sar ecx, 2
add esp, 4
test ecx, ecx
je 0x10005ce1
mov edi, edi
mov edx, dword [eax + edi*4]
push 0
push 0
push 0x12
push edx
call dword [sym.imp.USER32.dll_PostThreadMessageA]
mov ecx, dword [ebp - 0x78]
mov eax, dword [ebp - 0x7c]
sub ecx, eax
add edi, ebx
sar ecx, 2
cmp edi, ecx
jb 0x10005cc0
mov edx, dword [ebp - 0x54]
push 0
push edx
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov eax, dword [ebp - 0x58]
mov edx, dword [ebp - 0x50]
push 0
push 0
push eax
lea ecx, [ebp - 0x40]
push ecx
push 0
push edx
call esi
mov eax, dword [ebp - 0x50]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x7c]
test eax, eax
je 0x10005d1c
push eax
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
mov esi, dword [ebp - 0x54]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.1001015c
mov esp, ebp
pop ebp
ret