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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x34
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov ecx, dword [ebp + 8]
mov dword [ecx + 0xa4], eax
mov edx, dword [ebp + 8]
cmp dword [edx + 0xa4], 0
jne 0x406af3
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.OpenSCManager_failed___d__n
call fcn.00432174
add esp, 8
jmp 0x406ee8
push 0xf01ff
mov eax, dword [ebp + 8]
add eax, 0xac
push eax
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0xa4]
push edx
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov ecx, dword [ebp + 8]
mov dword [ecx + 0xa8], eax
mov edx, dword [ebp + 8]
cmp dword [edx + 0xa8], 0
jne 0x406b4f
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.OpenService_failed___d__n
call fcn.00432174
add esp, 8
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0xa4]
push ecx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x406ee8
lea edx, [ebp - 0xc]
push edx
push 0x24
lea eax, [ebp - 0x34]
push eax
push 0
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0xa8]
push edx
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
test eax, eax
jne 0x406ba8
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x44a2c4
call fcn.00432174
add esp, 8
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0xa8]
push ecx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0xa4]
push eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x406ee8
cmp dword [ebp - 0x30], 1
je 0x406be6
cmp dword [ebp - 0x30], 3
je 0x406be6
push str.Cannot_start_the_service_because_it_is_already_running_n
call fcn.00432174
add esp, 4
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0xa8]
push edx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0xa4]
push ecx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x406ee8
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [ebp - 0x10], eax
mov edx, dword [ebp - 0x20]
mov dword [ebp - 4], edx
cmp dword [ebp - 0x30], 3
jne 0x406cf1
mov eax, dword [ebp - 0x1c]
xor edx, edx
mov ecx, 0xa
div ecx
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0x3e8
jae 0x406c20
mov dword [ebp - 8], 0x3e8
jmp 0x406c30
cmp dword [ebp - 8], 0x2710
jbe 0x406c30
mov dword [ebp - 8], 0x2710
mov edx, dword [ebp - 8]
push edx
call dword [sym.imp.KERNEL32.dll_Sleep]
lea eax, [ebp - 0xc]
push eax
push 0x24
lea ecx, [ebp - 0x34]
push ecx
push 0
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0xa8]
push eax
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
test eax, eax
jne 0x406c93
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x44a320
call fcn.00432174
add esp, 8
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0xa8]
push edx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0xa4]
push ecx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x406ee8
mov edx, dword [ebp - 0x20]
cmp edx, dword [ebp - 4]
jbe 0x406cac
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x20]
mov dword [ebp - 4], eax
jmp 0x406cec
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [ebp - 0x10]
cmp eax, dword [ebp - 0x1c]
jbe 0x406cec
push str.Timeout_waiting_for_service_to_stop_n
call fcn.00432174
add esp, 4
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0xa8]
push edx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0xa4]
push ecx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x406ee8
jmp 0x406bf5
push 0
push 0
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0xa8]
push eax
call dword [sym.imp.ADVAPI32.dll_StartServiceA]
test eax, eax
jne 0x406d44
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.StartService_failed___d__n
call fcn.00432174
add esp, 8
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0xa8]
push edx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0xa4]
push ecx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x406ee8
push str.Service_start_pending..._n
call fcn.00432174
add esp, 4
lea edx, [ebp - 0xc]
push edx
push 0x24
lea eax, [ebp - 0x34]
push eax
push 0
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0xa8]
push edx
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
test eax, eax
jne 0x406daa
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x44a3a4
call fcn.00432174
add esp, 8
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0xa8]
push ecx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0xa4]
push eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x406ee8
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [ebp - 0x10], eax
mov ecx, dword [ebp - 0x20]
mov dword [ebp - 4], ecx
cmp dword [ebp - 0x30], 2
jne 0x406e62
mov eax, dword [ebp - 0x1c]
xor edx, edx
mov ecx, 0xa
div ecx
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0x3e8
jae 0x406de4
mov dword [ebp - 8], 0x3e8
jmp 0x406df4
cmp dword [ebp - 8], 0x2710
jbe 0x406df4
mov dword [ebp - 8], 0x2710
mov edx, dword [ebp - 8]
push edx
call dword [sym.imp.KERNEL32.dll_Sleep]
lea eax, [ebp - 0xc]
push eax
push 0x24
lea ecx, [ebp - 0x34]
push ecx
push 0
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0xa8]
push eax
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
test eax, eax
jne 0x406e34
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.QueryServiceStatusEx_failed___d__n
call fcn.00432174
add esp, 8
jmp 0x406e62
mov ecx, dword [ebp - 0x20]
cmp ecx, dword [ebp - 4]
jbe 0x406e4d
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [ebp - 0x10], eax
mov edx, dword [ebp - 0x20]
mov dword [ebp - 4], edx
jmp 0x406e5d
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [ebp - 0x10]
cmp eax, dword [ebp - 0x1c]
jbe 0x406e5d
jmp 0x406e62
jmp 0x406db9
cmp dword [ebp - 0x30], 4
jne 0x406e77
push str.Service_started_successfully._n
call fcn.00432174
add esp, 4
jmp 0x406ec8
push str.Service_not_started.__n
call fcn.00432174
add esp, 4
mov eax, dword [ebp - 0x30]
push eax
push str.__Current_State:__d_n
call fcn.00432174
add esp, 8
mov ecx, dword [ebp - 0x28]
push ecx
push str.__Exit_Code:__d_n
call fcn.00432174
add esp, 8
mov edx, dword [ebp - 0x20]
push edx
push str.__Check_Point:__d_n
call fcn.00432174
add esp, 8
mov eax, dword [ebp - 0x1c]
push eax
push str.__Wait_Hint:__d_n
call fcn.00432174
add esp, 8
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0xa8]
push edx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0xa4]
push ecx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov esp, ebp
pop ebp
ret 4