Function at 0x5f8c80
Capabilities:
Start service
Stop service

Disassembly:
push ebp
mov ebp, esp
mov ecx, 0xd
push 0
push 0
dec ecx
jne 0x5f8c88
mov dword [ebp - 8], edx
mov byte [ebp - 1], al
xor eax, eax
push ebp
push 0x5f8ea8
push dword fs:[eax]
mov dword fs:[eax], esp
mov byte [ebp - 9], 0
mov al, byte [ebp - 1]
add al, 0xfe
sub al, 2
jae 0x5f8e8d
cmp byte [ebp - 1], 2
jne 0x5f8cd7
mov eax, dword [ebp - 8]
mov ecx, dword [eax + 0x10]
lea eax, [ebp - 0x40]
mov edx, 0x5f8ec4
call fcn.00408320
mov eax, dword [ebp - 0x40]
call fcn.005edc8c
jmp 0x5f8cf2
mov eax, dword [ebp - 8]
mov ecx, dword [eax + 0x10]
lea eax, [ebp - 0x44]
mov edx, 0x5f8f00
call fcn.00408320
mov eax, dword [ebp - 0x44]
call fcn.005edc8c
push 1
push 0
push 0
call sub.advapi32.dll_OpenSCManagerW
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
jne 0x5f8d64
push 0x5f8f3c
call sub.kernel32.dll_GetLastError_2
xor edx, edx
push edx
push eax
lea eax, [ebp - 0x4c]
call fcn.00423880
push dword [ebp - 0x4c]
push 0x5f8f7c
call sub.kernel32.dll_GetLastError_2
lea edx, [ebp - 0x50]
call fcn.00429534
push dword [ebp - 0x50]
push 0x5f8f7c
mov eax, dword [ebp - 8]
push dword [eax + 0xc]
push 0x5f8f7c
mov eax, dword [ebp - 8]
push dword [eax + 0x10]
lea eax, [ebp - 0x48]
mov edx, 8
call fcn.004083a8
mov eax, dword [ebp - 0x48]
call fcn.005edc8c
jmp 0x5f8e8d
cmp byte [ebp - 1], 2
jne 0x5f8d73
mov dword [ebp - 0x18], 0x10
jmp 0x5f8d7a
mov dword [ebp - 0x18], 0x20
mov eax, dword [ebp - 0x18]
push eax
mov eax, dword [ebp - 8]
mov eax, dword [eax + 0x10]
call fcn.004080c4
push eax
mov eax, dword [ebp - 0x14]
push eax
call sub.advapi32.dll_OpenServiceW
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jne 0x5f8def
push 0x5f8f8c
call sub.kernel32.dll_GetLastError_2
xor edx, edx
push edx
push eax
lea eax, [ebp - 0x58]
call fcn.00423880
push dword [ebp - 0x58]
push 0x5f8f7c
call sub.kernel32.dll_GetLastError_2
lea edx, [ebp - 0x5c]
call fcn.00429534
push dword [ebp - 0x5c]
push 0x5f8f7c
mov eax, dword [ebp - 8]
push dword [eax + 0x10]
lea eax, [ebp - 0x54]
mov edx, 6
call fcn.004083a8
mov eax, dword [ebp - 0x54]
call fcn.005edc8c
jmp 0x5f8e84
cmp byte [ebp - 1], 2
jne 0x5f8e0f
lea eax, [ebp - 0x1c]
push eax
push 0
mov eax, dword [ebp - 0x10]
push eax
call sub.advapi32.dll_StartServiceW
cmp eax, 1
sbb eax, eax
inc eax
mov byte [ebp - 9], al
jmp 0x5f8e27
lea eax, [ebp - 0x38]
push eax
push 1
mov eax, dword [ebp - 0x10]
push eax
call sub.advapi32.dll_ControlService
cmp eax, 1
sbb eax, eax
inc eax
mov byte [ebp - 9], al
cmp byte [ebp - 9], 0
jne 0x5f8e7b
push 0x5f8f3c
call sub.kernel32.dll_GetLastError_2
xor edx, edx
push edx
push eax
lea eax, [ebp - 0x64]
call fcn.00423880
push dword [ebp - 0x64]
push 0x5f8f7c
call sub.kernel32.dll_GetLastError_2
lea edx, [ebp - 0x68]
call fcn.00429534
push dword [ebp - 0x68]
push 0x5f8f7c
mov eax, dword [ebp - 8]
push dword [eax + 0x10]
lea eax, [ebp - 0x60]
mov edx, 6
call fcn.004083a8
mov eax, dword [ebp - 0x60]
call fcn.005edc8c
mov eax, dword [ebp - 0x10]
push eax
call sub.advapi32.dll_CloseServiceHandle
mov eax, dword [ebp - 0x14]
push eax
call sub.advapi32.dll_CloseServiceHandle
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x5f8eaf
lea eax, [ebp - 0x68]
mov edx, 0xb
call fcn.004072bc
ret