Function at 0x1002aef7
Capabilities:
Shutdown system

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x64
mov al, byte [0x100e6003]
or byte [0x100e6003], 0x80
mov byte [ebp - 1], al
xor eax, eax
push ebx
mov ebx, dword [ebp + 0xc]
push esi
xor esi, esi
cmp dword [ebp + 8], esi
push edi
setne al
mov dword [ebp + 8], eax
mov eax, ebx
and al, 0x70
neg al
sbb eax, eax
neg eax
mov dword [ebp - 0x18], eax
mov eax, ebx
and al, 0x72
neg al
sbb eax, eax
neg eax
cmp dword [ebp + 8], esi
mov dword [ebp - 0x14], eax
je 0x1002af44
mov byte [ebp + 0xf], 1
jmp 0x1002af4e
mov eax, ebx
shr eax, 5
and al, 2
mov byte [ebp + 0xf], al
mov edi, ebx
shr edi, 0xe
and edi, 1
call fcn.10042924
mov dword [ebp - 0x10], eax
shrd eax, edx, 0x10
push str.ASNT5SHUTDOWN
mov dword [ebp - 0x10], eax
shr edx, 0x10
call fcn.100120f4
pop ecx
xor ecx, ecx
cmp eax, esi
mov dword [ebp - 0x20], eax
je 0x1002af85
mov eax, ebx
not eax
inc ecx
and eax, ecx
jmp 0x1002af89
xor eax, eax
inc eax
inc ecx
cmp eax, esi
je 0x1002af9e
cmp dword [ebp - 0x18], esi
je 0x1002af9e
cmp dword [ebp - 0x10], 0x60002
mov dword [ebp - 0xc], ecx
jae 0x1002afa1
mov dword [ebp - 0xc], esi
cmp edi, esi
jne 0x1002afaf
cmp dword [ebp - 0x14], esi
je 0x1002afaf
mov dword [ebp - 0x10], ecx
jmp 0x1002afb6
cmp edi, esi
mov dword [ebp - 0x10], esi
jne 0x1002afbe
cmp dword [ebp - 0x14], esi
mov dword [ebp - 0x14], ecx
jne 0x1002afc1
mov dword [ebp - 0x14], esi
push 0x12c
lea ecx, [ebp - 8]
call fcn.10045fcc
movzx eax, byte [ebp + 0xf]
push eax
push dword [ebp - 0x18]
movzx eax, byte [ebp - 1]
push dword [ebp - 0x14]
push esi
push dword [ebp - 0x10]
push dword [ebp - 0xc]
push dword [ebp - 0x20]
push eax
push dword [ebp + 0x10]
push ebx
push dword [ebp + 8]
push str._nBoot_0x_X__0x_X____S___Main0x_X__d_op__d__d:0x_X__d__d:_d_
push dword [ebp - 8]
call dword [sym.imp.USER32.dll_wsprintfA]
push dword [ebp - 8]
call fcn.1000fde0
add esp, 0x38
lea ecx, [ebp - 8]
call fcn.1003f96c
push 0xf
pop ecx
xor eax, eax
mov dword [ebp - 0x64], 0x44
mov dword [ebp - 0x60], esi
lea edi, [ebp - 0x5c]
rep stosd dword es:[edi], eax
lea eax, [ebp - 0x64]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoW]
push dword [ebp + 0x10]
call dword [sym.imp.KERNEL32.dll_lstrlenW]
add eax, 0xf0
push eax
lea ecx, [ebp - 0x1c]
call fcn.10046141
movzx eax, word [ebp - 0x34]
push eax
push dword [ebp + 8]
push ebx
push dword [ebp + 0x10]
push str.__s__Down0x_X_Reboot0x_X_sa.wShowWindow0x_X
push dword [ebp - 0x1c]
call dword [sym.imp.USER32.dll_wsprintfW]
push ebx
push dword [ebp - 0x1c]
call fcn.1002ade0
push esi
push 2
pop ebx
push ebx
push str.SeShutdownPrivilege
call fcn.10013699
push esi
push ebx
push str.SeRemoteShutdownPrivilege
call fcn.10013699
add esp, 0x38
cmp dword [ebp - 0xc], esi
je 0x1002b0b9
push dword [ebp + 8]
push 1
push esi
push 0x100c6a64
push esi
call dword [sym.imp.ADVAPI32.dll_InitiateSystemShutdownW]
push esi
push esi
push 0x2710
mov ecx, 0x100e3108
call fcn.10011621
push str.___next
call fcn.1000fde0
pop ecx
cmp dword [ebp - 0x10], esi
mov edi, 0x100e3108
je 0x1002b0d8
push esi
push 1
push 0xa
push ebx
push esi
push 1
push 0x16
push esi
push edi
call fcn.1001cab4
add esp, 0x24
cmp dword [ebp - 0x14], esi
je 0x1002b101
push esi
push 1
push 0xa
push ebx
push esi
push esi
push 0x10
push esi
push edi
call fcn.1001cab4
push esi
push 1
push 0xa
push ebx
push esi
push esi
push ebx
push esi
push edi
call fcn.1001cab4
add esp, 0x48
cmp dword [ebp - 0x18], esi
je 0x1002b135
push str.NtShutdownSystem
push str.NTDLL
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
xor ecx, ecx
inc ecx
cmp eax, esi
je 0x1002b133
xor ecx, ecx
cmp byte [ebp + 0xf], 1
setne cl
inc ecx
push ecx
call eax
mov ecx, eax
mov esi, ecx
lea ecx, [ebp - 0x1c]
call fcn.1003f96c
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret