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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x101432d6
mov eax, dword fs:[0]
push eax
sub esp, 0x180
mov eax, dword [0x1019a128]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
lea ecx, [ebp - 0x14]
push ecx
push 0x24
lea ecx, [ebp - 0x38]
mov dword [ebp - 0x3c], eax
push ecx
push 0
push eax
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
test eax, eax
jne 0x10066545
push str.ServiceManager::WaitToStartService
lea edx, [eax + 4]
lea ecx, [ebp - 0xe4]
call fcn.1000aed0
add esp, 4
mov esi, eax
mov dword [ebp - 4], 0
cmp byte [esi + 0x48], 0
je 0x1006651c
mov edx, str.QueryServiceStatusEx_err
mov ecx, esi
call fcn.100205a0
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp byte [esi + 0x48], 0
je 0x10066530
push eax
mov ecx, esi
call fcn.100201d0
lea ecx, [ebp - 0xe4]
call fcn.1000ad70
mov eax, 0x42a
jmp 0x1006670b
mov esi, dword [sym.imp.KERNEL32.dll_GetTickCount]
call esi
cmp dword [ebp - 0x34], 2
mov ebx, eax
mov edi, dword [ebp - 0x24]
jne 0x10066621
mov ecx, 0x2710
mov eax, 0xcccccccd
mul dword [ebp - 0x20]
shr edx, 3
cmp edx, 0x3e8
jae 0x1006657b
mov edx, 0x3e8
jmp 0x10066584
cmp edx, 0x2710
cmova edx, ecx
push edx
call dword [sym.imp.KERNEL32.dll_Sleep]
lea eax, [ebp - 0x14]
push eax
push 0x24
lea eax, [ebp - 0x38]
push eax
push 0
push dword [ebp - 0x3c]
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
test eax, eax
je 0x100665c8
cmp dword [ebp - 0x24], edi
jbe 0x100665b2
call esi
mov edi, dword [ebp - 0x24]
mov ebx, eax
jmp 0x100665bb
call esi
sub eax, ebx
cmp eax, dword [ebp - 0x20]
ja 0x10066621
cmp dword [ebp - 0x34], 2
mov ecx, 0x2710
je 0x10066561
jmp 0x10066621
push str.ServiceManager::WaitToStartService
mov edx, 4
lea ecx, [ebp - 0xe4]
call fcn.1000aed0
add esp, 4
mov esi, eax
mov dword [ebp - 4], 1
cmp byte [esi + 0x48], 0
je 0x100665fb
mov edx, str.QueryServiceStatusEx_err
mov ecx, esi
call fcn.100205a0
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp byte [esi + 0x48], 0
je 0x1006660f
push eax
mov ecx, esi
call fcn.100201d0
lea ecx, [ebp - 0xe4]
mov dword [ebp - 4], 0xffffffff
call fcn.1000ad70
cmp dword [ebp - 0x34], 4
mov edi, 0x42a
jne 0x10066633
xor edi, edi
jmp 0x10066709
push str.ServiceManager::WaitToStartService
mov edx, 0x10
lea ecx, [ebp - 0x18c]
call fcn.1000aed0
add esp, 4
mov esi, eax
mov dword [ebp - 4], 2
mov al, byte [esi + 0x48]
test al, al
je 0x100666fe
mov edx, str.Service_not_started.
mov ecx, esi
call fcn.100205a0
mov al, byte [esi + 0x48]
test al, al
je 0x100666fe
mov edx, str._Current_State
mov ecx, esi
call fcn.100205a0
mov al, byte [esi + 0x48]
test al, al
je 0x100666fe
push dword [ebp - 0x34]
mov ecx, esi
call fcn.100201d0
mov al, byte [esi + 0x48]
test al, al
je 0x100666fe
mov edx, str.__Exit_Code
mov ecx, esi
call fcn.100205a0
mov al, byte [esi + 0x48]
test al, al
je 0x100666fe
push dword [ebp - 0x2c]
mov ecx, esi
call fcn.100201d0
mov al, byte [esi + 0x48]
test al, al
je 0x100666fe
mov edx, str.__Check_Point
mov ecx, esi
call fcn.100205a0
mov al, byte [esi + 0x48]
test al, al
je 0x100666fe
push dword [ebp - 0x24]
mov ecx, esi
call fcn.100201d0
mov al, byte [esi + 0x48]
test al, al
je 0x100666fe
mov edx, str.__Wait_Hint
mov ecx, esi
call fcn.100205a0
cmp byte [esi + 0x48], 0
je 0x100666fe
push dword [ebp - 0x20]
mov ecx, esi
call fcn.100201d0
lea ecx, [ebp - 0x18c]
call fcn.1000ad70
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.101157bc
mov esp, ebp
pop ebp
ret 8