Function at 0x419740
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 0x419781
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.CTDIInstaller::Start:OpenSCManager_failed___d__n
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.tdisvn
push eax
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov edi, eax
test edi, edi
jne 0x4197b6
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.CTDIInstaller::Start:OpenService_failed___d__n
mov ecx, 0x43b48c
call fcn.0040a090
add esp, 8
jmp 0x419a4d
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
je 0x4198de
mov eax, dword [esp + 0x24]
cmp eax, 1
je 0x4197eb
cmp eax, 3
je 0x4197eb
push str.CTDIInstaller::Start:Cannot_start_the_service_because_it_is_already_running_n
jmp 0x4199be
mov ebx, dword [sym.imp.KERNEL32.dll_GetTickCount]
call ebx
cmp dword [esp + 0x24], 3
mov ebp, dword [esp + 0x34]
mov esi, eax
jne 0x41986d
mov eax, 0xcccccccd
mul dword [esp + 0x38]
shr edx, 3
cmp edx, 0x3e8
jae 0x41981b
mov edx, 0x3e8
jmp 0x419828
cmp edx, 0x2710
jbe 0x419828
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 0x4198de
cmp dword [esp + 0x34], ebp
jbe 0x41985c
call ebx
mov ebp, dword [esp + 0x34]
mov esi, eax
jmp 0x419866
call ebx
sub eax, esi
cmp eax, dword [esp + 0x38]
ja 0x41989a
cmp dword [esp + 0x24], 3
je 0x419800
push 0
push 0
push edi
call dword [sym.imp.ADVAPI32.dll_StartServiceA]
test eax, eax
jne 0x4198b1
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.CTDIInstaller::Start:StartService_failed___d__n
mov ecx, 0x43b48c
call fcn.0040a090
add esp, 8
jmp 0x419a4d
push str.CTDIInstaller::Start:Timeout_waiting_for_service_to_stop_n
mov ecx, 0x43b48c
call fcn.0040a090
add esp, 4
jmp 0x419a4d
push str.CTDIInstaller::Start:Service_start_pending..._n
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 0x4198fc
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.CTDIInstaller::Start:QueryServiceStatusEx_failed___d__n
mov ecx, 0x43b48c
call fcn.0040a090
add esp, 8
jmp 0x419a4d
call ebx
cmp dword [esp + 0x24], 2
mov esi, eax
mov eax, dword [esp + 0x34]
mov dword [esp + 0x18], eax
jne 0x41999b
mov eax, 0xcccccccd
mul dword [esp + 0x38]
shr edx, 3
cmp edx, 0x3e8
jae 0x41992e
mov edx, 0x3e8
jmp 0x41993b
cmp edx, 0x2710
jbe 0x41993b
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 0x419982
mov eax, dword [esp + 0x18]
cmp dword [esp + 0x34], eax
jbe 0x41996f
call ebx
mov ecx, dword [esp + 0x34]
mov esi, eax
mov dword [esp + 0x18], ecx
jmp 0x419979
call ebx
sub eax, esi
cmp eax, dword [esp + 0x38]
ja 0x41999b
cmp dword [esp + 0x24], 2
je 0x419913
jmp 0x41999b
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.CTDIInstaller::Start:QueryServiceStatusEx_failed___d__n
mov ecx, 0x43b48c
call fcn.0040a090
add esp, 8
mov edx, dword [esp + 0x28]
push edx
push str.Service_controls_accepted_is__0x_x_
mov ecx, 0x43b48c
call fcn.0040a090
add esp, 8
cmp dword [esp + 0x24], 4
jne 0x4199e8
push str.CTDIInstaller::Start:Service_started_successfully._n
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.CTDIInstaller::Start:Service_not_started.__n
mov ecx, 0x43b48c
call fcn.0040a090
mov ecx, dword [esp + 0x28]
add esp, 4
push ecx
push str._CTDIInstaller::Start:_Current_State:__d_n
mov ecx, 0x43b48c
call fcn.0040a090
mov edx, dword [esp + 0x34]
push edx
push str.CTDIInstaller::Start:__Exit_Code:__d_n
mov ecx, 0x43b48c
call fcn.0040a090
mov eax, dword [esp + 0x44]
push eax
push str.CTDIInstaller::Start:__Check_Point:__d_n
mov ecx, 0x43b48c
call fcn.0040a090
mov ecx, dword [esp + 0x50]
push ecx
push str.CTDIInstaller::Start:__Wait_Hint:__d_n
mov ecx, 0x43b48c
call fcn.0040a090
add esp, 0x20
test edi, edi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
je 0x419a5a
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