Function at 0x14002ca2c
Capabilities:
Query service status
Start service

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x18], rbp
mov qword [rsp + 0x20], rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x50
mov rax, qword [0x1400502a8]
xor rax, rsp
mov qword [rsp + 0x40], rax
mov rbx, rdx
mov r8, rdx
mov esi, 1
lea rdx, str.Now_starting_service:__S._r_n
lea ecx, [rsi + 3]
call fcn.140016868
xor edx, edx
xor ecx, ecx
mov r8d, 0xf003f
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov r12, rax
test rax, rax
jne 0x14002cab5
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
lea ecx, [rsi + 0x56]
lea rdx, str.ERROR:_Failed_to_open_SCM:__S.__Result:_0x_x._r_n
cmove eax, ecx
mov r9d, eax
mov r8, rbx
mov ecx, 2
call fcn.140016868
xor eax, eax
jmp 0x14002cc48
mov r8d, 0xf01ff
mov rdx, rbx
mov rcx, r12
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov rbp, rax
test rax, rax
jne 0x14002cafd
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [rbp + 0x57]
mov r8, rbx
test eax, eax
lea rdx, str.ERROR:_Failed_to_open_service:__S.__Result:_0x_x._r_n
cmove eax, ecx
lea ecx, [rbp + 2]
mov r9d, eax
call fcn.140016868
mov rcx, r12
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x14002caae
xor r8d, r8d
xor edx, edx
mov rcx, rbp
call qword [sym.imp.ADVAPI32.dll_StartServiceW]
test eax, eax
jne 0x14002cb4e
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
mov edi, eax
mov ecx, 0x57
cmove edi, ecx
mov rcx, rbp
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, r12
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
cmp edi, 0x420
je 0x14002cc46
mov r9d, edi
lea rdx, str.ERROR:_Failed_to_start_service:__S.__Result:_0x_x._r_n
jmp 0x14002caa1
lea rdx, [rsp + 0x20]
mov rcx, rbp
xor r14d, r14d
mov r15d, 0x927c0
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
jne 0x14002cb75
lea rdx, str.ERROR:__S__1_queryservicestatus_r_n
jmp 0x14002cbfd
mov ecx, dword [rsp + 0x24]
cmp ecx, 4
je 0x14002cc0c
mov edx, 0x1f4
mov edi, dword [rsp + 0x38]
mov r13d, dword [rsp + 0x34]
add edi, 0x7530
cmp edi, r15d
mov eax, edi
cmovle eax, r15d
mov r15d, eax
test edi, edi
jle 0x14002cbd5
cmp ecx, 4
je 0x14002cbd5
mov ecx, edx
call qword [sym.imp.KERNEL32.dll_Sleep]
lea rdx, [rsp + 0x20]
mov rcx, rbp
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
je 0x14002cbed
mov ecx, dword [rsp + 0x24]
mov edx, 0x1f4
sub edi, edx
add r14d, edx
jmp 0x14002cba2
cmp r14d, r15d
jg 0x14002cbf6
cmp ecx, 4
je 0x14002cc0c
cmp r13d, dword [rsp + 0x34]
je 0x14002cbf6
cmp ecx, 4
je 0x14002cc0c
jmp 0x14002cb87
lea rdx, str.ERROR:__S__2_queryservicestatus_r_n
jmp 0x14002cbfd
lea rdx, str.ERROR:__S__timed_out_r_n
mov r8, rbx
mov ecx, 2
call fcn.140016868
xor esi, esi
mov rcx, rbp
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, r12
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
test esi, esi
lea rax, str.succeeded
lea r9, str.failed
mov r8, rbx
cmovne r9, rax
lea rdx, str.Starting_service__S__S._r_n
mov ecx, 4
call fcn.140016868
mov eax, esi
mov rcx, qword [rsp + 0x40]
xor rcx, rsp
call fcn.14003c6c0
lea r11, [rsp + 0x50]
mov rbx, qword [r11 + 0x30]
mov rbp, qword [r11 + 0x40]
mov rsi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rdi
ret