Function at 0x52edc0
Capabilities:
Check for time delay via gettickcount
Query service status
Start service

Disassembly:
push ebx
push esi
push edi
push ebp
add esp, 0xffffffd0
mov ebx, eax
mov byte [esp], 0
xor eax, eax
mov dword [esp + 4], eax
push 0xf003f
push 0
push 0
call sub.advapi32.dll_OpenSCManagerA
mov edi, eax
test edi, edi
je 0x52efdb
push 0xf01ff
mov eax, ebx
call fcn.0040556c
push eax
push edi
call sub.advapi32.dll_OpenServiceA
mov esi, eax
test esi, esi
je 0x52efd5
lea eax, [esp + 0xc]
push eax
push esi
call sub.advapi32.dll_QueryServiceStatus
test eax, eax
jne 0x52ee28
push esi
call sub.advapi32.dll_CloseServiceHandle
push edi
call sub.advapi32.dll_CloseServiceHandle
jmp 0x52efdb
mov eax, dword [esp + 0x10]
cmp eax, 1
je 0x52ee47
cmp eax, 3
je 0x52ee47
push esi
call sub.advapi32.dll_CloseServiceHandle
push edi
call sub.advapi32.dll_CloseServiceHandle
jmp 0x52efdb
call sub.kernel32.dll_GetTickCount
mov dword [esp + 8], eax
mov ebp, dword [esp + 0x20]
jmp 0x52eeef
mov eax, dword [esp + 0x24]
mov dword [esp + 0x28], eax
xor eax, eax
mov dword [esp + 0x2c], eax
fild qword [esp + 0x28]
fdiv dword [0x52efe8]
call fcn.0040313c
mov ebx, eax
cmp ebx, 0x3e8
jae 0x52ee87
mov ebx, 0x3e8
jmp 0x52ee94
cmp ebx, 0x2710
jbe 0x52ee94
mov ebx, 0x2710
push ebx
call sub.kernel32.dll_Sleep_1
lea eax, [esp + 0xc]
push eax
push esi
call sub.advapi32.dll_QueryServiceStatus
test eax, eax
jne 0x52eeba
push esi
call sub.advapi32.dll_CloseServiceHandle
push edi
call sub.advapi32.dll_CloseServiceHandle
jmp 0x52efdb
cmp ebp, dword [esp + 0x20]
jae 0x52eecf
call sub.kernel32.dll_GetTickCount
mov dword [esp + 8], eax
mov ebp, dword [esp + 0x20]
jmp 0x52eeef
call sub.kernel32.dll_GetTickCount
sub eax, dword [esp + 8]
cmp eax, dword [esp + 0x24]
jbe 0x52eeef
push esi
call sub.advapi32.dll_CloseServiceHandle
push edi
call sub.advapi32.dll_CloseServiceHandle
jmp 0x52efdb
cmp dword [esp + 0x10], 3
je 0x52ee59
lea eax, [esp + 4]
push eax
push 0
push esi
call sub.advapi32.dll_StartServiceA
test eax, eax
jne 0x52ef1c
push esi
call sub.advapi32.dll_CloseServiceHandle
push edi
call sub.advapi32.dll_CloseServiceHandle
jmp 0x52efdb
lea eax, [esp + 0xc]
push eax
push esi
call sub.advapi32.dll_QueryServiceStatus
test eax, eax
jne 0x52ef3c
push esi
call sub.advapi32.dll_CloseServiceHandle
push edi
call sub.advapi32.dll_CloseServiceHandle
jmp 0x52efdb
call sub.kernel32.dll_GetTickCount
mov dword [esp + 8], eax
mov ebp, dword [esp + 0x20]
jmp 0x52efbf
mov eax, dword [esp + 0x24]
mov dword [esp + 0x28], eax
xor eax, eax
mov dword [esp + 0x2c], eax
fild qword [esp + 0x28]
fdiv dword [0x52efe8]
call fcn.0040313c
mov ebx, eax
cmp ebx, 0x3e8
jae 0x52ef79
mov ebx, 0x3e8
jmp 0x52ef86
cmp ebx, 0x2710
jbe 0x52ef86
mov ebx, 0x2710
push ebx
call sub.kernel32.dll_Sleep_1
lea eax, [esp + 0xc]
push eax
push esi
call sub.advapi32.dll_QueryServiceStatus
test eax, eax
je 0x52efc6
cmp ebp, dword [esp + 0x20]
jae 0x52efb0
call sub.kernel32.dll_GetTickCount
mov dword [esp + 8], eax
mov ebp, dword [esp + 0x20]
jmp 0x52efbf
call sub.kernel32.dll_GetTickCount
sub eax, dword [esp + 8]
cmp eax, dword [esp + 0x24]
ja 0x52efc6
cmp dword [esp + 0x10], 2
je 0x52ef4b
cmp dword [esp + 0x10], 4
sete byte [esp]
push esi
call sub.advapi32.dll_CloseServiceHandle
push edi
call sub.advapi32.dll_CloseServiceHandle
mov al, byte [esp]
add esp, 0x30
pop ebp
pop edi
pop esi
pop ebx
ret