Function at 0x140002220
Capabilities:
Get uefi variable
Shutdown system

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x20], rsi
push rbp
push rdi
push r12
push r14
push r15
lea rbp, [rsp - 0x37]
sub rsp, 0xc0
mov rax, qword [0x140237008]
xor rax, rsp
mov qword [rbp + 0x2f], rax
dec edx
mov ebx, r8d
mov rdi, rcx
cmp edx, 5
ja case.default.0x140002271
movsxd rax, edx
lea rdx, [0x140000000]
mov ecx, dword [rdx + rax*4 + 0x28e4]
add rcx, rdx
jmp rcx
lea rcx, str.EnableWarnings
call sym.ProcessHacker.exe_PhGetIntegerSetting
nop
test eax, eax
je 0x1400022ad
xor r9d, r9d
mov byte [rsp + 0x20], 0
lea r8, str.the_computer
mov rcx, rdi
lea rdx, str.restart
call sym.ProcessHacker.exe_PhShowConfirmMessage
test al, al
je case.default.0x140002271
or ebx, 4
mov dword [rsp + 0x20], 0x80000000
mov r9d, ebx
xor r8d, r8d
xor edx, edx
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_InitiateShutdownW]
test eax, eax
je 0x14000283a
mov ecx, eax
call sym.ProcessHacker.exe_PhGetWin32Message
lea r9, str.Unable_to_restart_the_computer.
mov rbx, rax
test rax, rax
je 0x1400028a2
mov rdx, qword [rax + 8]
mov qword [rsp + 0x28], rdx
jmp 0x140002864
lea r8, str.restart
lea rdx, str.preforms_a_hard
lea rcx, str.This_option__s__s_in_an_disorderly_manner_and_may_cause_corrupted_files_or_instability_in_the_system.
call fcn.140001720
lea r8, str.the_computer
mov byte [rsp + 0x20], 1
lea rdx, str.restart
mov rcx, rdi
mov r9, qword [rax + 8]
call sym.ProcessHacker.exe_PhShowConfirmMessage
test al, al
je case.default.0x140002271
mov ecx, 1
call qword [sym.imp.ntdll.dll_NtShutdownSystem]
test eax, eax
jns 0x14000283a
mov r8d, eax
lea rdx, str.Unable_to_restart_the_computer.
xor r9d, r9d
lfence
mov rcx, rdi
call sym.ProcessHacker.exe_PhShowStatus
jmp case.default.0x140002271
lea r8, str.restart
lea rdx, str.forces_a_critical
lea rcx, str.This_option__s__s_in_an_disorderly_manner_and_may_cause_corrupted_files_or_instability_in_the_system.
call fcn.140001720
lea r8, str.the_computer
mov byte ss:[rsp + 0x20], 1
lea rdx, str.restart
mov rcx, rdi
mov r9, qword [rax + 8]
call sym.ProcessHacker.exe_PhShowConfirmMessage
test al, al
je case.default.0x140002271
mov edx, 6
mov r8d, 0x80000000
lea ecx, [rdx - 1]
call qword [sym.imp.ntdll.dll_NtSetSystemPowerState]
jmp 0x140002346
lea rcx, str.EnableWarnings
call sym.ProcessHacker.exe_PhGetIntegerSetting
test eax, eax
je 0x140002408
xor r9d, r9d
mov byte [rsp + 0x20], 0
lea r8, str.the_computer
mov rcx, rdi
lea rdx, str.restart
call sym.ProcessHacker.exe_PhShowConfirmMessage
nop dword [rax]
test al, al
je case.default.0x140002271
mov byte [rbp - 0x59], 1
call fcn.14011fc40
test al, al
jne 0x140002437
mov ebx, 0xc0000001
mov r8d, ebx
lea rdx, str.Unable_to_configure_the_advanced_boot_options.
xor r9d, r9d
lfence
mov rcx, rdi
call sym.ProcessHacker.exe_PhShowStatus
jmp case.default.0x140002271
mov rax, qword [0x140244b78]
lea rcx, [rbp - 0x41]
call qword [case.0x1400f654f.0]
mov ebx, eax
test eax, eax
js 0x14000241a
mov r14, qword [rbp - 0x41]
call fcn.14011fc40
test al, al
jne 0x1400024c5
mov ebx, 0xc0000001
mov rsi, r14
test rsi, rsi
je 0x140002486
call fcn.14011fc40
test al, al
je 0x140002486
mov rax, qword [0x140244b70]
mov rcx, rsi
call qword [case.0x1400f654f.0]
test ebx, ebx
js 0x14000241a
mov r9d, 4
mov dword [rsp + 0x20], 0x80000000
xor r8d, r8d
xor edx, edx
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_InitiateShutdownW]
test eax, eax
je 0x14000283a
mov ecx, eax
call sym.ProcessHacker.exe_PhGetWin32Message
lea r9, str.Unable_to_configure_the_advanced_boot_options.
nop dword [rax]
jmp 0x140002853
mov rax, qword [0x140244b88]
lea r8, ds:[rbp - 0x39]
lea rdx, [0x140237aa0]
mov rcx, r14
call qword [case.0x1400f654f.0]
mov ebx, eax
test eax, eax
js 0x140002460
mov r15, qword [rbp - 0x39]
call fcn.14011fc40
test al, al
jne 0x140002504
mov ebx, 0xc0000001
jmp 0x140002528
mov rax, qword [0x140244b80]
lea r8, ds:[rbp - 0x59]
mov r9d, 1
mov edx, 0x260000c3
mov rcx, r15
call qword [case.0x1400f654f.0]
mov ebx, eax
mov rsi, r14
test r15, r15
je 0x140002463
call fcn.14011fc40
nop dword [rax]
test al, al
je 0x140002463
mov rax, qword [0x140244b58]
mov rcx, r15
call qword [case.0x1400f654f.0]
jmp 0x140002463
lea rcx, [rbp - 0x21]
call sym.ProcessHacker.exe_PhGetOwnTokenAttributes
mov esi, 1
test byte [rax + 8], sil
je 0x1400027b8
mov rbx, 0xffffffffffffffff
lea r8, [rbp - 0x49]
mov rcx, rbx
lea edx, [rsi + 0x1f]
call qword [sym.imp.ntdll.dll_NtOpenProcessToken]
test eax, eax
js 0x1400027b8
mov rcx, qword [rbp - 0x49]
lea r8, [rbp + 0xf]
xor r15d, r15d
mov qword [rbp - 1], 0x16
mov rax, qword [rbp - 1]
mov r12d, 2
mov qword [rsp + 0x28], r15
xor r9d, r9d
xor edx, edx
mov qword [rbp + 0x13], rax
mov qword [rsp + 0x20], r15
mov dword [rbp + 0xf], esi
mov dword [rbp + 0x1b], r12d
call qword [sym.imp.ntdll.dll_NtAdjustPrivilegesToken]
mov rcx, qword [rbp - 0x49]
mov r14d, eax
call qword [sym.imp.ntdll.dll_NtClose]
nop
test r14d, r14d
js 0x1400027b8
cmp r14d, 0x106
je 0x1400027b8
lea rax, [0x1401da1dc]
mov dword [rbp - 0x31], 0x40002
xorps xmm0, xmm0
mov qword [rbp - 0x29], rax
lea r9, [rbp - 0x51]
mov dword [rbp - 0x51], r15d
xor r8d, r8d
mov qword [rsp + 0x20], r15
lea rdx, [rbp + 0x1f]
lea rcx, [rbp - 0x31]
movups xmmword [rbp + 0x1f], xmm0
lea r14d, [rsi + 3]
call qword [sym.imp.ntdll.dll_NtQuerySystemEnvironmentValueEx]
cmp eax, 0xc0000100
je 0x140002645
lea rax, str.This_machine_does_not_have_UEFI_support.
nop
jmp 0x1400027bf
lea rcx, str.EnableWarnings
call sym.ProcessHacker.exe_PhGetIntegerSetting
test eax, eax
je 0x14000267b
xor r9d, r9d
mov byte [rsp + 0x20], r15b
lea r8, str.the_computer
mov rcx, rdi
lea rdx, str.restart
call sym.ProcessHacker.exe_PhShowConfirmMessage
test al, al
je case.default.0x140002271
lea r9, [rbp - 5]
mov dword [rbp - 5], 8
lea r8, [rbp + 7]
mov dword [rbp - 9], r15d
lea rdx, [0x14023a6c8]
mov qword [rbp + 7], r15
lea rcx, [0x14023a678]
mov qword [rbp - 1], r15
mov qword [rsp + 0x20], r15
call qword [sym.imp.ntdll.dll_NtQuerySystemEnvironmentValueEx]
cmp eax, 0xc0000100
je 0x1400027ae
nop word [rax + rax]
test byte [rbp + 7], sil
je 0x1400027ae
test eax, eax
js 0x14000234e
lea rax, [rbp - 9]
lea r9, [rbp - 5]
mov qword [rsp + 0x20], rax
lea r8, [rbp - 1]
lea rdx, [0x14023a6c8]
lea rcx, [0x14023a668]
call qword [sym.imp.ntdll.dll_NtQuerySystemEnvironmentValueEx]
cmp eax, 0xc0000100
jne 0x140002703
mov dword [rbp - 9], esi
jmp 0x14000270e
test eax, eax
js 0x14000234e
mov esi, dword [rbp - 9]
mov r9d, dword [rbp - 5]
lea r8, [rbp - 1]
or qword [rbp - 1], 1
lea rdx, [0x14023a6c8]
lea rcx, [0x14023a668]
mov dword [rsp + 0x20], esi
call qword [sym.imp.ntdll.dll_NtSetSystemEnvironmentValueEx]
test eax, eax
js 0x14000234e
mov r9d, r14d
mov dword [rsp + 0x20], 0x80000000
xor r8d, r8d
xor edx, edx
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_InitiateShutdownW]
test eax, eax
je 0x14000283a
mov ecx, eax
call sym.ProcessHacker.exe_PhGetWin32Message
lea r9, str.Unable_to_restart_the_computer.
mov rsi, rax
test rax, rax
je 0x1400028a2
mov rcx, qword ds:[rax + 8]
mov edx, 0x20
mov qword [rsp + 0x28], rcx
mov r8d, 0xfffe
lea rcx, [0x1401b8d58]
mov qword [rsp + 0x20], rcx
mov rcx, rdi
call sym.ProcessHacker.exe_PhShowMessage2
lea rcx, [rsi - 0x10]
jmp 0x140002890
mov eax, 0xc00000bb
jmp 0x14000234e
lea rax, str.Make_sure_Process_Hacker_is_running_with_administrative_privileges.
lea r9, str.Unable_to_restart_to_firmware_options.
mov qword [rsp + 0x20], rax
mov r8d, 0xfffe
mov edx, esi
mov rcx, rdi
call sym.ProcessHacker.exe_PhShowMessage2
nop dword [rax + rax]
jmp case.default.0x140002271
lea rcx, str.EnableWarnings
call sym.ProcessHacker.exe_PhGetIntegerSetting
test eax, eax
je 0x14000281b
xor r9d, r9d
mov byte [rsp + 0x20], 0
lea r8, str.the_computer
mov rcx, rdi
lea rdx, str.update_and_restart
call sym.ProcessHacker.exe_PhShowConfirmMessage
test al, al
je case.default.0x140002271
mov r9d, 0x44
mov dword [rsp + 0x20], 0x80000000
xor r8d, r8d
xor edx, edx
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_InitiateShutdownW]
test eax, eax
jne 0x140002845
mov al, 1
jmp 0x1400028b8
mov ecx, eax
call sym.ProcessHacker.exe_PhGetWin32Message
lea r9, str.Unable_to_restart_the_computer.
mov rbx, rax
test rax, rax
je 0x1400028a2
mov rcx, qword [rax + 8]
mov qword [rsp + 0x28], rcx
lea rcx, [0x1401b8d58]
mov edx, 0x20
mov qword [rsp + 0x20], rcx
mov r8d, 0xfffe
mov rcx, rdi
call sym.ProcessHacker.exe_PhShowMessage2
lea rcx, [rbx - 0x10]
mov rbx, 0xffffffffffffffff
lock xadd dword [rcx + 8], ebx
cmp ebx, 1
jne case.default.0x140002271
call fcn.1400fbcc0
nop
jmp case.default.0x140002271
lea r8, [0x1401efb68]
mov edx, 0x10
mov rcx, rdi
call sym.ProcessHacker.exe_PhShowMessage
xor al, al
mov rcx, qword ds:[rbp + 0x2f]
xor rcx, rsp
call fcn.1401848a0
lea r11, [rsp + 0xc0]
mov rbx, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r12
pop rdi
pop rbp
ret