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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x58
mov eax, dword [0x10030034]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ecx]
mov edx, dword [ebp + 8]
push ebx
push esi
push edi
mov dword [ebp - 0x4c], edx
test eax, eax
jne 0x10001422
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1001b732
mov esp, ebp
pop ebp
ret 4
push 0x24
xor edi, edi
push edx
push eax
mov dword [ebp - 0x48], edi
lea esi, [edi + 0x10]
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov ebx, eax
test ebx, ebx
jne 0x10001458
call dword [sym.imp.KERNEL32.dll_GetLastError]
push dword [ebp - 0x4c]
mov edi, eax
push edi
push str.Failed_to_call_OpenService__Error___d__lpszDriverName___s.
call fcn.10019db0
add esp, 0xc
jmp 0x100015e5
lea eax, [ebp - 0x58]
push eax
push 0x24
lea eax, [ebp - 0x28]
push eax
push 0
push ebx
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
test eax, eax
jne 0x1000148e
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Failed_to_call_QueryServiceStatusEx__Error___d.
mov dword [ebp - 0x48], eax
call fcn.10019db0
add esp, 8
or esi, 0xffffffff
jmp 0x1000153e
mov eax, dword [ebp - 0x24]
cmp eax, 2
je 0x1000149f
cmp eax, 4
jne 0x10001533
mov esi, dword [sym.imp.KERNEL32.dll_GetTickCount]
call esi
mov dword [ebp - 0x50], eax
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x54], eax
mov eax, dword [ebp - 0x24]
cmp eax, 2
jne 0x10001533
mov ecx, 0x2710
lea ecx, [ecx]
mov eax, 0xcccccccd
mul dword [ebp - 0x10]
shr edx, 3
cmp edx, 0x3e8
jae 0x100014da
mov edx, 0x3e8
jmp 0x100014e3
cmp edx, 0x2710
cmova edx, ecx
push edx
call dword [sym.imp.KERNEL32.dll_Sleep]
lea eax, [ebp - 0x58]
push eax
push 0x24
lea eax, [ebp - 0x28]
push eax
push 0
push ebx
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
test eax, eax
je 0x10001593
mov eax, dword [ebp - 0x54]
cmp dword [ebp - 0x14], eax
jbe 0x1000151a
call esi
mov ecx, dword [ebp - 0x14]
mov dword [ebp - 0x50], eax
mov dword [ebp - 0x54], ecx
jmp 0x10001526
call esi
sub eax, dword [ebp - 0x50]
cmp eax, 0xbb8
ja 0x1000157c
mov eax, dword [ebp - 0x24]
mov ecx, 0x2710
cmp eax, 2
je 0x100014c0
mov esi, eax
cmp eax, 1
je 0x100015de
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
lea eax, [ebp - 0x44]
push eax
push 1
push ebx
call dword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
jne 0x100015bf
call edi
push dword [ebp - 0x4c]
mov edi, eax
push edi
push str.Failed_to_call_ControlService__Error___d__lpszDriverName___s.
mov dword [ebp - 0x48], edi
call fcn.10019db0
add esp, 0xc
cmp edi, 0x426
jne 0x100015b1
mov esi, 1
jmp 0x100015de
push str.start
push str.Timeout_waiting_for_service_to__s.
call fcn.10019db0
add esp, 8
or esi, 0xffffffff
jmp 0x1000153e
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
call edi
push eax
push str.Failed_to_call_QueryServiceStatusEx__Error___d.
mov dword [ebp - 0x48], eax
call fcn.10019db0
add esp, 8
or esi, 0xffffffff
jmp 0x10001544
cmp edi, 0x425
jne 0x100015de
cmp dword [ebp - 0x40], 3
jne 0x100015de
lea eax, [ebp - 0x48]
push eax
push 0xbb8
push 1
mov edx, 3
mov ecx, ebx
call fcn.100010a0
mov edi, dword [ebp - 0x48]
add esp, 0xc
mov esi, eax
push ebx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push edi
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov ecx, dword [ebp - 4]
xor eax, eax
cmp esi, 1
pop edi
sete al
pop esi
xor ecx, ebp
pop ebx
call fcn.1001b732
mov esp, ebp
pop ebp
ret 4