Function at 0x140032db0
Capabilities:
Shutdown system

Disassembly:
push rbp
push rsi
push rdi
sub rsp, 0x90
mov rax, qword [0x1400a0f20]
xor rax, rsp
mov qword [rsp + 0x60], rax
mov rdi, r8
mov esi, edx
mov ebp, ecx
cmp r8, 0x1000
jb 0x1400330b4
movabs rax, 0xffff800000000000
test rax, r8
jne 0x1400330b4
test edx, 0xfffffff0
jne 0x1400330ad
mov qword [rsp + 0xc8], rbx
mov qword [rsp + 0x30], 0
call qword [sym.imp.KERNEL32.dll_GetCurrentThread]
mov edx, 0x20
lea r9, [rsp + 0x30]
mov rcx, rax
lea r8d, [rdx - 0x1f]
call qword [sym.imp.ADVAPI32.dll_OpenThreadToken]
test eax, eax
je 0x140032e33
xor ebx, ebx
jmp 0x140032e6f
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
cmp eax, 0x3f0
jne 0x140032e6b
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
lea r8, [rsp + 0x30]
mov edx, 0x20
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x140032e63
xor ebx, ebx
jmp 0x140032e6f
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
test ebx, ebx
jne 0x140032ed8
lea r8, [rsp + 0x44]
mov dword [rsp + 0x40], 1
lea rdx, str.SeShutdownPrivilege
mov dword [rsp + 0x4c], 2
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueA]
test eax, eax
je 0x140032ec5
mov rcx, qword [rsp + 0x30]
lea r8, [rsp + 0x40]
mov qword [rsp + 0x28], 0
mov r9d, 0x10
xor edx, edx
mov qword [rsp + 0x20], 0
call qword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
test eax, eax
jne 0x140032ecd
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea r8, str.C:DevelAntidetect4PersonalVirtualBox_srcVBoxRuntime_r3winRTSystemShutdown_win.cpp
mov rcx, rdi
lea rdx, [rsp + 0x38]
call fcn.1400344d0
mov edi, eax
test eax, eax
js 0x14003308d
mov qword [rsp + 0x88], r12
lea ecx, [rbp + 0x1f3]
mov qword [rsp + 0x80], r13
mov eax, 0x10624dd3
mul ecx
mov ebp, esi
mov qword [rsp + 0x78], r14
and ebp, 3
mov qword [rsp + 0x70], r15
mov r12d, edx
shr r12d, 6
lea eax, [rbp - 2]
cmp eax, 1
ja 0x140033027
lea rcx, str.ADVAPI32.DLL
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov rcx, rax
lea rdx, str.InitiateShutdownW
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov r15, rax
mov r14d, esi
test rax, rax
je 0x140032fc4
mov rdx, qword [rsp + 0x38]
mov eax, 8
mov ecx, esi
and r14d, 8
mov r13d, 0xb
mov r8d, r12d
cmove r13d, eax
and ecx, 0xfffffffc
shl ecx, 0x1d
mov r9d, r13d
mov dword [rsp + 0x20], ecx
mov rax, r15
xor ecx, ecx
call qword [case.0x14004be35.0]
mov ebx, eax
cmp eax, 0x57
jne 0x140032fb9
mov rdx, qword [rsp + 0x38]
mov r9d, r13d
mov r8d, r12d
mov dword [rsp + 0x20], 0
xor ecx, ecx
mov rax, r15
call qword [case.0x14004be35.0]
mov ebx, eax
test ebx, ebx
jne 0x140032fc8
xor edi, edi
jmp 0x140033067
and r14d, 8
lea rcx, str.USER32.DLL
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov rcx, rax
lea rdx, str.ExitWindowsEx
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov r13, rax
test rax, rax
je 0x140033027
mov eax, 9
test r14d, r14d
mov r15d, 0x1d
cmove r15d, eax
xor edx, edx
mov ecx, r15d
mov rax, r13
call qword [case.0x14004be35.0]
test eax, eax
jne 0x140033067
and r15d, 0xffffffef
xor edx, edx
mov ecx, r15d
mov rax, r13
call qword [case.0x14004be35.0]
test eax, eax
jne 0x140033067
mov rdx, qword [rsp + 0x38]
xor eax, eax
test ebp, ebp
mov r8d, r12d
sete al
shr esi, 3
and esi, 1
mov dword [rsp + 0x20], eax
mov r9d, esi
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_InitiateSystemShutdownW]
test eax, eax
je 0x14003305e
xor edi, edi
mov eax, 0x57e5
cmp ebp, 1
cmove edi, eax
jmp 0x140033067
mov ecx, ebx
call fcn.14001ee80
mov edi, eax
mov rcx, qword [rsp + 0x38]
call fcn.140017710
mov r15, qword [rsp + 0x70]
mov eax, edi
mov r14, qword [rsp + 0x78]
mov r13, qword [rsp + 0x80]
mov r12, qword [rsp + 0x88]
mov rbx, qword [rsp + 0xc8]
mov rcx, qword [rsp + 0x60]
xor rcx, rsp
call fcn.140001250
add rsp, 0x90
pop rdi
pop rsi
pop rbp
ret
mov eax, 0xfffffffe
jmp 0x140033095
mov eax, 0xfffffffa
jmp 0x140033095