Function at 0x4afc2c
Capabilities:
Shutdown system

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffff004
push eax
add esp, 0xffffffe8
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x1018], ebx
mov dword [ebp - 0x1014], ebx
mov dword [ebp - 0x1010], ebx
mov dword [ebp - 0x100c], ebx
mov esi, ecx
mov byte [ebp - 1], dl
mov ebx, eax
xor eax, eax
push ebp
push 0x4b0001
push dword fs:[eax]
mov dword fs:[eax], esp
push esi
mov esi, 0x4b0010
lea edi, [ebp - 0x1008]
mov ecx, 0x400
rep movsd dword es:[edi], dword [esi]
pop esi
xor edx, edx
mov eax, ebx
call fcn.004b1ef4
xor edx, edx
mov eax, dword [ebx + 0x340]
mov ecx, dword [eax]
call dword [ecx + 0xb8]
xor edx, edx
mov eax, dword [ebx + 0x374]
mov ecx, dword [eax]
call dword [ecx + 0xb8]
xor edx, edx
mov eax, dword [ebx + 0x398]
mov ecx, dword [eax]
call dword [ecx + 0xb8]
cmp esi, 0xffffffff
jne 0x4afcc9
mov eax, dword [ebx + 0x3c8]
mov esi, dword [eax + 0x200]
mov eax, esi
sub eax, 1
jb 0x4afcda
je 0x4afce3
dec eax
je 0x4afcea
dec eax
je 0x4afcf3
jmp 0x4afcfc
mov dword [ebp - 8], 1
jmp 0x4afd03
xor eax, eax
mov dword [ebp - 8], eax
jmp 0x4afd03
mov dword [ebp - 8], 2
jmp 0x4afd03
mov dword [ebp - 8], 8
jmp 0x4afd03
mov dword [ebp - 8], 1
mov eax, dword [ebx + 0x3d0]
mov edx, dword [eax]
call dword [edx + 0xb4]
test al, al
je 0x4afd19
or dword [ebp - 8], 4
mov eax, dword [0x4b6c98]
cmp dword [eax], 0
je 0x4afd3c
mov eax, dword [0x4b6c98]
mov eax, dword [eax]
cmp byte [eax + 0x47], 0
je 0x4afd3c
mov eax, dword [0x4b6c98]
mov eax, dword [eax]
call fcn.0044f1e0
cmp byte [ebp - 1], 0
je 0x4afd84
cmp dword [ebx + 0x504], 0
jle 0x4afd84
mov eax, dword [ebx + 0x31c]
xor edx, edx
mov dword [eax + 0x30], edx
mov eax, dword [ebx + 0x494]
mov edx, dword [eax]
call dword [edx + 0xb4]
mov ecx, eax
mov edx, esi
mov eax, dword [ebx + 0x504]
call fcn.004a351c
mov edx, dword [ebx + 0x31c]
mov ecx, dword [ebx + 0x2d4]
mov dword [edx + 0x30], ecx
jmp 0x4afd86
mov al, 1
test al, al
je 0x4affd3
mov eax, dword [ebx + 0x3ec]
mov edx, dword [eax]
call dword [edx + 0xb4]
test al, al
je 0x4afdbc
lea edx, [ebp - 0x100c]
mov eax, dword [ebx + 0x3f0]
call fcn.00433418
mov eax, dword [ebp - 0x100c]
call fcn.004a2c5c
mov eax, dword [ebx + 0x3e4]
mov edx, dword [eax]
call dword [edx + 0xb4]
test al, al
je 0x4afe16
mov eax, dword [ebx + 0x47c]
call fcn.0047d74c
push eax
mov eax, dword [ebx + 0x404]
mov edx, dword [eax]
call dword [edx + 0xb4]
push eax
mov eax, dword [ebx + 0x458]
mov edx, dword [eax]
call dword [edx + 0xb4]
push eax
lea edx, [ebp - 0x1010]
mov eax, dword [ebx + 0x3e8]
call fcn.00433418
mov eax, dword [ebp - 0x1010]
pop edx
pop ecx
call fcn.004a29fc
mov eax, dword [ebx + 0x3d4]
mov edx, dword [eax]
call dword [edx + 0xb4]
test al, al
je 0x4afe30
xor eax, eax
call dword [0x4b7b34]
mov eax, esi
cmp eax, 7
ja case.default.0x4afe3b
jmp dword [eax*4 + 0x4afe42]
push 0
mov eax, dword [ebp - 8]
push eax
call sub.user32.dll_ExitWindowsEx
test eax, eax
je 0x4afe89
mov byte [0x4b7b2c], 1
mov eax, dword [0x4b6d90]
mov eax, dword [eax]
call fcn.00452370
jmp case.default.0x4afe3b
push 0
push 0x1000
lea eax, [ebp - 0x1008]
push eax
push 0
call sub.kernel32.dll_GetLastError_1
push eax
push 0
push 0x1000
call sub.kernel32.dll_FormatMessageA
jmp case.default.0x4afe3b
mov eax, dword [ebx + 0x3d0]
mov edx, dword [eax]
call dword [edx + 0xb4]
neg al
sbb eax, eax
push eax
push 0xffffffffffffffff
call sub.kernel32.dll_SetSystemPowerState
test eax, eax
jne case.default.0x4afe3b
push 0
push 0x1000
lea eax, [ebp - 0x1008]
push eax
push 0
call sub.kernel32.dll_GetLastError_1
push eax
push 0
push 0x1000
call sub.kernel32.dll_FormatMessageA
jmp case.default.0x4afe3b
mov eax, dword [ebx + 0x3d0]
mov edx, dword [eax]
call dword [edx + 0xb4]
neg al
sbb eax, eax
push eax
push 0
call sub.kernel32.dll_SetSystemPowerState
test eax, eax
jne case.default.0x4afe3b
push 0
push 0x1000
lea eax, [ebp - 0x1008]
push eax
push 0
call sub.kernel32.dll_GetLastError_1
push eax
push 0
push 0x1000
call sub.kernel32.dll_FormatMessageA
jmp case.default.0x4afe3b
mov edi, dword [0x4b6b60]
mov edi, dword [edi]
call edi
jmp case.default.0x4afe3b
mov al, 1
call dword [0x4b7b34]
lea eax, [ebp - 0x1014]
lea edx, [ebp - 0x1008]
mov ecx, 0x1000
call fcn.00403e4c
cmp dword [ebp - 0x1014], 0
je 0x4aff98
push 0x10
lea edx, [ebp - 0x1018]
mov eax, 0x3ea
call fcn.004a1e44
mov eax, dword [ebp - 0x1018]
call fcn.00404060
mov ecx, eax
lea edx, [ebp - 0x1008]
mov eax, dword [0x4b6d90]
mov eax, dword [eax]
call fcn.00452414
cmp esi, 3
jle 0x4affd3
mov eax, dword [ebx + 0x4dc]
mov edx, dword [eax]
call dword [edx + 0xb4]
test al, al
je 0x4affc0
mov eax, dword [ebx + 0x2f4]
mov bx, 0xffec
call fcn.00403114
jmp 0x4affd3
mov byte [0x4b7b2c], 1
mov eax, dword [0x4b6d90]
mov eax, dword [eax]
call fcn.00452370
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4b0008
lea eax, [ebp - 0x1018]
mov edx, 2
call fcn.00403c40
lea eax, [ebp - 0x1010]
mov edx, 2
call fcn.00403c40
ret