Function at 0x14002a380
Capabilities:
Shutdown system

Disassembly:
mov qword [rsp + 0x18], rbx
mov qword [rsp + 0x20], rsi
push rbp
push rdi
push r14
lea rbp, [rsp - 0x5b0]
sub rsp, 0x6b0
mov rax, qword [0x1401b8010]
xor rax, rsp
mov qword [rbp + 0x5a0], rax
mov edi, edx
mov ebx, ecx
call qword [sym.imp.WINMM.dll_timeGetTime]
mov dword [rbp + 0x180], eax
mov r9, 0xffffffffffffffff
lea r8, str.system_shutdown::common::initiate_system_shutdown
mov edx, 0x102
lea rcx, [rbp + 0x184]
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcsncpy_s]
lea r8, [0x1401815c4]
mov edx, 0x104
lea rcx, [rbp + 0x184]
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcscat_s]
mov r9, 0xffffffffffffffff
lea r8, str.system_shutdown::common::initiate_system_shutdown
mov edx, 0x104
lea rcx, [rbp + 0x38c]
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcsncpy_s]
mov ecx, dword [0x1401c1658]
mov eax, dword [0x1401c165c]
xor esi, esi
add ecx, eax
je 0x14002a4da
mov dword [rsp + 0x50], esi
call fcn.140005ad0
mov qword [rsp + 0x48], rax
lock inc dword [rsp + 0x50]
mov rax, qword [rsp + 0x48]
test rax, rax
jne 0x14002a459
call fcn.140005ad0
mov qword [rsp + 0x48], rax
lock inc dword [rsp + 0x50]
mov rcx, qword [rsp + 0x48]
mov dword [rsp + 0x78], 0x20
mov edx, 1
lea rax, [rbp + 0x184]
mov qword [rsp + 0x30], rax
lea rax, str.____s
mov qword [rsp + 0x28], rax
lea rax, [rbp + 0x38c]
mov qword [rsp + 0x20], rax
lea r9, [0x140000000]
lea r8, [rsp + 0x78]
movsx edx, dx
call fcn.140004c90
nop
mov qword [rsp + 0x48], rsi
mov eax, 0xffffffff
lock xadd dword [rsp + 0x50], eax
cmp eax, 1
js 0x14002a4d5
nop dword [rax]
call fcn.140005e40
mov eax, 0xffffffff
lock xadd dword [rsp + 0x50], eax
cmp eax, 1
jns 0x14002a4c0
lock inc dword [rsp + 0x50]
lea r14, vtable.ATL::CAccessToken.0
mov qword [rsp + 0x58], r14
xorps xmm0, xmm0
movdqu xmmword [rsp + 0x60], xmm0
mov qword [rsp + 0x70], rsi
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
lea r8, [rbp - 0x80]
mov edx, 0x28
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x14002a68f
mov rax, qword [rsp + 0x58]
lea rcx, [rsp + 0x58]
mov rax, qword [rax + 8]
call qword [case.0x140077645.0]
mov rax, qword [rbp - 0x80]
mov qword [rsp + 0x60], rax
mov byte [rsp + 0x40], 0
lea r9, [rsp + 0x40]
lea rcx, [rsp + 0x58]
call fcn.140029d60
test al, al
je 0x14002a646
cmp byte [rsp + 0x40], 0
jne 0x14002a646
mov dword [rsp + 0x20], edi
mov r9d, ebx
xor r8d, r8d
xor edx, edx
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_InitiateShutdownW]
mov edi, eax
test eax, eax
je 0x14002a5ed
lea r8, str.system_shutdown::common::initiate_system_shutdown
mov edx, 4
lea rcx, [rbp + 0x80]
call fcn.140005190
mov rbx, rax
movzx eax, byte [rax + 0x80]
test al, al
je 0x14002a5d4
lea rdx, str.Could_not_initiate_the_system_shutdown._Error:
mov rcx, rbx
call fcn.140006540
movzx eax, byte [rbx + 0x80]
test al, al
je 0x14002a5d4
mov edx, edi
mov rcx, rbx
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64___cdecl_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__::operator___unsigned_long_int____ptr64]
cmp byte [rbx + 0x80], 0
je 0x14002a5d4
mov edx, 0x2e
mov rcx, rbx
call fcn.140030d30
nop
lea rcx, [rbp + 0x118]
call fcn.140004f20
lea rcx, [rbp + 0x118]
call qword [sym.imp.MSVCP140.dll_public_virtual:_void___cdecl_std::basic_ios_wchar_t__struct_std::char_traits_wchar_t__::destructor_void____ptr64]
lea rcx, [rsp + 0x58]
call fcn.14002a050
test al, al
jne 0x14002a6d6
lea r8, str.system_shutdown::common::initiate_system_shutdown
mov edx, 4
lea rcx, [rbp - 0x78]
call fcn.140005190
nop
cmp byte [rax + 0x80], 0
je 0x14002a62e
lea rdx, str.Could_not_disable_the_shutdown_privilege.
mov rcx, rax
call fcn.140006540
nop
lea rcx, [rbp + 0x20]
call fcn.140004f20
lea rcx, [rbp + 0x20]
call qword [sym.imp.MSVCP140.dll_public_virtual:_void___cdecl_std::basic_ios_wchar_t__struct_std::char_traits_wchar_t__::destructor_void____ptr64]
jmp 0x14002a6d6
lea r8, str.system_shutdown::common::initiate_system_shutdown
mov edx, 0x10
lea rcx, [rbp - 0x78]
call fcn.140005190
nop
cmp byte [rax + 0x80], 0
je 0x14002a675
lea rdx, str.Could_not_enable_the_shutdown_privilege_.
mov rcx, rax
call fcn.140006540
nop
lea rcx, [rbp + 0x20]
call fcn.140004f20
lea rcx, [rbp + 0x20]
call qword [sym.imp.MSVCP140.dll_public_virtual:_void___cdecl_std::basic_ios_wchar_t__struct_std::char_traits_wchar_t__::destructor_void____ptr64]
mov edi, 0x522
jmp 0x14002a6d6
lea r8, str.system_shutdown::common::initiate_system_shutdown
mov edx, 4
lea rcx, [rbp - 0x78]
call fcn.140005190
nop
cmp byte [rax + 0x80], 0
je 0x14002a6be
lea rdx, str.Could_not_get_the_current_process_token.
mov rcx, rax
call fcn.140006540
nop
lea rcx, [rbp + 0x20]
call fcn.140004f20
lea rcx, [rbp + 0x20]
call qword [sym.imp.MSVCP140.dll_public_virtual:_void___cdecl_std::basic_ios_wchar_t__struct_std::char_traits_wchar_t__::destructor_void____ptr64]
mov edi, 0x3f0
mov qword [rsp + 0x58], r14
mov rdx, qword [rsp + 0x68]
mov rcx, qword [rsp + 0x60]
test rdx, rdx
je 0x14002a6ff
test rcx, rcx
je 0x14002a6fa
call qword [sym.imp.USERENV.dll_UnloadUserProfile]
mov rcx, qword [rsp + 0x60]
mov qword [rsp + 0x68], rsi
test rcx, rcx
je 0x14002a70f
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rsp + 0x60], rsi
mov edx, 8
mov rcx, qword [rsp + 0x70]
call fcn.14007e2a0
mov qword [rsp + 0x70], rsi
lea rcx, [rbp + 0x180]
call fcn.140004e30
mov eax, edi
mov rcx, qword [rbp + 0x5a0]
xor rcx, rsp
call fcn.14007e250
lea r11, [rsp + 0x6b0]
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x38]
mov rsp, r11
pop r14
pop rdi
pop rbp
ret