Function at 0x140049210
Capabilities:
Lock the desktop
Shutdown system

Disassembly:
mov qword [rsp + 0x20], rbx
mov qword [rsp + 8], rcx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x30
call fcn.14002c530
lea r8, [0x14019c0e0]
lea rdx, str.powrprof.DLL
lea rcx, str.SetSuspendState
xor r9d, r9d
call fcn.14005c580
xor ebx, ebx
lea rdx, [rsp + 0x70]
lea r8d, [rbx + 6]
lea rcx, [0x14014b06c]
call fcn.140065780
mov r12d, ebx
mov ecx, 0x4000
cmp al, bl
mov rax, qword [rsp + 0x70]
mov dword [rsp + 0x78], ebx
cmovne r12d, ecx
mov qword [rsp + 0x80], rax
mov ebp, ebx
lea esi, [rbx + 0x20]
lea r14d, [rbx + 1]
mov r13d, ebx
cmp word [rax], bx
je 0x1400492be
lea edi, [rbx + 0x2d]
lea r15d, [rbx + 2]
lea rdx, [rsp + 0x70]
lea rcx, [0x140146978]
mov r8d, r15d
call fcn.140065780
cmp al, bl
mov rax, qword [rsp + 0x70]
je 0x1400492fe
mov qword [rsp + 0x80], rax
lea rcx, [rsp + 0x80]
call fcn.140029d28
or esi, r12d
lea r8, [0x14014f7a8]
mov edx, esi
mov ecx, ebp
call fcn.1400490d4
mov rbx, qword [rsp + 0x88]
add rsp, 0x30
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
add rax, r15
mov qword [rsp + 0x70], rax
cmp di, word [rax]
je 0x1400492f6
movzx edi, word [rax]
mov eax, 0xffdf
lea rdx, [rsp + 0x70]
lea rcx, str.SHUTDOWN
mov r8d, 8
and di, ax
call fcn.140065780
cmp al, bl
jne 0x1400495a3
cmp di, 0x52
jne 0x140049351
mov rdx, qword [rsp + 0x70]
mov esi, 0x10
mov ebp, r14d
lea rax, [rdx + 2]
mov qword [rsp + 0x80], rax
jmp 0x14004947b
cmp di, 0x4c
je 0x140049564
cmp di, 0x48
je 0x14004951f
cmp di, 0x53
je 0x1400494d4
cmp di, 0x4b
je 0x140049496
cmp di, 0x45
jne 0x1400493c7
mov rdx, qword [rsp + 0x70]
lea rax, [rdx + 2]
mov qword [rsp + 0x80], rax
mov rax, qword [0x14019c0e8]
cmp rax, rbx
je 0x14004947b
lea rcx, str.Set_cdAudio_door_open
xor r9d, r9d
xor r8d, r8d
xor edx, edx
call rax
mov edx, 0x2710
lea rcx, [0x14019c170]
call fcn.14002bb1c
jmp 0x140049476
cmp di, 0x4f
jne 0x14004943e
mov rdx, qword [rsp + 0x70]
mov r9d, 9
mov edi, 0x2710
lea rax, [rdx + 2]
mov qword [rsp + 0x80], 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 0x14004941a
movzx eax, word [rdx + 2]
lea ecx, [rdi + rdi*4]
add rdx, r15
lea edi, [rax + rcx*2 - 0x30]
mov qword [rsp + 0x70], rdx
jmp 0x1400493f7
mov rax, qword [0x14019c0e8]
cmp rax, rbx
je 0x14004947b
lea rcx, str.Set_cdAudio_door_open
xor r9d, r9d
xor r8d, r8d
xor edx, edx
call rax
mov edx, edi
jmp 0x1400493b6
cmp di, 0x43
jne 0x1400492be
mov rdx, qword [rsp + 0x70]
lea rax, [rdx + 2]
mov qword [rsp + 0x80], rax
mov rax, qword [0x14019c0e8]
cmp rax, rbx
je 0x14004947b
lea rcx, str.Set_cdAudio_door_close
xor r9d, r9d
xor r8d, r8d
xor edx, edx
call rax
mov rdx, qword [rsp + 0x70]
add rdx, r15
mov edi, 0x2d
mov qword [rsp + 0x70], rdx
cmp word [rdx], bx
jne 0x140049299
jmp 0x1400492be
mov rax, qword [rsp + 0x70]
add rax, r15
mov qword [rsp + 0x80], rax
cmp qword [0x14019c0e0], rbx
je 0x1400494ed
lea rcx, [rsp + 0x80]
call fcn.140029d28
mov edx, 0x80
mov rcx, qword [rax]
call fcn.140048f44
call qword [sym.imp.USER32.dll_LockWorkStation]
jmp 0x140049597
mov rax, qword [rsp + 0x70]
add rax, r15
mov qword [rsp + 0x80], rax
cmp qword [0x14019c0e0], rbx
jne 0x1400494f5
mov eax, r14d
jmp 0x1400492de
lea rcx, [rsp + 0x80]
call fcn.140029d28
mov edx, 4
mov rcx, qword [rax]
call fcn.140048f44
xor r8d, r8d
mov edx, r14d
xor ecx, ecx
call qword [0x14019c0e0]
jmp 0x140049597
mov rax, qword [rsp + 0x70]
lea rcx, [rsp + 0x80]
add rax, r15
mov qword [rsp + 0x80], rax
call fcn.140029d28
mov edx, 8
mov rcx, qword [rax]
call fcn.140048f44
lea rcx, str.SeShutdownPrivilege
mov edx, r15d
call fcn.14002e788
mov edx, r14d
xor ecx, ecx
call sub.KERNEL32.dll_SetSystemPowerState
jmp 0x140049597
mov rax, qword [rsp + 0x70]
lea rcx, [rsp + 0x80]
add rax, r15
mov qword [rsp + 0x80], rax
call fcn.140029d28
mov edx, r15d
mov rcx, qword [rax]
call fcn.140048f44
xor edx, edx
lea ecx, [rdx + 0x10]
call qword [sym.imp.USER32.dll_ExitWindowsEx]
cmp eax, ebx
sete bl
mov eax, ebx
jmp 0x1400492de
mov rcx, qword [rsp + 0x70]
mov edi, 0x2d
mov qword [rsp + 0x80], rcx
lea ebp, [rdi - 0xd]
cmp di, word [rcx]
jne 0x1400496fb
lea esi, [rdi - 0x24]
cmp di, word [rcx + 2]
je 0x1400496d2
lea rdx, [rsp + 0x70]
lea rcx, [0x14014b1d4]
mov r8d, r15d
call fcn.140065780
cmp al, bl
je 0x1400495ee
mov r13d, ebx
jmp 0x14004967e
lea rdx, [rsp + 0x70]
lea rcx, [0x14014b1d0]
mov r8d, r15d
call fcn.140065780
cmp al, bl
je 0x14004960e
mov r13d, 1
jmp 0x14004967e
lea rdx, [rsp + 0x70]
lea rcx, [0x14014b1cc]
mov r8d, r15d
call fcn.140065780
cmp al, bl
je 0x14004962e
mov r14d, 1
jmp 0x14004967e
lea rdx, [rsp + 0x70]
lea rcx, [0x14014b1c8]
mov r8d, 3
call fcn.140065780
cmp al, bl
je 0x140049657
mov rcx, qword [rsp + 0x70]
mov r14d, ebx
lea rax, [rcx + 6]
jmp 0x140049687
lea rdx, [rsp + 0x70]
lea rcx, [0x14014b1c4]
mov r8d, r15d
call fcn.140065780
cmp al, bl
je 0x140049691
lea rdx, [rsp + 0x78]
lea rcx, [rsp + 0x70]
call fcn.140066e40
mov rcx, qword [rsp + 0x70]
lea rax, [rcx + 4]
mov qword [rsp + 0x80], rax
jmp 0x1400496c7
mov rcx, qword [rsp + 0x70]
jmp 0x1400496b0
cmp si, ax
ja 0x1400496a3
cmp ax, 0xd
jbe 0x1400496b8
cmp bp, ax
je 0x1400496b8
add rcx, r15
mov qword [rsp + 0x70], rcx
movzx eax, word [rcx]
cmp ax, bx
jne 0x140049698
lea rcx, [rsp + 0x70]
call fcn.140029d28
mov rcx, qword [rsp + 0x70]
cmp di, word [rcx]
je 0x1400495c4
jmp 0x1400496fb
add rcx, 4
jmp 0x1400496eb
cmp si, ax
ja 0x1400496e3
cmp ax, 0xd
jbe 0x1400496fb
cmp bp, ax
je 0x1400496fb
add rcx, r15
mov qword [rsp + 0x80], rcx
movzx eax, word [rcx]
cmp ax, bx
jne 0x1400496d8
lea rcx, [rsp + 0x80]
call fcn.140029d28
mov ecx, r13d
neg ecx
mov rcx, qword [rax]
sbb edx, edx
and edx, 0xfffffff0
add edx, ebp
call fcn.140048f44
lea rcx, str.SeShutdownPrivilege
mov edx, r15d
call fcn.14002e788
lea rcx, str.SeRemoteShutdownPrivilege
mov edx, r15d
call fcn.14002e788
mov r8d, dword [rsp + 0x78]
lea rdx, [0x14014f7a8]
mov r9d, r14d
xor ecx, ecx
mov dword [rsp + 0x20], r13d
call qword [sym.imp.ADVAPI32.dll_InitiateSystemShutdownW]
xor eax, eax
jmp 0x1400492de