Function at 0x5f8fd8
Capabilities:
Modify service
Query service status

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffb8
push ebx
push esi
push edi
xor edx, edx
mov dword [ebp - 0x44], edx
mov dword [ebp - 0x48], edx
mov dword [ebp - 0x3c], edx
mov dword [ebp - 0x40], edx
mov dword [ebp - 0x34], edx
mov dword [ebp - 0x38], edx
mov dword [ebp - 4], eax
xor eax, eax
push ebp
push 0x5f91ea
push dword fs:[eax]
mov dword fs:[eax], esp
mov byte [ebp - 5], 5
push 1
push 0
push 0
call sub.advapi32.dll_OpenSCManagerW
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jne 0x5f905c
mov byte [ebp - 5], 6
push 0x5f9208
mov eax, dword [ebp - 4]
push dword [eax + 0x10]
push 0x5f9248
call sub.kernel32.dll_GetLastError_2
lea edx, [ebp - 0x38]
call fcn.00429534
push dword [ebp - 0x38]
lea eax, [ebp - 0x34]
mov edx, 4
call fcn.004083a8
mov eax, dword [ebp - 0x34]
call fcn.005edc8c
jmp 0x5f91cf
xor eax, eax
push ebp
push 0x5f91bc
push dword fs:[eax]
mov dword fs:[eax], esp
push 4
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x10]
call fcn.004080c4
push eax
mov eax, dword [ebp - 0xc]
push eax
call sub.advapi32.dll_OpenServiceW
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jne 0x5f90d4
call sub.kernel32.dll_GetLastError_2
cmp eax, 0x424
jne 0x5f909a
mov byte [ebp - 5], 0
push 0x5f9268
mov eax, dword [ebp - 4]
push dword [eax + 0x10]
push 0x5f9248
call sub.kernel32.dll_GetLastError_2
lea edx, [ebp - 0x40]
call fcn.00429534
push dword [ebp - 0x40]
lea eax, [ebp - 0x3c]
mov edx, 4
call fcn.004083a8
mov eax, dword [ebp - 0x3c]
call fcn.005edc8c
jmp 0x5f91b2
mov byte [ebp - 5], 1
lea eax, [ebp - 0x30]
push eax
mov eax, dword [ebp - 0x10]
push eax
call sub.advapi32.dll_QueryServiceStatus
test eax, eax
je 0x5f912c
cmp dword [ebp - 0x2c], 4
jne 0x5f90f5
mov byte [ebp - 5], 2
jmp 0x5f912c
push 0x5f92a4
mov eax, dword [ebp - 4]
push dword [eax + 0x10]
push 0x5f92d4
mov eax, dword [ebp - 0x2c]
xor edx, edx
push edx
push eax
lea eax, [ebp - 0x48]
call fcn.00423880
push dword [ebp - 0x48]
lea eax, [ebp - 0x44]
mov edx, 4
call fcn.004083a8
mov eax, dword [ebp - 0x44]
call fcn.005edc8c
cmp byte [ebp - 5], 1
jne 0x5f91a9
push 2
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x10]
call fcn.004080c4
push eax
mov eax, dword [ebp - 0xc]
push eax
call sub.advapi32.dll_OpenServiceW
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jne 0x5f9164
call sub.kernel32.dll_GetLastError_2
cmp eax, 0x424
jne 0x5f91a9
mov byte [ebp - 5], 0
jmp 0x5f91a9
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push 0xffffffffffffffff
push 0xffffffffffffffff
push 0xffffffffffffffff
mov eax, dword [ebp - 0x10]
push eax
call sub.advapi32.dll_ChangeServiceConfigW
cmp eax, 1
sbb eax, eax
inc eax
mov byte [ebp - 0x11], al
cmp byte [ebp - 0x11], 0
jne 0x5f91a0
call sub.kernel32.dll_GetLastError_2
cmp eax, 0x430
jne 0x5f91a0
mov byte [ebp - 5], 4
mov eax, dword [ebp - 0x10]
push eax
call sub.advapi32.dll_CloseServiceHandle
mov eax, dword [ebp - 0x10]
push eax
call sub.advapi32.dll_CloseServiceHandle
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x5f91c6
mov eax, dword [ebp - 0xc]
push eax
call sub.advapi32.dll_CloseServiceHandle
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x5f91f1
lea eax, [ebp - 0x48]
mov edx, 6
call fcn.004072bc
ret