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

Disassembly:
mov qword [rsp + 0x18], rbx
mov qword [rsp + 0x20], rdi
push rbp
lea rbp, [rsp - 0x370]
sub rsp, 0x470
mov rax, qword [0x14025ab40]
xor rax, rsp
mov qword [rbp + 0x360], rax
mov rbx, rcx
lea rcx, str.__DoStartSvc__n
call fcn.140002620
lea rdi, [0x14026cc20]
mov r8d, 0x50
mov rdx, rdi
sub rbx, rdi
nop dword [rax]
lea rax, [r8 + 0x7fffffae]
test rax, rax
je 0x140002b23
movzx eax, word [rbx + rdx]
test ax, ax
je 0x140002b23
mov word [rdx], ax
add rdx, 2
dec r8
jne 0x140002b00
jmp 0x140002b28
test r8, r8
jne 0x140002b2c
sub rdx, 2
xor ebx, ebx
mov r8d, 0xf003f
xor ecx, ecx
mov word [rdx], bx
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov qword [0x14026cbf0], rax
test rax, rax
jne 0x140002b77
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, str.In_DoStartSvc_schSCManager_is_NULL_reason___d__r_n
lea rcx, [rsp + 0x60]
mov r8d, eax
call qword [sym.imp.USER32.dll_wsprintfW]
lea rcx, [rsp + 0x60]
call fcn.140002620
jmp 0x140002f1c
mov r8d, 0xf01ff
mov rdx, rdi
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov qword [0x14026cbe8], rax
test rax, rax
jne 0x140002bcc
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, str.In_DoStartSvc_schService_is_NULL_reason___d__r_n
lea rcx, [rsp + 0x60]
mov r8d, eax
call qword [sym.imp.USER32.dll_wsprintfW]
lea rcx, [rsp + 0x60]
call fcn.140002620
mov rcx, qword [0x14026cbf0]
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x140002f1c
lea rcx, [rsp + 0x30]
lea r8, [rsp + 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 0x140002c34
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, str.In_DoStartSvc_QueryServiceStatusEx_Failed_reason___d__r_n
lea rcx, [rsp + 0x60]
mov r8d, eax
call qword [sym.imp.USER32.dll_wsprintfW]
lea rcx, [rsp + 0x60]
call fcn.140002620
mov rcx, qword [0x14026cbe8]
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, qword [0x14026cbf0]
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x140002f1c
mov eax, dword [rsp + 0x3c]
dec eax
test eax, 0xfffffffd
je 0x140002c4a
lea rcx, str.Cannot_start_the_service_because_it_is_already_running_r_n
jmp 0x140002c10
mov qword [rsp + 0x480], rsi
mov qword [rsp + 0x488], r14
call qword [sym.imp.KERNEL32.dll_GetTickCount]
cmp dword [rsp + 0x3c], 3
mov edi, dword [rsp + 0x4c]
mov r14d, 0x2710
mov esi, eax
jne 0x140002d00
nop word [rax + rax]
mov eax, 0xcccccccd
mul dword [rsp + 0x50]
shr edx, 3
cmp edx, 0x3e8
jae 0x140002c9b
mov edx, 0x3e8
jmp 0x140002ca2
cmp edx, r14d
cmova edx, r14d
mov ecx, edx
call qword [sym.imp.KERNEL32.dll_Sleep]
mov rcx, qword [0x14026cbe8]
lea rax, [rsp + 0x30]
lea r8, [rsp + 0x38]
mov r9d, 0x24
xor edx, edx
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
test eax, eax
je 0x140002d6d
cmp dword [rsp + 0x4c], edi
jbe 0x140002cea
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov edi, dword [rsp + 0x4c]
mov esi, eax
jmp 0x140002cf8
call qword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, esi
cmp eax, dword [rsp + 0x50]
ja 0x140002d64
cmp dword [rsp + 0x3c], 3
je 0x140002c80
nop
mov rcx, qword [0x14026cbe8]
xor r8d, r8d
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_StartServiceW]
test eax, eax
jne 0x140002d7c
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, str.In_DoStartSvc_StartService_failed_reason___d__retry_count___d___r_n
lea rcx, [rsp + 0x60]
mov r8d, eax
mov r9d, ebx
call qword [sym.imp.USER32.dll_wsprintfW]
lea rcx, [rsp + 0x60]
call fcn.140002620
mov ecx, 0x3e8
call qword [sym.imp.KERNEL32.dll_Sleep]
inc ebx
cmp ebx, 5
jb 0x140002d00
lea rdx, str.In_DoStartSvc_StartService_failed_even_after_5_tries___r_n
lea rcx, [rsp + 0x60]
call qword [sym.imp.USER32.dll_wsprintfW]
jmp 0x140002dcb
lea rcx, str.In_DoStartSvc__Timeout_waiting_for_service_to_stop__r_n
jmp 0x140002dd0
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, str.In_DoStartSvc_QueryServiceStatusEx__2_Failed_reason___d__r_n
jmp 0x140002dbd
lea rcx, str.Service_start_pending..._r_n
call fcn.140002620
mov rcx, qword [0x14026cbe8]
lea rax, [rsp + 0x30]
lea r8, [rsp + 0x38]
mov r9d, 0x24
xor edx, edx
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
test eax, eax
jne 0x140002df4
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, str.In_DoStartSvc_QueryServiceStatusEx__3_failed_reason___d___r_n
lea rcx, [rsp + 0x60]
mov r8d, eax
call qword [sym.imp.USER32.dll_wsprintfW]
lea rcx, [rsp + 0x60]
call fcn.140002620
mov rcx, qword [0x14026cbe8]
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, qword [0x14026cbf0]
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x140002f0c
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov r8d, dword [rsp + 0x3c]
mov ebx, dword [rsp + 0x4c]
mov edi, eax
cmp r8d, 2
jne 0x140002ebb
nop
mov eax, 0xcccccccd
mul dword [rsp + 0x50]
shr edx, 3
cmp edx, 0x3e8
jae 0x140002e2b
mov edx, 0x3e8
jmp 0x140002e32
cmp edx, r14d
cmova edx, r14d
mov ecx, edx
call qword [sym.imp.KERNEL32.dll_Sleep]
mov rcx, qword [0x14026cbe8]
lea rax, [rsp + 0x30]
lea r8, [rsp + 0x38]
mov r9d, 0x24
xor edx, edx
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
test eax, eax
je 0x140002e91
cmp dword [rsp + 0x4c], ebx
jbe 0x140002e76
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov ebx, dword [rsp + 0x4c]
mov edi, eax
jmp 0x140002e84
call qword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, edi
cmp eax, dword [rsp + 0x50]
ja 0x140002eb6
mov r8d, dword [rsp + 0x3c]
cmp r8d, 2
je 0x140002e10
jmp 0x140002ebb
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, str.In_DoStartSvc_QueryServiceStatusEx__4_failed_reason___d___r_n
lea rcx, [rsp + 0x60]
mov r8d, eax
call qword [sym.imp.USER32.dll_wsprintfW]
lea rcx, [rsp + 0x60]
call fcn.140002620
mov r8d, dword [rsp + 0x3c]
cmp r8d, 4
jne 0x140002eca
lea rcx, str.Service_started_successfully._r_n
jmp 0x140002ee1
lea rdx, str.In_DoStartSvc_Service_not_started_Current_State:___d___r_n
lea rcx, [rsp + 0x60]
call qword [sym.imp.USER32.dll_wsprintfW]
lea rcx, [rsp + 0x60]
call fcn.140002620
mov rcx, qword [0x14026cbe8]
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, qword [0x14026cbf0]
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
lea rcx, str.__DoStartSvc__r_n
call fcn.140002620
mov rsi, qword [rsp + 0x480]
mov r14, qword [rsp + 0x488]
mov rcx, qword [rbp + 0x360]
xor rcx, rsp
call fcn.140190940
lea r11, [rsp + 0x470]
mov rbx, qword [r11 + 0x20]
mov rdi, qword [r11 + 0x28]
mov rsp, r11
pop rbp
ret