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

Disassembly:
push rbp
push rbx
push rsi
mov rbp, rsp
sub rsp, 0x70
mov rax, qword [0x1400ce110]
xor rax, rsp
mov qword [rbp - 0x10], rax
mov rbx, rcx
xor edx, edx
mov r8d, 0xf003f
xor ecx, ecx
xor sil, sil
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov qword [0x1400d1898], rax
test rax, rax
je 0x14000aeab
mov r8d, 0xf01ff
mov rdx, rbx
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov qword [0x1400d18a0], rax
test rax, rax
jne 0x14000aeb2
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.OpenService_failed___d__n
mov edx, eax
call qword [sym.imp.MSVCR120.dll_printf]
mov rcx, qword [0x1400d1898]
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
xor al, al
jmp 0x14000b19e
lea rcx, [rbp - 0x40]
lea r8, [rbp - 0x38]
mov r9d, 0x24
mov qword [rsp + 0x20], rcx
mov rcx, rax
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
test eax, eax
jne 0x14000af0a
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.QueryServiceStatusEx_failed___d__n
mov edx, eax
call qword [sym.imp.MSVCR120.dll_printf]
mov rcx, qword [0x1400d18a0]
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, qword [0x1400d1898]
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
xor al, al
jmp 0x14000b19e
mov eax, dword [rbp - 0x34]
mov qword [rsp + 0x98], rdi
mov qword [rsp + 0xa0], r14
dec eax
test eax, 0xfffffffd
je 0x14000af50
lea rcx, str.Cannot_start_the_service_because_it_is_already_running_n
call qword [sym.imp.MSVCR120.dll_printf]
mov rcx, qword [0x1400d18a0]
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, qword [0x1400d1898]
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov sil, 1
call qword [sym.imp.KERNEL32.dll_GetTickCount]
cmp dword [rbp - 0x34], 3
mov ebx, dword [rbp - 0x24]
mov edi, eax
mov r14d, 0x2710
jne 0x14000afe4
nop word [rax + rax]
mov eax, 0xcccccccd
mul dword [rbp - 0x20]
shr edx, 3
cmp edx, 0x3e8
jae 0x14000af8a
mov edx, 0x3e8
jmp 0x14000af91
cmp edx, r14d
cmova edx, r14d
mov ecx, edx
call qword [sym.imp.KERNEL32.dll_Sleep]
mov rcx, qword [0x1400d18a0]
lea rax, [rbp - 0x40]
lea r8, [rbp - 0x38]
mov r9d, 0x24
xor edx, edx
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
test eax, eax
je 0x14000b020
cmp dword [rbp - 0x24], ebx
jbe 0x14000afd1
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov ebx, dword [rbp - 0x24]
mov edi, eax
jmp 0x14000afde
call qword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, edi
cmp eax, dword [rbp - 0x20]
ja 0x14000b00e
cmp dword [rbp - 0x34], 3
je 0x14000af70
mov rcx, qword [0x1400d18a0]
xor r8d, r8d
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_StartServiceW]
test eax, eax
jne 0x14000b034
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.StartService_failed___d__n
mov edx, eax
jmp 0x14000b16a
lea rcx, str.Timeout_waiting_for_service_to_stop_n
call qword [sym.imp.MSVCR120.dll_printf]
jmp 0x14000b170
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.QueryServiceStatusEx_failed___d__n
mov edx, eax
jmp 0x14000b16a
lea rcx, str.Service_start_pending..._n
call qword [sym.imp.MSVCR120.dll_printf]
mov rcx, qword [0x1400d18a0]
lea rax, [rbp - 0x40]
lea r8, [rbp - 0x38]
mov r9d, 0x24
xor edx, edx
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
test eax, eax
je 0x14000b020
call qword [sym.imp.KERNEL32.dll_GetTickCount]
cmp dword [rbp - 0x34], 2
mov ebx, dword [rbp - 0x24]
mov edi, eax
jne 0x14000b10b
nop dword [rax]
mov eax, 0xcccccccd
mul dword [rbp - 0x20]
shr edx, 3
cmp edx, 0x3e8
jae 0x14000b09a
mov edx, 0x3e8
jmp 0x14000b0a1
cmp edx, r14d
cmova edx, r14d
mov ecx, edx
call qword [sym.imp.KERNEL32.dll_Sleep]
mov rcx, qword [0x1400d18a0]
lea rax, [rbp - 0x40]
lea r8, [rbp - 0x38]
mov r9d, 0x24
xor edx, edx
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
test eax, eax
je 0x14000b0f6
cmp dword [rbp - 0x24], ebx
jbe 0x14000b0e1
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov ebx, dword [rbp - 0x24]
mov edi, eax
jmp 0x14000b0ee
call qword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, edi
cmp eax, dword [rbp - 0x20]
ja 0x14000b10b
cmp dword [rbp - 0x34], 2
je 0x14000b080
jmp 0x14000b10b
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.QueryServiceStatusEx_failed___d__n
mov edx, eax
call qword [sym.imp.MSVCR120.dll_printf]
cmp dword [rbp - 0x34], 4
jne 0x14000b123
lea rcx, str.Service_started_successfully._n
mov sil, 1
call qword [sym.imp.MSVCR120.dll_printf]
jmp 0x14000b170
lea rcx, str.Service_not_started.__n
call qword [sym.imp.MSVCR120.dll_printf]
mov edx, dword [rbp - 0x34]
lea rcx, str.__Current_State:__d_n
call qword [sym.imp.MSVCR120.dll_printf]
mov edx, dword [rbp - 0x2c]
lea rcx, str.__Exit_Code:__d_n
call qword [sym.imp.MSVCR120.dll_printf]
mov edx, dword [rbp - 0x24]
lea rcx, str.__Check_Point:__d_n
call qword [sym.imp.MSVCR120.dll_printf]
mov edx, dword [rbp - 0x20]
lea rcx, str.__Wait_Hint:__d_n
call qword [sym.imp.MSVCR120.dll_printf]
mov rcx, qword [0x1400d18a0]
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, qword [0x1400d1898]
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rdi, qword [rsp + 0x98]
mov r14, qword [rsp + 0xa0]
movzx eax, sil
mov rcx, qword [rbp - 0x10]
xor rcx, rsp
call fcn.14000bf30
add rsp, 0x70
pop rsi
pop rbx
pop rbp
ret