Function at 0x140002ac0
Capabilities:
Hide graphical window
Shutdown system

Disassembly:
sub rsp, 0xe8
mov rax, qword [0x140070a30]
xor rax, rsp
mov qword [rsp + 0xd8], rax
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
lea r8, [rsp + 0x60]
mov edx, 0x28
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
jne 0x140002b0e
lea r8, str.Fail_to_open_the_process_token
mov edx, 1
lea rcx, [0x1400430f0]
call fcn.140039830
mov eax, 0xc
imul rax, rax, 0
lea rax, [rsp + rax + 0xbc]
mov r8, rax
lea rdx, [0x140042f58]
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
mov dword [rsp + 0xb8], 1
mov eax, 0xc
imul rax, rax, 0
mov dword [rsp + rax + 0xc4], 2
mov qword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0
xor r9d, r9d
lea r8, [rsp + 0xb8]
xor edx, edx
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
mov edx, 0x80010002
mov ecx, 2
call qword [sym.imp.USER32.dll_ExitWindowsEx]
test eax, eax
je 0x140002bab
lea r8, str.Reboot_Request_ACCEPTED_successfully_by_Operating_System_n
mov edx, 1
lea rcx, [0x140043178]
call fcn.140039830
jmp 0x140002dd1
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x50], eax
lea r8, str.Reboot_Request_DENIED_by_Operating_System__n
mov edx, 1
lea rcx, [0x140043218]
call fcn.140039830
mov r9d, dword [rsp + 0x50]
lea r8, str.The_OS_return_value_for_reboot_request_is__d_n
mov edx, 3
lea rcx, [0x140043470]
call fcn.140039830
movzx eax, byte [0x140070a53]
test eax, eax
je 0x140002dd1
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov qword [rsp + 0x20], 0
lea r9, [0x140002010]
xor r8d, r8d
mov edx, 0x65
mov rcx, rax
call qword [sym.imp.USER32.dll_CreateDialogParamW]
mov qword [rsp + 0x40], rax
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.USER32.dll_GetParent]
mov qword [rsp + 0x58], rax
cmp qword [rsp + 0x58], 0
jne 0x140002c4a
call qword [sym.imp.USER32.dll_GetDesktopWindow]
mov qword [rsp + 0x58], rax
lea rdx, [rsp + 0xc8]
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.USER32.dll_GetWindowRect]
lea rdx, [rsp + 0xa8]
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.USER32.dll_GetWindowRect]
lea rdx, [rsp + 0xc8]
lea rcx, [rsp + 0x98]
call qword [sym.imp.USER32.dll_CopyRect]
mov eax, dword [rsp + 0xac]
neg eax
mov ecx, dword [rsp + 0xa8]
neg ecx
mov r8d, eax
mov edx, ecx
lea rcx, [rsp + 0xa8]
call qword [sym.imp.USER32.dll_OffsetRect]
mov eax, dword [rsp + 0x9c]
neg eax
mov ecx, dword [rsp + 0x98]
neg ecx
mov r8d, eax
mov edx, ecx
lea rcx, [rsp + 0x98]
call qword [sym.imp.USER32.dll_OffsetRect]
mov eax, dword [rsp + 0xb4]
neg eax
mov ecx, dword [rsp + 0xb0]
neg ecx
mov r8d, eax
mov edx, ecx
lea rcx, [rsp + 0x98]
call qword [sym.imp.USER32.dll_OffsetRect]
mov eax, dword [rsp + 0xa4]
cdq
sub eax, edx
sar eax, 1
mov ecx, dword [rsp + 0xcc]
add ecx, eax
mov eax, ecx
mov dword [rsp + 0x4c], eax
mov eax, dword [rsp + 0xa0]
cdq
sub eax, edx
sar eax, 1
mov ecx, dword [rsp + 0xc8]
add ecx, eax
mov eax, ecx
mov dword [rsp + 0x30], 1
mov dword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0
mov ecx, dword [rsp + 0x4c]
mov r9d, ecx
mov r8d, eax
xor edx, edx
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.USER32.dll_SetWindowPos]
mov edx, 1
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.USER32.dll_ShowWindow]
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.USER32.dll_UpdateWindow]
cmp qword [rsp + 0x40], 0
je 0x140002dd1
xor r9d, r9d
xor r8d, r8d
xor edx, edx
lea rcx, [rsp + 0x68]
call qword [sym.imp.USER32.dll_GetMessageW]
mov dword [rsp + 0x48], eax
cmp dword [rsp + 0x48], 0
je 0x140002dd1
cmp dword [rsp + 0x48], 0xffffffff
jne 0x140002da5
mov eax, 0xffffffff
jmp 0x140002dd1
lea rdx, [rsp + 0x68]
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.USER32.dll_IsDialogMessageW]
test eax, eax
jne 0x140002dcf
lea rcx, [rsp + 0x68]
call qword [sym.imp.USER32.dll_TranslateMessage]
lea rcx, [rsp + 0x68]
call qword [sym.imp.USER32.dll_DispatchMessageW]
jmp 0x140002d79
mov rcx, qword [rsp + 0xd8]
xor rcx, rsp
call fcn.14003a110
add rsp, 0xe8
ret