Function at 0x4216a8
Capabilities:
Lock the desktop
Shutdown system

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
push ebx
push esi
push edi
call fcn.0040d53b
xor ebx, ebx
push ebx
push 0x4a5e9c
push str.powrprof.DLL
push str.SetSuspendState
call fcn.0042ed10
push 6
lea eax, [ebp + 8]
push eax
push 0x492234
mov dword [ebp - 0x18], ebx
call fcn.004349fd
add esp, 0x1c
test al, al
je 0x4216ee
mov dword [ebp - 0x18], 0x4000
mov eax, dword [ebp + 8]
xor edi, edi
inc edi
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x14], 0x20
mov dword [ebp - 0xc], edi
mov dword [ebp - 8], ebx
mov dword [ebp - 0x10], ebx
mov dword [ebp - 4], eax
jmp 0x421874
push 2
lea eax, [ebp + 8]
push eax
push 0x48efec
call fcn.004349fd
add esp, 0xc
test al, al
mov eax, dword [ebp + 8]
je 0x421755
mov dword [ebp - 4], eax
lea ecx, [ebp - 4]
call fcn.0040b430
mov eax, dword [ebp - 0x14]
or eax, dword [ebp - 0x18]
push 0x48e984
push eax
push dword [ebp - 0x1c]
call fcn.0042159d
add esp, 0xc
pop edi
pop esi
pop ebx
leave
ret
inc eax
inc eax
mov dword [ebp + 8], eax
cmp word [eax], 0x2d
je 0x421750
xor esi, esi
mov si, word [eax]
push 8
lea eax, [ebp + 8]
push eax
push str.SHUTDOWN
and esi, 0xffdf
call fcn.004349fd
add esp, 0xc
test al, al
jne 0x4218aa
cmp si, 0x52
jne 0x42179f
mov eax, dword [ebp + 8]
add eax, 2
mov dword [ebp - 0x14], 0x10
mov dword [ebp - 0x1c], edi
mov dword [ebp - 4], eax
jmp 0x42186d
cmp si, 0x4c
je 0x4219eb
cmp si, 0x48
je 0x421a15
cmp si, 0x53
je 0x421a47
cmp si, 0x4b
je 0x421a76
cmp si, 0x45
jne 0x4217fe
mov eax, dword [ebp + 8]
add eax, 2
mov dword [ebp - 4], eax
mov eax, dword [0x4a5ea0]
cmp eax, ebx
je 0x42186d
push ebx
push ebx
push ebx
push str.Set_cdAudio_door_open
call eax
push 0x2710
mov ecx, 0x4a5f08
call fcn.0040ce62
jmp 0x42186d
cmp si, 0x4f
jne 0x421882
mov ecx, dword [ebp + 8]
add ecx, 2
xor edi, edi
mov dword [ebp - 4], ecx
mov di, word [ecx]
mov esi, 0x2710
push edi
call fcn.0041030b
add esp, 4
cmp al, bl
je 0x42184c
xor esi, esi
cmp al, bl
je 0x42184c
movzx edx, di
mov dword [ebp + 8], ecx
add ecx, 2
xor edi, edi
mov di, word [ecx]
lea eax, [esi + esi*4]
lea esi, [edx + eax*2 - 0x30]
push edi
call fcn.0041030b
add esp, 4
test al, al
jne 0x42182a
mov eax, dword [0x4a5ea0]
cmp eax, ebx
je 0x42186a
push ebx
push ebx
push ebx
push str.Set_cdAudio_door_open
call eax
push esi
mov ecx, 0x4a5f08
call fcn.0040ce62
xor edi, edi
inc edi
add dword [ebp + 8], 2
mov eax, dword [ebp + 8]
cmp word [eax], bx
jne 0x42170f
jmp 0x42172c
cmp si, 0x43
jne 0x42172c
mov eax, dword [ebp + 8]
add eax, 2
mov dword [ebp - 4], eax
mov eax, dword [0x4a5ea0]
cmp eax, ebx
je 0x42186d
push ebx
push ebx
push ebx
push str.Set_cdAudio_door_close
call eax
jmp 0x42186d
mov eax, dword [ebp + 8]
mov dword [ebp - 4], eax
jmp 0x42197b
cmp word [eax + 2], 0x2d
je 0x421987
push 2
pop esi
push esi
lea eax, [ebp + 8]
push eax
push 0x4923ec
call fcn.004349fd
add esp, 0xc
test al, al
je 0x4218de
mov dword [ebp - 8], ebx
jmp 0x42195b
push esi
lea eax, [ebp + 8]
push eax
push 0x4923e8
call fcn.004349fd
add esp, 0xc
test al, al
je 0x4218f9
mov dword [ebp - 8], edi
jmp 0x42195b
push esi
lea eax, [ebp + 8]
push eax
push 0x4923e4
call fcn.004349fd
add esp, 0xc
test al, al
je 0x421914
mov dword [ebp - 0xc], edi
jmp 0x42195b
push 3
lea eax, [ebp + 8]
push eax
push 0x4923e0
call fcn.004349fd
add esp, 0xc
test al, al
je 0x421936
mov eax, dword [ebp + 8]
mov dword [ebp - 0xc], ebx
lea ecx, [eax + 6]
jmp 0x421961
push esi
lea eax, [ebp + 8]
push eax
push 0x4923dc
call fcn.004349fd
add esp, 0xc
test al, al
je 0x421966
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp + 8]
push eax
call fcn.004358e8
pop ecx
pop ecx
mov eax, dword [ebp + 8]
lea ecx, [eax + 4]
mov dword [ebp - 4], ecx
jmp 0x42197b
lea eax, [ebp + 8]
push eax
call fcn.0041023a
pop ecx
lea ecx, [ebp + 8]
call fcn.0040b430
mov eax, dword [ebp + 8]
cmp word [eax], 0x2d
je 0x4218b5
jmp 0x421997
add eax, 4
mov dword [ebp - 4], eax
lea eax, [ebp - 4]
push eax
call fcn.0041023a
pop ecx
lea ecx, [ebp - 4]
call fcn.0040b430
mov ecx, dword [ebp - 8]
neg ecx
sbb ecx, ecx
and ecx, 0xfffffff0
add ecx, 0x20
push ecx
push dword [eax]
call fcn.004214ab
push 2
push str.SeShutdownPrivilege
call fcn.0040ee29
push 2
push str.SeRemoteShutdownPrivilege
call fcn.0040ee29
add esp, 0x18
push dword [ebp - 8]
push dword [ebp - 0xc]
push dword [ebp - 0x10]
push 0x48e984
push ebx
call dword [sym.imp.ADVAPI32.dll_InitiateSystemShutdownW]
xor eax, eax
jmp 0x42174b
mov eax, dword [ebp + 8]
add eax, 2
lea ecx, [ebp - 4]
mov dword [ebp - 4], eax
call fcn.0040b430
push 2
push dword [eax]
call fcn.004214ab
pop ecx
pop ecx
push ebx
push 0x10
call dword [sym.imp.USER32.dll_ExitWindowsEx]
jmp 0x421aaa
mov eax, dword [ebp + 8]
add eax, 2
lea ecx, [ebp - 4]
mov dword [ebp - 4], eax
call fcn.0040b430
push 8
push dword [eax]
call fcn.004214ab
push 2
push str.SeShutdownPrivilege
call fcn.0040ee29
add esp, 0x10
push edi
push ebx
call sub.KERNEL32.dll_SetSystemPowerState
jmp 0x421aaa
mov eax, dword [ebp + 8]
add eax, 2
cmp dword [0x4a5e9c], ebx
mov dword [ebp - 4], eax
je 0x421a87
lea ecx, [ebp - 4]
call fcn.0040b430
push 4
push dword [eax]
call fcn.004214ab
pop ecx
pop ecx
push ebx
push edi
push ebx
call dword [0x4a5e9c]
jmp 0x421aaa
mov eax, dword [ebp + 8]
add eax, 2
cmp dword [0x4a5e9c], ebx
mov dword [ebp - 4], eax
jne 0x421a8e
mov eax, edi
jmp 0x42174b
lea ecx, [ebp - 4]
call fcn.0040b430
push 0x80
push dword [eax]
call fcn.004214ab
pop ecx
pop ecx
call dword [sym.imp.USER32.dll_LockWorkStation]
neg eax
sbb eax, eax
inc eax
jmp 0x42174b