Function at 0x140178e10
Capabilities:
Shutdown system

Disassembly:
mov byte [rsp + 0x20], r9b
mov dword [rsp + 0x18], r8d
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
sub rsp, 0x148
mov rax, qword [0x1408fa960]
xor rax, rsp
mov qword [rsp + 0x130], rax
mov rax, qword [rsp + 0x150]
add rax, 8
mov rcx, rax
call fcn.140016540
mov rax, qword [rsp + 0x150]
mov dword [rax], 0
mov qword [rsp + 0x30], 0xffffffffffffffff
mov qword [rsp + 0x40], 0xffffffffffffffff
call fcn.140176d40
cmp eax, 3
jl 0x140179194
mov rcx, qword [rsp + 0x158]
call fcn.1400165c0
movzx eax, al
test eax, eax
je 0x140178ea1
lea rax, str.SeShutdownPrivilege
mov qword [rsp + 0x48], rax
jmp 0x140178ead
lea rax, str.SeRemoteShutdownPrivilege
mov qword [rsp + 0x48], rax
mov rdx, qword [rsp + 0x48]
lea rcx, [rsp + 0x90]
call fcn.1400179b0
nop
lea rcx, [rsp + 0x90]
call fcn.14000c690
lea r8, [rsp + 0x60]
mov rdx, rax
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
test eax, eax
jne 0x140178f38
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, qword [rsp + 0x150]
mov dword [rcx], eax
mov rax, qword [rsp + 0x150]
mov edx, dword [rax]
lea rcx, [rsp + 0xb0]
call fcn.1400f1950
mov qword [rsp + 0x58], rax
mov rax, qword [rsp + 0x150]
add rax, 8
mov rdx, qword [rsp + 0x58]
mov rcx, rax
call fcn.14001e7a0
lea rcx, [rsp + 0xb0]
call fcn.14000a800
jmp 0x140179187
mov dword [rsp + 0x80], 1
mov eax, reloc.OLEAUT32.dll_VariantTimeToDosDateTime
imul rax, rax, 0
mov rcx, qword [rsp + 0x60]
mov qword [rsp + rax + 0x84], rcx
mov eax, reloc.OLEAUT32.dll_VariantTimeToDosDateTime
imul rax, rax, 0
mov dword [rsp + rax + 0x8c], 2
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov r8d, eax
xor edx, edx
mov ecx, 0x1fffff
call qword [sym.imp.KERNEL32.dll_OpenProcess]
mov qword [rsp + 0x30], rax
cmp qword [rsp + 0x30], 0
jne 0x140178fe7
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, qword [rsp + 0x150]
mov dword [rcx], eax
mov rax, qword [rsp + 0x150]
mov edx, dword [rax]
lea rcx, [rsp + 0xd0]
call fcn.1400f1950
mov qword [rsp + 0x68], rax
mov rax, qword [rsp + 0x150]
add rax, 8
mov rdx, qword [rsp + 0x68]
mov rcx, rax
call fcn.14001e7a0
lea rcx, [rsp + 0xd0]
call fcn.14000a800
jmp 0x140179187
lea r8, [rsp + 0x40]
mov edx, reloc.msi.dll_MsiEnumClientsA
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
jne 0x140179062
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, qword [rsp + 0x150]
mov dword [rcx], eax
mov rax, qword [rsp + 0x150]
mov edx, dword [rax]
lea rcx, [rsp + 0xf0]
call fcn.1400f1950
mov qword [rsp + 0x70], rax
mov rax, qword [rsp + 0x150]
add rax, 8
mov rdx, qword [rsp + 0x70]
mov rcx, rax
call fcn.14001e7a0
lea rcx, [rsp + 0xf0]
call fcn.14000a800
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x140179187
mov qword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0
xor r9d, r9d
lea r8, [rsp + 0x80]
xor edx, edx
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
test eax, eax
jne 0x1401790fa
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, qword [rsp + 0x150]
mov dword [rcx], eax
mov rax, qword [rsp + 0x150]
mov edx, dword [rax]
lea rcx, [rsp + 0x110]
call fcn.1400f1950
mov qword [rsp + 0x78], rax
mov rax, qword [rsp + 0x150]
add rax, 8
mov rdx, qword [rsp + 0x78]
mov rcx, rax
call fcn.14001e7a0
lea rcx, [rsp + 0x110]
call fcn.14000a800
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x140179170
movzx eax, byte [rsp + 0x168]
test eax, eax
je 0x140179110
mov dword [rsp + 0x38], 1
jmp 0x140179118
mov dword [rsp + 0x38], 0
mov rcx, qword [rsp + 0x158]
call fcn.1400165c0
movzx eax, al
test eax, eax
je 0x140179137
mov qword [rsp + 0x50], 0
jmp 0x140179149
mov rcx, qword [rsp + 0x158]
call fcn.14000c690
mov qword [rsp + 0x50], rax
mov dword [rsp + 0x20], 1
mov r9d, dword [rsp + 0x38]
mov r8d, dword [rsp + 0x160]
lea rdx, str.Machine_being_rebooted_by_P_Synch
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.ADVAPI32.dll_InitiateSystemShutdownW]
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop
lea rcx, [rsp + 0x90]
call fcn.14000a800
mov rax, qword [rsp + 0x150]
cmp dword [rax], 0
jne 0x1401791ab
mov dword [rsp + 0x3c], 1
jmp 0x1401791b3
mov dword [rsp + 0x3c], 0
movzx eax, byte [rsp + 0x3c]
mov rcx, qword [rsp + 0x130]
xor rcx, rsp
call fcn.140222a60
add rsp, 0x148
ret