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

Disassembly:
sub esp, 0x34
push ebx
push ebp
push esi
push edi
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
test eax, eax
mov dword [esp + 0x1c], eax
jne 0x415751
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.LaunchService::Failed_to_open_SCManager___d_.
mov ecx, 0x43b48c
call fcn.0040a090
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x34
ret
push 0xf01ff
push str.NemService
push eax
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov edi, eax
test edi, edi
jne 0x415786
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.LaunchService::Failed_to_open_service___d_.
mov ecx, 0x43b48c
call fcn.0040a090
add esp, 8
jmp 0x415a5a
lea eax, [esp + 0x14]
push eax
push 0x24
lea ecx, [esp + 0x28]
push ecx
push 0
push edi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
test eax, eax
jne 0x4157bd
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.LaunchService::Failed_to_query_service_status_1___d_.
mov ecx, 0x43b48c
call fcn.0040a090
add esp, 8
jmp 0x415a5a
mov eax, dword [esp + 0x24]
cmp eax, 1
je 0x4157d5
cmp eax, 3
je 0x4157d5
push str.LaunchService::Cannot_start_the_service_because_it_is_already_running.
jmp 0x4159cb
mov ebx, dword [sym.imp.KERNEL32.dll_GetTickCount]
call ebx
cmp dword [esp + 0x24], 3
mov ebp, dword [esp + 0x34]
mov esi, eax
jne 0x415859
lea ebx, [ebx]
mov eax, 0xcccccccd
mul dword [esp + 0x38]
shr edx, 3
cmp edx, 0x3e8
jae 0x41580b
mov edx, 0x3e8
jmp 0x415818
cmp edx, 0x2710
jbe 0x415818
mov edx, 0x2710
push edx
call dword [sym.imp.KERNEL32.dll_Sleep]
lea edx, [esp + 0x14]
push edx
push 0x24
lea eax, [esp + 0x28]
push eax
push 0
push edi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
test eax, eax
je 0x415886
cmp dword [esp + 0x34], ebp
jbe 0x415848
call ebx
mov ebp, dword [esp + 0x34]
mov esi, eax
jmp 0x415852
call ebx
sub eax, esi
cmp eax, dword [esp + 0x38]
ja 0x4158a4
cmp dword [esp + 0x24], 3
je 0x4157f0
push 0
push 0
push edi
call dword [sym.imp.ADVAPI32.dll_StartServiceA]
test eax, eax
jne 0x4158bb
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.LaunchService::Failed_to_StartService___d_
mov ecx, 0x43b48c
call fcn.0040a090
add esp, 8
jmp 0x415a5a
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.LaunchService::Failed_to_query_service_status_2___d_.
mov ecx, 0x43b48c
call fcn.0040a090
add esp, 8
jmp 0x415a5a
push str.LaunchService::Timeout_waiting_for_service_to_stop.
mov ecx, 0x43b48c
call fcn.0040a090
add esp, 4
jmp 0x415a5a
push str.LaunchService::Service_start_pending...
mov ecx, 0x43b48c
call fcn.0040a090
mov ebp, dword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
add esp, 4
lea ecx, [esp + 0x14]
push ecx
push 0x24
lea edx, [esp + 0x28]
push edx
push 0
push edi
call ebp
test eax, eax
jne 0x415906
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.LaunchService::Failed_to_query_service_status_3___d_
mov ecx, 0x43b48c
call fcn.0040a090
add esp, 8
jmp 0x415a5a
call ebx
cmp dword [esp + 0x24], 2
mov esi, eax
mov eax, dword [esp + 0x34]
mov dword [esp + 0x18], eax
jne 0x4159a8
lea ecx, [ecx]
mov eax, 0xcccccccd
mul dword [esp + 0x38]
shr edx, 3
cmp edx, 0x3e8
jae 0x41593b
mov edx, 0x3e8
jmp 0x415948
cmp edx, 0x2710
jbe 0x415948
mov edx, 0x2710
push edx
call dword [sym.imp.KERNEL32.dll_Sleep]
lea ecx, [esp + 0x14]
push ecx
push 0x24
lea edx, [esp + 0x28]
push edx
push 0
push edi
call ebp
test eax, eax
je 0x41598f
mov eax, dword [esp + 0x18]
cmp dword [esp + 0x34], eax
jbe 0x41597c
call ebx
mov ecx, dword [esp + 0x34]
mov esi, eax
mov dword [esp + 0x18], ecx
jmp 0x415986
call ebx
sub eax, esi
cmp eax, dword [esp + 0x38]
ja 0x4159a8
cmp dword [esp + 0x24], 2
je 0x415920
jmp 0x4159a8
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.LaunchService::Failed_to_query_service_status_4___d_
mov ecx, 0x43b48c
call fcn.0040a090
add esp, 8
mov edx, dword [esp + 0x28]
push edx
push str.LaunchService::Service_controls_accepted_is__0x_x_
mov ecx, 0x43b48c
call fcn.0040a090
add esp, 8
cmp dword [esp + 0x24], 4
jne 0x4159f5
push str.LaunchService::Service_started_successfully.
mov ecx, 0x43b48c
call fcn.0040a090
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
add esp, 4
push edi
call esi
mov eax, dword [esp + 0x1c]
push eax
call esi
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x34
ret
push str.LaunchService::Service_not_started.
mov ecx, 0x43b48c
call fcn.0040a090
mov ecx, dword [esp + 0x28]
add esp, 4
push ecx
push str.LaunchService::Current_State:__d
mov ecx, 0x43b48c
call fcn.0040a090
mov edx, dword [esp + 0x34]
push edx
push str.LaunchService::Exit_Code:__d
mov ecx, 0x43b48c
call fcn.0040a090
mov eax, dword [esp + 0x44]
push eax
push str.LaunchService::Check_Point:__d
mov ecx, 0x43b48c
call fcn.0040a090
mov ecx, dword [esp + 0x50]
push ecx
push str.LaunchService::Wait_Hint:__d
mov ecx, 0x43b48c
call fcn.0040a090
add esp, 0x20
test edi, edi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
je 0x415a67
push edi
call esi
mov edx, dword [esp + 0x1c]
push edx
call esi
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x34
ret