Function at 0x1400a8bd0
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 [0x1402bf5c8]
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 0x1400a8c24
lea rcx, str.Error:_Failed_to_open_SCM._n
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
xor al, al
jmp 0x1400a8eb2
mov r8d, 0xf01ff
mov rdx, rbx
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov rbx, rax
test rax, rax
jne 0x1400a8c4e
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
xor al, al
jmp 0x1400a8eb2
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 0x1400a8e79
mov eax, dword [rsp + 0x3c]
mov r15d, 0x2710
cmp eax, 1
je 0x1400a8d35
cmp eax, 3
jne 0x1400a8e5a
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 0x1400a8cd7
mov edx, 0x3e8
jmp 0x1400a8cde
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 0x1400a8e79
cmp dword [rsp + 0x4c], edi
jbe 0x1400a8d1c
call qword [sym.imp.KERNEL32.dll_GetTickCount]
jmp 0x1400a8d2a
call qword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, esi
cmp eax, dword [rsp + 0x50]
ja 0x1400a8d6c
cmp dword [rsp + 0x3c], 3
je 0x1400a8cb0
xor r8d, r8d
xor edx, edx
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_StartServiceW]
test eax, eax
jne 0x1400a8d78
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 0x1400a8e80
lea rcx, str.Error:_Timeout_waiting_for_service_to_stop._n
jmp 0x1400a8e80
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 0x1400a8e79
call qword [sym.imp.KERNEL32.dll_GetTickCount]
cmp dword [rsp + 0x3c], 2
mov esi, eax
mov edi, dword [rsp + 0x4c]
jne 0x1400a8e46
nop word [rax + rax]
mov eax, 0xcccccccd
mul dword [rsp + 0x50]
shr edx, 3
cmp edx, 0x3e8
jae 0x1400a8ddb
mov edx, 0x3e8
jmp 0x1400a8de2
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 0x1400a8e39
cmp dword [rsp + 0x4c], edi
jbe 0x1400a8e22
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov edi, dword [rsp + 0x4c]
mov esi, eax
jmp 0x1400a8e30
call qword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, esi
cmp eax, dword [rsp + 0x50]
ja 0x1400a8e46
cmp dword [rsp + 0x3c], 2
je 0x1400a8dc0
jmp 0x1400a8e46
lea rcx, str.Error:_QueryServiceStatusEx_failed._n
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
cmp dword [rsp + 0x3c], 4
jne 0x1400a8e70
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 0x1400a8e9a
lea rcx, str.Warning:_Service_did_not_start_successfully._n
jmp 0x1400a8e80
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.1401a9a30
add rsp, 0x870
pop r14
pop rbx
pop rbp
ret