Function at 0x5f7dd0
Capabilities:
Delete file
Delete service
Modify service
Start service

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffc4
xor eax, eax
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x2c], eax
mov dword [ebp - 4], eax
mov dword [ebp - 8], eax
xor eax, eax
push ebp
push 0x5f8143
push dword fs:[eax]
mov dword fs:[eax], esp
mov byte [ebp - 0x11], 0
push ebp
call fcn.005f7824
pop ecx
lea edx, [ebp - 0x2c]
mov eax, dword [ebp - 4]
call fcn.00479630
mov edx, dword [ebp - 0x2c]
lea eax, [ebp - 4]
call fcn.00406a5c
push 0xf003f
push 0
push 0
call sub.advapi32.dll_OpenSCManagerW
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jne 0x5f7e3d
call fcn.005f77b0
jmp 0x5f811b
xor edx, edx
mov eax, 0x5f8160
call fcn.0051eae8
mov byte [ebp - 0x25], 0
xor eax, eax
push ebp
push 0x5f806c
push dword fs:[eax]
mov dword fs:[eax], esp
push 0xf01ff
push 0x5f8180
mov eax, dword [ebp - 0xc]
push eax
call sub.advapi32.dll_OpenServiceW
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jne 0x5f7e90
push ebp
call fcn.005f7bb4
pop ecx
test al, al
jne 0x5f7e8c
call fcn.00405308
jmp 0x5f811b
mov byte [ebp - 0x25], 1
lea eax, [ebp - 0x20]
push eax
push 0
push 0
mov eax, dword [ebp - 0x10]
push eax
call sub.advapi32.dll_QueryServiceConfigW
cmp dword [ebp - 0x20], 0x24
jb 0x5f7fe5
mov eax, dword [ebp - 0x20]
push eax
call fcn.00408ec0
pop ecx
mov dword [ebp - 0x1c], eax
xor eax, eax
push ebp
push 0x5f7fde
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 0x1c]
xor ecx, ecx
mov edx, dword [ebp - 0x20]
call fcn.00403a4c
lea eax, [ebp - 0x20]
push eax
mov eax, dword [ebp - 0x20]
push eax
mov eax, dword [ebp - 0x1c]
push eax
mov eax, dword [ebp - 0x10]
push eax
call sub.advapi32.dll_QueryServiceConfigW
test eax, eax
je 0x5f7f77
mov eax, dword [ebp - 0x1c]
mov eax, dword [eax + 0xc]
test eax, eax
je 0x5f7efe
cmp word [eax], 0
jne 0x5f7f1d
lea edx, [ebp - 0x30]
mov eax, dword [ebp - 4]
call fcn.00479630
mov edx, dword [ebp - 0x30]
lea eax, [ebp - 8]
mov ecx, 0x5f81a8
call fcn.00406edc
jmp 0x5f7f2b
lea eax, [ebp - 8]
mov edx, dword [ebp - 0x1c]
mov edx, dword [edx + 0xc]
call fcn.00406bb4
mov eax, dword [ebp - 0x1c]
cmp dword [eax + 4], 2
jne 0x5f7f44
mov eax, dword [ebp - 0x1c]
mov eax, dword [eax + 0xc]
test eax, eax
je 0x5f7f42
cmp word [eax], 0
jne 0x5f7f68
push 0
push 0
push 0
push 0
push 0
push 0
mov eax, dword [ebp - 8]
call fcn.00406a94
push eax
push 0xffffffffffffffff
push 2
push 0xffffffffffffffff
mov eax, dword [ebp - 0x10]
push eax
call sub.advapi32.dll_ChangeServiceConfigW
cmp byte [ebp - 0x25], 0
jne 0x5f7fc6
push ebp
call fcn.005f7a98
pop ecx
jmp 0x5f7fc6
mov eax, dword [ebp - 0x10]
push eax
call sub.advapi32.dll_DeleteService
mov eax, dword [ebp - 0x10]
push eax
call sub.advapi32.dll_CloseServiceHandle
lea edx, [ebp - 0x34]
xor eax, eax
call fcn.004034e8
mov eax, dword [ebp - 0x34]
mov edx, dword [ebp - 8]
call fcn.005f6300
test al, al
je 0x5f7fa9
push ebp
call fcn.005f7a98
pop ecx
push ebp
call fcn.005f7bb4
pop ecx
push 0xf01ff
push 0x5f8180
mov eax, dword [ebp - 0xc]
push eax
call sub.advapi32.dll_OpenServiceW
mov dword [ebp - 0x10], eax
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x5f7fe5
mov eax, dword [ebp - 0x1c]
push eax
call fcn.00408ed0
pop ecx
ret
xor eax, eax
mov dword [ebp - 0x18], eax
xor edx, edx
mov eax, 0x5f81dc
call fcn.0051eae8
lea eax, [ebp - 0x18]
push eax
push 0
mov eax, dword [ebp - 0x10]
push eax
call sub.advapi32.dll_StartServiceW
test eax, eax
jne 0x5f800e
call fcn.005f77b0
mov eax, dword [ebp - 0x10]
push eax
call sub.advapi32.dll_CloseServiceHandle
lea eax, [ebp - 0x38]
mov ecx, 0x5f8214
mov edx, dword [ebp - 8]
call fcn.00406edc
mov eax, dword [ebp - 0x38]
call fcn.004713d4
test al, al
je 0x5f8051
lea eax, [ebp - 0x3c]
mov ecx, 0x5f8214
mov edx, dword [ebp - 8]
call fcn.00406edc
mov eax, dword [ebp - 0x3c]
call fcn.00406a94
push eax
call sub.kernel32.dll_DeleteFileW
mov byte [ebp - 0x11], 1
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x5f8073
mov eax, dword [ebp - 0xc]
push eax
call sub.advapi32.dll_CloseServiceHandle
ret
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x5f814a
lea eax, [ebp - 0x3c]
mov edx, 5
call fcn.00406a00
lea eax, [ebp - 8]
mov edx, 2
call fcn.00406a00
ret