Function at 0x140014220
Capabilities:
Shutdown system

Disassembly:
mov rax, rsp
push rbp
lea rbp, [rax - 0x38]
sub rsp, 0x130
mov qword [rsp + 0x40], 0xfffffffffffffffe
mov qword [rax + 8], rbx
mov qword [rax + 0x18], rdi
mov rax, qword [0x14006b088]
xor rax, rsp
mov qword [rbp + 0x20], rax
mov rdi, rdx
mov byte [rsp + 0x38], 1
mov qword [rsp + 0x20], 0x3a
lea r9, [0x1400595d0]
mov r8d, 0x16
lea rdx, str.PIE_Common
lea rcx, [rsp + 0x60]
call fcn.140011450
lea rax, vtable.CTracePieCommon.0
mov qword [rsp + 0x60], rax
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov rcx, rax
lea r8, [rsp + 0x48]
mov edx, 0x28
call qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
jne 0x140014312
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r9d, eax
lea r8, str.Failed_to_get_current_process_token_handle__error_code:__d
mov edx, 2
lea rcx, [rsp + 0x60]
call fcn.140011590
mov rcx, qword [rsp + 0x48]
test rcx, rcx
je 0x1400142dc
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor ebx, ebx
mov qword [rsp + 0x48], rbx
lea rax, vtable.CTracePie.0
mov qword [rsp + 0x60], rax
cmp byte [rbp + 0x11], 1
jne 0x14001430b
cmp byte [rbp + 0x10], 0
jne 0x14001430b
lea r8, [0x140056e3c]
mov edx, 5
lea rcx, [rsp + 0x60]
call fcn.140011590
nop
xor eax, eax
jmp 0x140014545
mov dword [rsp + 0x5c], 2
mov dword [rsp + 0x50], 1
lea r8, [rsp + 0x54]
lea rdx, str.SeShutdownPrivilege
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
test eax, eax
jne 0x140014359
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r9d, eax
lea r8, str.LookupPrivilegeValue_failed__error_code:__d
mov edx, 2
lea rcx, [rsp + 0x60]
call fcn.140011590
xor ebx, ebx
mov qword [rsp + 0x28], rbx
mov qword [rsp + 0x20], rbx
xor r9d, r9d
lea r8, [rsp + 0x50]
xor edx, edx
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
test eax, eax
jne 0x1400143e6
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r9d, eax
lea r8, str.AdjustTokenPrivileges_failed__error_code:__d
lea edx, [rbx + 2]
lea rcx, [rsp + 0x60]
call fcn.140011590
mov rcx, qword [rsp + 0x48]
test rcx, rcx
je 0x1400143b0
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rsp + 0x48], rbx
lea rax, vtable.CTracePie.0
mov qword [rsp + 0x60], rax
cmp byte [rbp + 0x11], 1
jne 0x1400143df
cmp byte [rbp + 0x10], 0
jne 0x1400143df
lea r8, [0x140056e3c]
mov edx, 5
lea rcx, [rsp + 0x60]
call fcn.140011590
nop
xor eax, eax
jmp 0x140014545
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x140014454
mov r9d, eax
lea r8, str.Not_all_priviledges_were_adjusted__error_code:__d
mov edx, 2
lea rcx, [rsp + 0x60]
call fcn.140011590
mov rcx, qword [rsp + 0x48]
test rcx, rcx
je 0x14001441e
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rsp + 0x48], rbx
lea rax, vtable.CTracePie.0
mov qword [rsp + 0x60], rax
cmp byte [rbp + 0x11], 1
jne 0x14001444d
cmp byte [rbp + 0x10], 0
jne 0x14001444d
lea r8, [0x140056e3c]
mov edx, 5
lea rcx, [rsp + 0x60]
call fcn.140011590
nop
xor eax, eax
jmp 0x140014545
mov dword [rsp + 0x20], 1
xor r9d, r9d
lea r8d, [r9 + 0x78]
mov rdx, rdi
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_InitiateSystemShutdownW]
test eax, eax
jne 0x1400144d9
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r9d, eax
lea r8, str.Failed_to_initiate_system_shutdown__error_code:__d
mov edx, 2
lea rcx, [rsp + 0x60]
call fcn.140011590
mov rcx, qword [rsp + 0x48]
test rcx, rcx
je 0x1400144a6
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rsp + 0x48], rbx
lea rax, vtable.CTracePie.0
mov qword [rsp + 0x60], rax
cmp byte [rbp + 0x11], 1
jne 0x1400144d5
cmp byte [rbp + 0x10], 0
jne 0x1400144d5
lea r8, [0x140056e3c]
mov edx, 5
lea rcx, [rsp + 0x60]
call fcn.140011590
nop
xor eax, eax
jmp 0x140014545
mov dword [rsp + 0x5c], ebx
mov qword [rsp + 0x28], rbx
mov qword [rsp + 0x20], rbx
xor r9d, r9d
lea r8, [rsp + 0x50]
xor edx, edx
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
mov rcx, qword [rsp + 0x48]
test rcx, rcx
je 0x140014511
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rsp + 0x48], rbx
lea rax, vtable.CTracePie.0
mov qword [rsp + 0x60], rax
cmp byte [rbp + 0x11], 1
jne 0x140014540
cmp byte [rbp + 0x10], 0
jne 0x140014540
lea r8, [0x140056e3c]
mov edx, 5
lea rcx, [rsp + 0x60]
call fcn.140011590
nop
mov eax, 1
mov rcx, qword [rbp + 0x20]
xor rcx, rsp
call fcn.14001e5b0
lea r11, [rsp + 0x130]
mov rbx, qword [r11 + 0x10]
mov rdi, qword [r11 + 0x20]
mov rsp, r11
pop rbp
ret