Function at 0x422ccb
Capabilities:
Shutdown system

Disassembly:
push 0x104
mov eax, 0x4c9ad4
call fcn.004981ed
xor eax, eax
xor esi, esi
mov dword [ebp - 0x30], esi
lea edi, [ebp - 0x2c]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
lea eax, [ebp - 0x14]
push eax
push 0x28
mov dword [ebp - 0x14], esi
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
jne 0x422d95
lea eax, [ebp - 0x110]
push eax
call fcn.00405267
lea eax, [ebp - 0x108]
push 0x4e3b90
push eax
mov dword [ebp - 4], esi
call fcn.00405d69
pop ecx
pop ecx
lea eax, [ebp - 0x88]
push eax
lea ecx, [ebp - 0x110]
call fcn.004052f9
mov byte [ebp - 4], 1
cmp dword [eax + 0x18], 8
jb 0x422d48
mov eax, dword [eax + 4]
jmp 0x422d4b
add eax, 4
push eax
lea eax, [ebp - 0x50]
push eax
call fcn.00425a3b
push eax
lea eax, [ebp - 0x6c]
push eax
mov byte [ebp - 4], 2
call fcn.004167e3
add esp, 0x10
mov byte [ebp - 4], 3
cmp dword [eax + 0x18], 0x10
jb 0x422d75
mov eax, dword [eax + 4]
jmp 0x422d78
add eax, 4
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x10]
push eax
lea ecx, [ebp - 0x20]
call fcn.0048ec72
push 0x4f7698
lea eax, [ebp - 0x20]
push eax
call fcn.0048febc
mov ebx, dword [ebp - 0x14]
mov dword [ebp - 0x34], ebx
lea eax, [ebp - 0x2c]
push eax
push str.SeShutdownPrivilege
push esi
mov dword [ebp - 4], 4
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
test eax, eax
jne 0x422e21
lea eax, [ebp - 0x110]
push eax
call fcn.00405267
lea eax, [ebp - 0x108]
push str.LookupPrivilegeValue_SE_SHUTDOWN_NAME_
push eax
mov byte [ebp - 4], 5
call fcn.00405d69
pop ecx
pop ecx
lea eax, [ebp - 0x6c]
push eax
lea ecx, [ebp - 0x110]
call fcn.004052f9
mov byte [ebp - 4], 6
cmp dword [eax + 0x18], 8
jb 0x422df7
mov eax, dword [eax + 4]
jmp 0x422dfa
add eax, 4
push eax
lea eax, [ebp - 0x50]
push eax
call fcn.00425a3b
push eax
lea eax, [ebp - 0x88]
push eax
mov byte [ebp - 4], 7
call fcn.004167e3
add esp, 0x10
mov byte [ebp - 4], 8
jmp 0x422d6a
push 2
pop edi
push esi
push esi
push esi
lea eax, [ebp - 0x30]
push eax
push esi
push dword [ebp - 0x14]
mov dword [ebp - 0x30], 1
mov dword [ebp - 0x24], edi
call dword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
test eax, eax
jne 0x422eae
lea eax, [ebp - 0x110]
push eax
call fcn.00405267
lea eax, [ebp - 0x108]
push 0x4e3c30
push eax
mov byte [ebp - 4], 9
call fcn.00405d69
pop ecx
pop ecx
lea eax, [ebp - 0x6c]
push eax
lea ecx, [ebp - 0x110]
call fcn.004052f9
mov byte [ebp - 4], 0xa
cmp dword [eax + 0x18], 8
jb 0x422e84
mov eax, dword [eax + 4]
jmp 0x422e87
add eax, 4
push eax
lea eax, [ebp - 0x50]
push eax
call fcn.00425a3b
push eax
lea eax, [ebp - 0x88]
push eax
mov byte [ebp - 4], 0xb
call fcn.004167e3
add esp, 0x10
mov byte [ebp - 4], 0xc
jmp 0x422d6a
push esi
push edi
call dword [sym.imp.USER32.dll_ExitWindowsEx]
test eax, eax
jne 0x422f25
lea eax, [ebp - 0x110]
push eax
call fcn.00405267
lea eax, [ebp - 0x108]
push 0x4e3c5c
push eax
mov byte [ebp - 4], 0xd
call fcn.00405d69
pop ecx
pop ecx
lea eax, [ebp - 0x6c]
push eax
lea ecx, [ebp - 0x110]
call fcn.004052f9
mov byte [ebp - 4], 0xe
cmp dword [eax + 0x18], 8
jb 0x422efb
mov eax, dword [eax + 4]
jmp 0x422efe
add eax, 4
push eax
lea eax, [ebp - 0x50]
push eax
call fcn.00425a3b
push eax
lea eax, [ebp - 0x88]
push eax
mov byte [ebp - 4], 0xf
call fcn.004167e3
add esp, 0x10
mov byte [ebp - 4], 0x10
jmp 0x422d6a
cmp ebx, esi
je 0x422f30
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
call fcn.004982c5
ret