Function at 0x140022498
Capabilities:
Lock the desktop
Shutdown system

Disassembly:
mov qword [rsp + 8], rcx
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x38
call fcn.1400184c0
lea r8, [0x140117eb8]
lea rdx, str.powrprof.DLL
lea rcx, str.SetSuspendState
xor r9d, r9d
call fcn.1400536e0
xor ebx, ebx
lea rdx, [rsp + 0x80]
lea r8d, [rbx + 6]
lea rcx, [0x1400fcd74]
call fcn.14005c928
mov ebp, ebx
mov ecx, 0x4000
cmp al, bl
mov rax, qword [rsp + 0x80]
mov dword [rsp + 0x88], ebx
cmovne ebp, ecx
mov qword [rsp + 0x90], rax
mov r12d, ebx
lea esi, [rbx + 0x20]
lea r14d, [rbx + 1]
mov r13d, ebx
cmp word [rax], bx
je 0x140022550
lea edi, [rbx + 0x2d]
lea r15d, [rbx + 2]
lea rdx, [rsp + 0x80]
lea rcx, [0x1400fa0bc]
mov r8d, r15d
call fcn.14005c928
cmp al, bl
mov rax, qword [rsp + 0x80]
je 0x14002258c
mov qword [rsp + 0x90], rax
lea rcx, [rsp + 0x90]
call fcn.1400157dc
or esi, ebp
lea r8, [0x1400fd170]
mov edx, esi
mov ecx, r12d
call fcn.140022020
add rsp, 0x38
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret
add rax, r15
mov qword [rsp + 0x80], rax
cmp di, word [rax]
je 0x140022581
movzx edi, word [rax]
mov eax, 0xffdf
lea rdx, [rsp + 0x80]
lea rcx, str.SHUTDOWN
mov r8d, 8
and di, ax
call fcn.14005c928
cmp al, bl
jne 0x1400228bb
cmp di, 0x52
jne 0x1400225e5
mov rdx, qword [rsp + 0x80]
mov esi, 0x10
mov r12d, r14d
lea rax, [rdx + 2]
mov qword [rsp + 0x90], rax
jmp 0x140022724
cmp di, 0x4c
je 0x140022824
cmp di, 0x48
je 0x1400227d1
cmp di, 0x53
je 0x140022783
cmp di, 0x4b
je 0x140022742
cmp di, 0x45
jne 0x140022664
mov rdx, qword [rsp + 0x80]
lea rax, [rdx + 2]
mov qword [rsp + 0x90], rax
mov rax, qword [0x140117ec0]
cmp rax, rbx
je 0x140022724
lea rcx, str.Set_cdAudio_door_open
xor r9d, r9d
xor r8d, r8d
xor edx, edx
call rax
mov edx, 0x2710
lea rcx, [0x140117fa0]
xor r9d, r9d
xor r8d, r8d
call fcn.14001d848
jmp 0x14002271c
cmp di, 0x4f
jne 0x1400226e1
mov rdx, qword [rsp + 0x80]
mov r9d, 9
mov edi, 0x2710
lea rax, [rdx + 2]
mov qword [rsp + 0x90], rax
movzx ecx, word [rax]
sub cx, 0x30
cmp cx, r9w
cmovbe edi, ebx
movzx eax, word [rdx + 2]
sub ax, 0x30
cmp ax, r9w
ja 0x1400226bd
movzx eax, word [rdx + 2]
lea ecx, [rdi + rdi*4]
add rdx, r15
lea edi, [rax + rcx*2 - 0x30]
mov qword [rsp + 0x80], rdx
jmp 0x140022697
mov rax, qword [0x140117ec0]
cmp rax, rbx
je 0x140022724
lea rcx, str.Set_cdAudio_door_open
xor r9d, r9d
xor r8d, r8d
xor edx, edx
call rax
mov edx, edi
jmp 0x14002264d
cmp di, 0x43
jne 0x140022550
mov rdx, qword [rsp + 0x80]
lea rax, [rdx + 2]
mov qword [rsp + 0x90], rax
mov rax, qword [0x140117ec0]
cmp rax, rbx
je 0x140022724
lea rcx, str.Set_cdAudio_door_close
xor r9d, r9d
xor r8d, r8d
xor edx, edx
call rax
mov rdx, qword [rsp + 0x80]
add rdx, r15
mov edi, 0x2d
mov qword [rsp + 0x80], rdx
cmp word [rdx], bx
jne 0x140022525
jmp 0x140022550
mov rcx, qword [rsp + 0x80]
add rcx, r15
mov qword [rsp + 0x90], rcx
cmp qword [0x140117eb8], rbx
je 0x14002279f
lea rcx, [rsp + 0x90]
call fcn.1400157dc
mov edx, 0x80
mov rcx, qword [rax]
call fcn.1400182d0
call qword [sym.imp.USER32.dll_LockWorkStation]
jmp 0x14002281a
mov rax, qword [rsp + 0x80]
add rax, r15
mov qword [rsp + 0x90], rax
cmp qword [0x140117eb8], rbx
jne 0x1400227a7
mov rax, r14
jmp 0x140022570
lea rcx, [rsp + 0x90]
call fcn.1400157dc
mov edx, 4
mov rcx, qword [rax]
call fcn.1400182d0
xor r8d, r8d
mov edx, r14d
xor ecx, ecx
call qword [0x140117eb8]
jmp 0x14002281a
mov rax, qword [rsp + 0x80]
lea rcx, [rsp + 0x90]
add rax, r15
mov qword [rsp + 0x90], rax
call fcn.1400157dc
mov edx, 8
mov rcx, qword [rax]
call fcn.1400182d0
lea rcx, str.SeShutdownPrivilege
xor r8d, r8d
mov edx, r15d
call fcn.14001a1f0
mov edx, r14d
xor ecx, ecx
call sub.KERNEL32.dll_SetSystemPowerState
cmp eax, ebx
sete bl
jmp 0x1400228b3
mov rax, qword [rsp + 0x80]
lea rcx, [rsp + 0x90]
add rax, r15
mov qword [rsp + 0x90], rax
call fcn.1400157dc
mov edx, r15d
mov rcx, qword [rax]
call fcn.1400182d0
lea rcx, [rsp + 0x98]
mov edx, 0x12c
call fcn.140059ed8
movzx r11d, byte [section.flag_dat]
mov rcx, qword [rsp + 0x98]
lea rdx, str._nLOGOUT__0x_X__0x_X___CMD___Main0x_X
mov r9d, r15d
xor r8d, r8d
mov dword [rsp + 0x20], r11d
call qword [sym.imp.USER32.dll_wsprintfA]
mov rcx, qword [rsp + 0x98]
call fcn.140015e84
xor edx, edx
lea ecx, [rdx + 0x10]
call qword [sym.imp.USER32.dll_ExitWindowsEx]
lea rcx, [rsp + 0x98]
cmp eax, ebx
sete bl
call fcn.140052160
mov rax, rbx
jmp 0x140022570
mov rcx, qword [rsp + 0x80]
mov edi, 0x2d
mov qword [rsp + 0x90], rcx
lea ebp, [rdi - 0xd]
cmp di, word [rcx]
jne 0x140022a40
lea esi, [rdi - 0x24]
cmp di, word [rcx + 2]
je 0x140022a17
lea rdx, [rsp + 0x80]
lea rcx, [0x1400fd0d0]
mov r8d, r15d
call fcn.14005c928
cmp al, bl
je 0x14002290c
mov r13d, ebx
jmp 0x1400229b4
lea rdx, [rsp + 0x80]
lea rcx, [0x1400fd0cc]
mov r8d, r15d
call fcn.14005c928
cmp al, bl
je 0x140022932
mov r13d, 1
jmp 0x1400229b4
lea rdx, [rsp + 0x80]
lea rcx, [0x1400fd0c8]
mov r8d, r15d
call fcn.14005c928
cmp al, bl
je 0x140022955
mov r14d, 1
jmp 0x1400229b4
lea rdx, [rsp + 0x80]
lea rcx, [0x1400fd0c4]
mov r8d, 3
call fcn.14005c928
cmp al, bl
je 0x140022984
mov rcx, qword [rsp + 0x80]
mov r14d, ebx
lea rax, [rcx + 6]
jmp 0x1400229c0
lea rdx, [rsp + 0x80]
lea rcx, [0x1400fd0c0]
mov r8d, r15d
call fcn.14005c928
cmp al, bl
je 0x1400229ca
lea rdx, [rsp + 0x88]
lea rcx, [rsp + 0x80]
call fcn.140068dd4
mov rcx, qword [rsp + 0x80]
lea rax, [rcx + 4]
mov qword [rsp + 0x90], rax
jmp 0x140022a0c
mov rcx, qword [rsp + 0x80]
jmp 0x1400229ef
cmp si, ax
ja 0x1400229df
cmp ax, 0xd
jbe 0x1400229f7
cmp bp, ax
je 0x1400229f7
add rcx, r15
mov qword [rsp + 0x80], rcx
movzx eax, word [rcx]
cmp ax, bx
jne 0x1400229d4
lea rcx, [rsp + 0x80]
call fcn.1400157dc
mov rcx, qword [rsp + 0x80]
cmp di, word [rcx]
je 0x1400228df
jmp 0x140022a40
add rcx, 4
jmp 0x140022a30
cmp si, ax
ja 0x140022a28
cmp ax, 0xd
jbe 0x140022a40
cmp bp, ax
je 0x140022a40
add rcx, r15
mov qword [rsp + 0x90], rcx
movzx eax, word [rcx]
cmp ax, bx
jne 0x140022a1d
mov eax, r13d
lea rcx, [rsp + 0x90]
neg eax
sbb ebx, ebx
and ebx, 0xfffffff0
add ebx, ebp
call fcn.1400157dc
mov edx, ebx
mov rcx, qword [rax]
call fcn.1400182d0
lea rcx, str.SeShutdownPrivilege
xor r8d, r8d
mov edx, r15d
call fcn.14001a1f0
lea rcx, str.SeRemoteShutdownPrivilege
xor r8d, r8d
mov edx, r15d
call fcn.14001a1f0
lea rcx, [rsp + 0x98]
mov edx, 0x12c
call fcn.140059ed8
movzx r11d, byte [section.flag_dat]
mov rcx, qword [rsp + 0x98]
lea rdx, str._nSHUTDOWN__0x_X__0x_X___CMD___Main0x_X
mov r9d, ebx
mov r8d, r13d
mov dword [rsp + 0x20], r11d
call qword [sym.imp.USER32.dll_wsprintfA]
mov rcx, qword [rsp + 0x98]
call fcn.140015e84
mov r8d, dword [rsp + 0x88]
lea rdx, [0x1400f9548]
mov r9d, r14d
xor ecx, ecx
mov dword [rsp + 0x20], r13d
call qword [sym.imp.ADVAPI32.dll_InitiateSystemShutdownW]
lea rcx, [rsp + 0x98]
call fcn.140052160
xor eax, eax
jmp 0x140022570