Function at 0x415615
Capabilities:
Check for time delay via gettickcount
Lock the desktop
Shutdown system

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x44
push ebx
push esi
push edi
call fcn.0040e777
xor ebx, ebx
push ebx
push 0x4afeac
push str.powrprof.DLL
push str.SetSuspendState
call fcn.00432cb9
push 6
lea eax, [ebp + 8]
push eax
push 0x49a450
mov dword [ebp - 0x1c], ebx
call fcn.00438eee
add esp, 0x1c
test al, al
je 0x41565b
mov dword [ebp - 0x1c], 0x4000
mov eax, dword [ebp + 8]
xor edi, edi
inc edi
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x18], 0x20
mov dword [ebp - 0x10], edi
mov dword [ebp - 0xc], ebx
mov dword [ebp - 0x14], ebx
mov dword [ebp - 4], eax
jmp 0x41587f
push 2
lea eax, [ebp + 8]
push eax
push 0x498128
call fcn.00438eee
add esp, 0xc
test al, al
mov eax, dword [ebp + 8]
je 0x4156c2
mov dword [ebp - 4], eax
lea ecx, [ebp - 4]
call fcn.0040c032
mov eax, dword [ebp - 0x18]
or eax, dword [ebp - 0x1c]
push 0x49a744
push eax
push dword [ebp - 0x20]
call fcn.0041532a
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 0x4156bd
xor esi, esi
mov si, word [eax]
push 8
lea eax, [ebp + 8]
push eax
push str.SHUTDOWN
and esi, 0xffdf
call fcn.00438eee
add esp, 0xc
test al, al
jne 0x4158b5
cmp si, 0x52
jne 0x41570c
mov eax, dword [ebp + 8]
add eax, 2
mov dword [ebp - 0x18], 0x10
mov dword [ebp - 0x20], edi
mov dword [ebp - 4], eax
jmp 0x415878
cmp si, 0x4c
je 0x415a30
cmp si, 0x48
je 0x415a9c
cmp si, 0x53
je 0x415ace
cmp si, 0x4b
je 0x415afd
cmp si, 0x45
jne 0x415808
mov eax, dword [ebp + 8]
add eax, 2
mov dword [ebp - 4], eax
mov eax, dword [0x4afeb0]
cmp eax, ebx
je 0x415878
push ebx
push ebx
push ebx
push str.Set_cdAudio_door_open
call eax
mov edi, dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [ebp - 8], ebx
call edi
mov esi, eax
add esi, 0x2710
call edi
mov ecx, esi
sub ecx, eax
cmp ecx, ebx
jle 0x415875
cmp byte [0x4ae290], bl
jle 0x415875
cmp ecx, ebx
jbe 0x4157f8
cmp ecx, 0x7d0
jbe 0x41579e
mov ecx, 0x3e8
jmp 0x4157a6
cmp ecx, 0x64
jbe 0x4157a6
push 0x64
pop ecx
push 0x4bf
push ecx
push ebx
lea eax, [ebp - 0x28]
push eax
push ebx
call dword [sym.imp.USER32.dll_MsgWaitForMultipleObjects]
jmp 0x4157f8
cmp dword [ebp - 8], ebx
jg 0x4157c9
call edi
mov ecx, esi
sub ecx, eax
test ecx, ecx
jle 0x415800
push 3
push ebx
push ebx
push ebx
lea eax, [ebp - 0x44]
push eax
call dword [sym.imp.USER32.dll_PeekMessageW]
test eax, eax
je 0x415800
lea eax, [ebp - 0x44]
push eax
call dword [sym.imp.USER32.dll_TranslateMessage]
lea eax, [ebp - 0x44]
push eax
call dword [sym.imp.USER32.dll_DispatchMessageW]
cmp dword [ebp - 8], ebx
jle 0x4157f8
dec dword [ebp - 8]
cmp byte [0x4ae290], bl
jg 0x4157ba
mov dword [ebp - 8], ebx
jmp 0x415771
cmp si, 0x4f
jne 0x41588d
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.00410c71
add esp, 4
cmp al, bl
je 0x415856
xor esi, esi
cmp al, bl
je 0x415856
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.00410c71
add esp, 4
test al, al
jne 0x415834
mov eax, dword [0x4afeb0]
cmp eax, ebx
je 0x415875
push ebx
push ebx
push ebx
push str.Set_cdAudio_door_open
call eax
push ebx
push esi
mov ecx, 0x4aff28
call fcn.0040da4e
xor edi, edi
inc edi
add dword [ebp + 8], 2
mov eax, dword [ebp + 8]
cmp word [eax], bx
jne 0x41567c
jmp 0x415699
cmp si, 0x43
jne 0x415699
mov eax, dword [ebp + 8]
add eax, 2
mov dword [ebp - 4], eax
mov eax, dword [0x4afeb0]
cmp eax, ebx
je 0x415878
push ebx
push ebx
push ebx
push str.Set_cdAudio_door_close
call eax
jmp 0x415878
mov eax, dword [ebp + 8]
mov dword [ebp - 4], eax
jmp 0x415986
cmp word [eax + 2], 0x2d
je 0x415992
push 2
pop esi
push esi
lea eax, [ebp + 8]
push eax
push 0x49a6d8
call fcn.00438eee
add esp, 0xc
test al, al
je 0x4158e9
mov dword [ebp - 0xc], ebx
jmp 0x415966
push esi
lea eax, [ebp + 8]
push eax
push 0x49a6d4
call fcn.00438eee
add esp, 0xc
test al, al
je 0x415904
mov dword [ebp - 0xc], edi
jmp 0x415966
push esi
lea eax, [ebp + 8]
push eax
push 0x49a6d0
call fcn.00438eee
add esp, 0xc
test al, al
je 0x41591f
mov dword [ebp - 0x10], edi
jmp 0x415966
push 3
lea eax, [ebp + 8]
push eax
push 0x49a6cc
call fcn.00438eee
add esp, 0xc
test al, al
je 0x415941
mov eax, dword [ebp + 8]
mov dword [ebp - 0x10], ebx
lea ecx, [eax + 6]
jmp 0x41596c
push esi
lea eax, [ebp + 8]
push eax
push 0x49a6c8
call fcn.00438eee
add esp, 0xc
test al, al
je 0x415971
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp + 8]
push eax
call fcn.00439fac
pop ecx
pop ecx
mov eax, dword [ebp + 8]
lea ecx, [eax + 4]
mov dword [ebp - 4], ecx
jmp 0x415986
lea eax, [ebp + 8]
push eax
call fcn.00410ba0
pop ecx
lea ecx, [ebp + 8]
call fcn.0040c032
mov eax, dword [ebp + 8]
cmp word [eax], 0x2d
je 0x4158c0
jmp 0x4159a2
add eax, 4
mov dword [ebp - 4], eax
lea eax, [ebp - 4]
push eax
call fcn.00410ba0
pop ecx
mov esi, dword [ebp - 0xc]
neg esi
sbb esi, esi
and esi, 0xfffffff0
lea ecx, [ebp - 4]
add esi, 0x20
call fcn.0040c032
push esi
push dword [eax]
call fcn.0040e615
push 2
push str.SeShutdownPrivilege
call fcn.0040fac5
push 2
push str.SeRemoteShutdownPrivilege
call fcn.0040fac5
add esp, 0x18
push 0x12c
lea ecx, [ebp - 8]
call fcn.00437072
movzx eax, byte [0x4b3003]
push eax
push esi
push dword [ebp - 0xc]
push str._nSHUTDOWN__0x_X__0x_X___CMD___Main0x_X
push dword [ebp - 8]
call dword [sym.imp.USER32.dll_wsprintfA]
push dword [ebp - 8]
call fcn.0040c4dd
add esp, 0x18
push dword [ebp - 0xc]
push dword [ebp - 0x10]
push dword [ebp - 0x14]
push 0x497994
push ebx
call dword [sym.imp.ADVAPI32.dll_InitiateSystemShutdownW]
lea ecx, [ebp - 8]
call fcn.00431c4c
xor eax, eax
jmp 0x4156b8
mov eax, dword [ebp + 8]
add eax, 2
lea ecx, [ebp - 4]
mov dword [ebp - 4], eax
call fcn.0040c032
push 2
push dword [eax]
call fcn.0040e615
pop ecx
pop ecx
push 0x12c
lea ecx, [ebp - 0x10]
call fcn.00437072
movzx eax, byte [0x4b3003]
push eax
push 2
push ebx
push str._nLOGOUT__0x_X__0x_X___CMD___Main0x_X
push dword [ebp - 0x10]
call dword [sym.imp.USER32.dll_wsprintfA]
push dword [ebp - 0x10]
call fcn.0040c4dd
add esp, 0x18
push ebx
push 0x10
call dword [sym.imp.USER32.dll_ExitWindowsEx]
mov esi, eax
neg esi
sbb esi, esi
lea ecx, [ebp - 0x10]
inc esi
call fcn.00431c4c
mov eax, esi
jmp 0x4156b8
mov eax, dword [ebp + 8]
add eax, 2
lea ecx, [ebp - 4]
mov dword [ebp - 4], eax
call fcn.0040c032
push 8
push dword [eax]
call fcn.0040e615
push 2
push str.SeShutdownPrivilege
call fcn.0040fac5
add esp, 0x10
push edi
push ebx
call sub.KERNEL32.dll_SetSystemPowerState
jmp 0x415b31
mov eax, dword [ebp + 8]
add eax, 2
cmp dword [0x4afeac], ebx
mov dword [ebp - 4], eax
je 0x415b0e
lea ecx, [ebp - 4]
call fcn.0040c032
push 4
push dword [eax]
call fcn.0040e615
pop ecx
pop ecx
push ebx
push edi
push ebx
call dword [0x4afeac]
jmp 0x415b31
mov eax, dword [ebp + 8]
add eax, 2
cmp dword [0x4afeac], ebx
mov dword [ebp - 4], eax
jne 0x415b15
mov eax, edi
jmp 0x4156b8
lea ecx, [ebp - 4]
call fcn.0040c032
push 0x80
push dword [eax]
call fcn.0040e615
pop ecx
pop ecx
call dword [sym.imp.USER32.dll_LockWorkStation]
neg eax
sbb eax, eax
inc eax
jmp 0x4156b8