Function at 0x140022020
Capabilities:
Shutdown system

Disassembly:
mov qword [rsp + 0x18], r8
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0xf8
mov al, byte [0x140122000]
xor r13d, r13d
mov r12d, 1
mov byte [rsp + 0x140], al
or al, 0x80
test ecx, ecx
setne r13b
test dl, 0x70
mov byte [0x140122000], al
mov eax, edx
mov ebx, edx
mov ebp, 0
setne bpl
test dl, 0x72
mov esi, 0
setne sil
shr eax, 5
mov r14d, edx
and al, 2
test r13d, r13d
movzx r15d, al
cmovne r15d, r12d
shr ebx, 0xe
and ebx, r12d
call fcn.1400555c8
lea rcx, [0x1400fcff0]
mov rdi, rax
shr rdi, 0x10
call fcn.140018460
mov edx, r14d
not edx
mov ecx, r12d
mov dword [rsp + 0x148], eax
and edx, r12d
test eax, eax
cmovne ecx, edx
test ecx, ecx
je 0x1400220d0
test ebp, ebp
je 0x1400220d0
cmp edi, 0x60002
jae 0x1400220d3
xor r12d, r12d
test ebx, ebx
jne 0x1400220e0
test esi, esi
je 0x1400220e0
lea edi, [rbx + 1]
jmp 0x1400220e6
xor edi, edi
test ebx, ebx
jne 0x1400220f1
test esi, esi
je 0x1400220f1
mov ebx, 1
jmp 0x1400220f3
xor ebx, ebx
lea rcx, [rsp + 0x158]
mov edx, 0x12c
call fcn.140059ed8
mov ecx, dword [rsp + 0x148]
movzx eax, byte [rsp + 0x140]
movzx esi, r15b
mov r15, qword [rsp + 0x150]
lea rdx, [0x1400fcfb0]
mov dword [rsp + 0x60], esi
mov dword [rsp + 0x58], ebp
mov dword [rsp + 0x50], ebx
and qword [rsp + 0x48], 0
mov dword [rsp + 0x40], edi
mov dword [rsp + 0x38], r12d
mov dword [rsp + 0x30], ecx
mov rcx, qword [rsp + 0x158]
mov dword [rsp + 0x28], eax
mov r9d, r14d
mov r8d, r13d
mov qword [rsp + 0x20], r15
call qword [sym.imp.USER32.DLL_wsprintfA]
mov rcx, qword [rsp + 0x158]
call fcn.140015e84
lea rcx, [rsp + 0x158]
call fcn.140052160
and qword [rsp + 0x88], 0
xor edx, edx
lea rcx, [rsp + 0x90]
lea r8d, [rdx + 0x58]
mov dword [rsp + 0x80], 0x68
call fcn.1400dd9e0
lea rcx, [rsp + 0x80]
call qword [sym.imp.KERNEL32.DLL_GetStartupInfoW]
mov rcx, r15
call qword [sym.imp.KERNEL32.DLL_lstrlenW]
lea rcx, [rsp + 0x70]
add eax, 0xf0
movsxd rdx, eax
call fcn.14005a1c4
movzx r11d, word [rsp + 0xc0]
mov rcx, qword [rsp + 0x70]
mov dword [rsp + 0x28], r11d
lea rdx, [0x1400fcf50]
mov r9d, r14d
mov r8, r15
mov dword [rsp + 0x20], r13d
call qword [sym.imp.USER32.DLL_wsprintfW]
mov rcx, qword [rsp + 0x70]
mov edx, r14d
call fcn.1400182d0
xor r8d, r8d
lea rcx, [0x1400f9f78]
lea r14d, [r8 + 2]
mov edx, r14d
call fcn.14001a1f0
lea rcx, [0x1400fcf18]
xor r8d, r8d
mov edx, r14d
call fcn.14001a1f0
and qword [rsp + 0x78], 0
test r12d, r12d
lea r12d, [r14 - 1]
je 0x140022279
lea rdx, [0x1400f9548]
mov r9d, r12d
xor r8d, r8d
xor ecx, ecx
mov dword [rsp + 0x20], r13d
call qword [sym.imp.ADVAPI32.DLL_InitiateSystemShutdownW]
lea rcx, [0x140117fa0]
xor r9d, r9d
xor r8d, r8d
mov edx, 0x2710
call fcn.14001d848
lea rcx, [0x1400fcf08]
call fcn.140015e84
mov r13d, 0xffff
test edi, edi
je 0x1400222aa
xor r9d, r9d
lea rax, [rsp + 0x78]
mov r8, r12
mov qword [rsp + 0x30], rax
lea edx, [r9 + 0x16]
mov rcx, r13
mov dword [rsp + 0x28], r12d
mov dword [rsp + 0x20], r14d
call qword [sym.imp.USER32.DLL_SendMessageTimeoutW]
test ebx, ebx
je 0x1400222fb
xor r9d, r9d
lea rax, [rsp + 0x78]
xor r8d, r8d
mov qword [rsp + 0x30], rax
lea edx, [r9 + 0x10]
mov rcx, r13
mov dword [rsp + 0x28], r12d
mov dword [rsp + 0x20], r14d
call qword [sym.imp.USER32.DLL_SendMessageTimeoutW]
lea r11, [rsp + 0x78]
xor r9d, r9d
xor r8d, r8d
mov qword [rsp + 0x30], r11
mov edx, r14d
mov rcx, r13
mov dword [rsp + 0x28], r12d
mov dword [rsp + 0x20], r14d
call qword [sym.imp.USER32.DLL_SendMessageTimeoutW]
test ebp, ebp
je 0x14002230b
mov ecx, esi
call fcn.14001828c
movsxd rbx, eax
jmp 0x14002230d
xor ebx, ebx
lea rcx, [rsp + 0x70]
call fcn.140052160
mov rax, rbx
add rsp, 0xf8
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret