Function at 0x1400a8500
Capabilities:
Check for time delay via gettickcount
Print debug messages
Query service status
Start service

Disassembly:
push rbp
push rbx
push r14
lea rbp, [rsp - 0x770]
sub rsp, 0x870
mov rax, qword [0x1402be5c8]
xor rax, rsp
mov qword [rbp + 0x760], rax
mov rbx, rcx
xor edx, edx
xor ecx, ecx
mov r8d, 0xf003f
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov r14, rax
test rax, rax
jne 0x1400a8554
lea rcx, str.Error:_Failed_to_open_SCM._n
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
xor al, al
jmp 0x1400a87e2
mov r8d, 0xf01ff
mov rdx, rbx
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov rbx, rax
test rax, rax
jne 0x1400a857e
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
xor al, al
jmp 0x1400a87e2
mov qword [rsp + 0x898], rsi
lea rax, [rsp + 0x30]
mov qword [rsp + 0x8a0], rdi
lea r8, [rsp + 0x38]
mov r9d, 0x24
mov qword [rsp + 0x8a8], r15
xor edx, edx
mov qword [rsp + 0x20], rax
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
test eax, eax
je 0x1400a87a9
mov eax, dword [rsp + 0x3c]
mov r15d, 0x2710
cmp eax, 1
je 0x1400a8665
cmp eax, 3
jne 0x1400a878a
nop word [rax + rax]
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov edi, dword [rsp + 0x4c]
mov esi, eax
mov eax, 0xcccccccd
mul dword [rsp + 0x50]
shr edx, 3
cmp edx, 0x3e8
jae 0x1400a8607
mov edx, 0x3e8
jmp 0x1400a860e
cmp edx, r15d
cmova edx, r15d
mov ecx, edx
call qword [sym.imp.KERNEL32.dll_Sleep]
lea rax, [rsp + 0x30]
mov r9d, 0x24
lea r8, [rsp + 0x38]
mov qword [rsp + 0x20], rax
xor edx, edx
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
test eax, eax
je 0x1400a87a9
cmp dword [rsp + 0x4c], edi
jbe 0x1400a864c
call qword [sym.imp.KERNEL32.dll_GetTickCount]
jmp 0x1400a865a
call qword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, esi
cmp eax, dword [rsp + 0x50]
ja 0x1400a869c
cmp dword [rsp + 0x3c], 3
je 0x1400a85e0
xor r8d, r8d
xor edx, edx
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_StartServiceW]
test eax, eax
jne 0x1400a86a8
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, str.Unable_to_start_service_and_Error_code_is__d
lea rcx, [rsp + 0x60]
call qword [sym.imp.USER32.dll_wsprintfW]
lea rcx, [rsp + 0x60]
jmp 0x1400a87b0
lea rcx, str.Error:_Timeout_waiting_for_service_to_stop._n
jmp 0x1400a87b0
lea rax, [rsp + 0x30]
mov r9d, 0x24
lea r8, [rsp + 0x38]
mov qword [rsp + 0x20], rax
xor edx, edx
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
test eax, eax
je 0x1400a87a9
call qword [sym.imp.KERNEL32.dll_GetTickCount]
cmp dword [rsp + 0x3c], 2
mov esi, eax
mov edi, dword [rsp + 0x4c]
jne 0x1400a8776
nop word [rax + rax]
mov eax, 0xcccccccd
mul dword [rsp + 0x50]
shr edx, 3
cmp edx, 0x3e8
jae 0x1400a870b
mov edx, 0x3e8
jmp 0x1400a8712
cmp edx, r15d
cmova edx, r15d
mov ecx, edx
call qword [sym.imp.KERNEL32.dll_Sleep]
lea rax, [rsp + 0x30]
mov r9d, 0x24
lea r8, [rsp + 0x38]
mov qword [rsp + 0x20], rax
xor edx, edx
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
test eax, eax
je 0x1400a8769
cmp dword [rsp + 0x4c], edi
jbe 0x1400a8752
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov edi, dword [rsp + 0x4c]
mov esi, eax
jmp 0x1400a8760
call qword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, esi
cmp eax, dword [rsp + 0x50]
ja 0x1400a8776
cmp dword [rsp + 0x3c], 2
je 0x1400a86f0
jmp 0x1400a8776
lea rcx, str.Error:_QueryServiceStatusEx_failed._n
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
cmp dword [rsp + 0x3c], 4
jne 0x1400a87a0
lea rcx, str.Service_started_successfully._n
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov al, 1
jmp 0x1400a87ca
lea rcx, str.Warning:_Service_did_not_start_successfully._n
jmp 0x1400a87b0
lea rcx, str.Error:_QueryServiceStatusEx_failed._n
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
xor al, al
mov rdi, qword [rsp + 0x8a0]
mov rsi, qword [rsp + 0x898]
mov r15, qword [rsp + 0x8a8]
mov rcx, qword [rbp + 0x760]
xor rcx, rsp
call fcn.1401a9440
add rsp, 0x870
pop r14
pop rbx
pop rbp
ret