Function at 0x140034bc4
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 [0x1400592a0]
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.140019b1c
xor edx, edx
xor ecx, ecx
mov r8d, 0xf003f
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
nop dword [rax + rax]
mov r12, rax
test rax, rax
jne 0x140034c59
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
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.140019b1c
xor eax, eax
jmp 0x140034e34
mov r8d, 0xf01ff
mov rdx, rbx
mov rcx, r12
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
nop dword [rax + rax]
mov rbp, rax
test rax, rax
jne 0x140034cb3
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
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.140019b1c
mov rcx, r12
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
nop dword [rax + rax]
jmp 0x140034c52
xor r8d, r8d
xor edx, edx
mov rcx, rbp
call qword [sym.imp.ADVAPI32.dll_StartServiceW]
nop dword [rax + rax]
test eax, eax
jne 0x140034d1c
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
test eax, eax
mov edi, eax
mov ecx, 0x57
cmove edi, ecx
mov rcx, rbp
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
nop dword [rax + rax]
mov rcx, r12
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
nop dword [rax + rax]
cmp edi, 0x420
je 0x140034e32
mov r9d, edi
lea rdx, str.ERROR:_Failed_to_start_service:__S.__Result:_0x_x._r_n
jmp 0x140034c45
lea rdx, [rsp + 0x20]
mov rcx, rbp
xor r14d, r14d
mov r15d, 0x927c0
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
nop dword [rax + rax]
test eax, eax
jne 0x140034d49
lea rdx, str.ERROR:__S__1_queryservicestatus_r_n
jmp 0x140034ddd
mov ecx, dword [rsp + 0x24]
cmp ecx, 4
je 0x140034dec
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 0x140034db5
cmp ecx, 4
je 0x140034db5
mov ecx, edx
call qword [sym.imp.KERNEL32.dll_Sleep]
nop dword [rax + rax]
lea rdx, [rsp + 0x20]
mov rcx, rbp
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
nop dword [rax + rax]
test eax, eax
je 0x140034dcd
mov ecx, dword [rsp + 0x24]
mov edx, 0x1f4
sub edi, edx
add r14d, edx
jmp 0x140034d76
cmp r14d, r15d
jg 0x140034dd6
cmp ecx, 4
je 0x140034dec
cmp r13d, dword [rsp + 0x34]
je 0x140034dd6
cmp ecx, 4
je 0x140034dec
jmp 0x140034d5b
lea rdx, str.ERROR:__S__2_queryservicestatus_r_n
jmp 0x140034ddd
lea rdx, str.ERROR:__S__timed_out_r_n
mov r8, rbx
mov ecx, 2
call fcn.140019b1c
xor esi, esi
mov rcx, rbp
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
nop dword [rax + rax]
mov rcx, r12
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
nop dword [rax + rax]
test esi, esi
lea rax, str.failed
lea r9, str.succeeded
mov r8, rbx
cmove r9, rax
lea rdx, str.Starting_service__S__S._r_n
mov ecx, 4
call fcn.140019b1c
mov eax, esi
mov rcx, qword [rsp + 0x40]
xor rcx, rsp
call fcn.1400017f0
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