Function at 0x525170
Capabilities:
Shutdown system

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
mov eax, dword [0x906648]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
xor esi, esi
mov dword [ebp - 0x2c], 0
push 0x74
push ebx
xor edi, edi
mov dword [ebp - 0x28], esi
mov dword [ebp - 0x30], esi
call fcn.00537ae0
add esp, 8
test eax, eax
je 0x5251ca
push 0x74
push ebx
mov dword [ebp - 0x28], esi
call fcn.00537b10
add esp, 8
test eax, eax
je 0x5251d7
push 0xa
lea ecx, [ebp - 0x28]
push ecx
push eax
call fcn.004f4030
add esp, 0xc
mov dword [ebp - 0x28], eax
push ebx
call fcn.00537c70
add esp, 4
test eax, eax
je 0x5251e1
mov esi, 0x16
jmp 0x525428
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
lea ecx, [ebp - 0x2c]
push ecx
push 0xf01ff
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
jne 0x525231
mov dword [ebp - 0x2c], esi
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.004f1a60
add esp, 4
mov esi, eax
test byte [0x9538a8], 1
je 0x525428
push esi
call fcn.004f1b00
push eax
push esi
push esi
push str.API_OpenProcessToken_failed:_err__d__0x_x_:__s_n
push 0x46
jmp 0x52540e
lea eax, [ebp - 0x10]
push eax
push str.SeShutdownPrivilege
push 0
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
test eax, eax
jne 0x525279
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.004f1a60
add esp, 4
mov esi, eax
test byte [0x9538a8], 1
je 0x525428
push esi
call fcn.004f1b00
push eax
push esi
push esi
push str.API_LookupPrivilegeValue_failed:_err__d__0x_x_:__s_n
push 0x52
jmp 0x52540e
push 0
push 0
push 0
lea eax, [ebp - 0x14]
mov dword [ebp - 0x14], 1
push eax
push 0
push dword [ebp - 0x2c]
mov dword [ebp - 8], 2
call dword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
test eax, eax
jne 0x5252d3
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.004f1a60
add esp, 4
mov esi, eax
test byte [0x9538a8], 1
je 0x525428
push esi
call fcn.004f1b00
push eax
push esi
push esi
push str.API_AdjustTokenPrivileges_failed:_err__d__0x_x_:__s_n
push 0x60
jmp 0x52540e
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x52531b
test byte [0x9538a8], 1
je 0x525313
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
push eax
call esi
push eax
push str.Failed_to_set_SE_SHUTDOWN_NAME_privilege:_err__d__0x_x__n
push 0x67
push str.E:_workspace_AC_CC_Windows_TACC_MASTER_master_src_solidifier_cmd_cmd_reboot.c
push str.cmd_reboot_restart
push dword [0x7b05d4]
push 1
call fcn.004f21c0
add esp, 0x20
or esi, 0xffffffff
jmp 0x525428
push 0x6d
push ebx
call fcn.00537ae0
add esp, 8
test eax, eax
je 0x5253ca
push 0x6d
push ebx
call fcn.00537b10
mov edi, eax
add esp, 8
test edi, edi
je 0x5253ca
lea eax, [ebp - 0x24]
push eax
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
push str._Enable_
push edi
call fcn.004f3800
add esp, 8
test eax, eax
jne 0x525394
mov ebx, dword [ebp - 0x28]
mov eax, 0x88888889
mul ebx
movzx eax, word [ebp - 0x18]
shr edx, 5
push edx
push eax
movzx eax, word [ebp - 0x1a]
push eax
movzx eax, word [ebp - 0x1c]
push eax
push 0x5b3920
call fcn.00552400
add esp, 0x14
mov dword [ebp - 0x30], 1
mov edi, eax
jmp 0x5253cd
push str._Disable_
push edi
call fcn.004f3800
mov ebx, dword [ebp - 0x28]
add esp, 8
test eax, eax
jne 0x5253cd
mov eax, 0x88888889
mul ebx
movzx eax, word [ebp - 0x18]
shr edx, 5
push edx
push eax
movzx eax, word [ebp - 0x1a]
push eax
movzx eax, word [ebp - 0x1c]
push eax
push 0x5b3800
jmp 0x525381
mov ebx, dword [ebp - 0x28]
push 1
push 1
push ebx
push edi
push 0
call dword [sym.imp.ADVAPI32.dll_InitiateSystemShutdownW]
test eax, eax
jne 0x525428
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
push eax
call fcn.004f1a60
add esp, 4
mov esi, eax
test byte [0x9538a8], 1
je 0x525428
push esi
call fcn.004f1b00
push eax
push esi
push esi
push str.API_InitiateSystemShutdownEx_failed:_err__d__0x_x_:__s_n
push 0x88
push str.E:_workspace_AC_CC_Windows_TACC_MASTER_master_src_solidifier_cmd_cmd_reboot.c
push str.cmd_reboot_restart
push dword [0x7b05d4]
push 1
call fcn.004f21c0
add esp, 0x28
mov eax, dword [ebp - 0x2c]
test eax, eax
je 0x525436
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x30], 0
je 0x525445
push edi
call fcn.004f3570
add esp, 4
mov ecx, dword [ebp - 4]
mov eax, esi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0063c972
mov esp, ebp
pop ebp
ret