Function at 0x140002774
Capabilities:
Query service status
Start service

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rdi
sub rsp, 0x50
mov rax, qword [0x140017230]
xor rax, rsp
mov qword [rsp + 0x40], rax
xor edx, edx
xor ecx, ecx
lea r8d, [rdx + 1]
call qword [sym.imp.api_ms_win_service_management_l1_1_0.dll_OpenSCManagerW]
mov rdi, rax
test rax, rax
jne 0x1400027c1
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
movzx esi, ax
or esi, 0x80070000
test eax, eax
cmovle esi, eax
jmp 0x14000284e
mov r8d, 0x14
lea rdx, str.DiagnosticsHub.StandardCollector.Service
mov rcx, rdi
call qword [sym.imp.api_ms_win_service_management_l1_1_0.dll_OpenServiceW]
mov rbx, rax
test rax, rax
je 0x14000280a
lea rdx, [rsp + 0x20]
mov rcx, rax
call qword [sym.imp.api_ms_win_service_winsvc_l1_1_0.dll_QueryServiceStatus]
test eax, eax
je 0x14000280a
cmp dword [rsp + 0x24], 1
jne 0x140002829
xor r8d, r8d
xor edx, edx
mov rcx, rbx
call qword [sym.imp.api_ms_win_service_management_l1_1_0.dll_StartServiceW]
test eax, eax
jne 0x140002820
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
movzx esi, ax
or esi, 0x80070000
test eax, eax
cmovle esi, eax
jmp 0x140002837
lea rcx, str.SUCCESS:_The_service_was_started_successfully_n
jmp 0x140002830
lea rcx, str.WARNING:_The_service_is_already_started_n
call fcn.14000d520
xor esi, esi
test rbx, rbx
je 0x140002845
mov rcx, rbx
call qword [sym.imp.api_ms_win_service_management_l1_1_0.dll_CloseServiceHandle]
mov rcx, rdi
call qword [sym.imp.api_ms_win_service_management_l1_1_0.dll_CloseServiceHandle]
mov eax, esi
mov rcx, qword [rsp + 0x40]
xor rcx, rsp
call fcn.14000c640
mov rbx, qword [rsp + 0x60]
mov rsi, qword [rsp + 0x68]
add rsp, 0x50
pop rdi
ret
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rdi
sub rsp, 0x50
mov rax, qword [0x140017230]
xor rax, rsp
mov qword [rsp + 0x40], rax
mov esi, 1
xor edx, edx
mov r8d, esi
xor ecx, ecx
call qword [sym.imp.api_ms_win_service_management_l1_1_0.dll_OpenSCManagerW]
mov rdi, rax
test rax, rax
jne 0x1400028c5
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
movzx esi, ax
or esi, 0x80070000
test eax, eax
cmovle esi, eax
jmp 0x140002953
mov r8d, 0x24
lea rdx, str.DiagnosticsHub.StandardCollector.Service
mov rcx, rdi
call qword [sym.imp.api_ms_win_service_management_l1_1_0.dll_OpenServiceW]
mov rbx, rax
test rax, rax
je 0x14000290f
lea rdx, [rsp + 0x20]
mov rcx, rax
call qword [sym.imp.api_ms_win_service_winsvc_l1_1_0.dll_QueryServiceStatus]
test eax, eax
je 0x14000290f
cmp dword [rsp + 0x24], esi
je 0x14000292e
lea r8, [rsp + 0x20]
mov edx, esi
mov rcx, rbx
call qword [sym.imp.api_ms_win_service_winsvc_l1_1_0.dll_ControlService]
test eax, eax
jne 0x140002925
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
movzx esi, ax
or esi, 0x80070000
test eax, eax
cmovle esi, eax
jmp 0x14000293c
lea rcx, str.SUCCESS:_The_service_was_stopped_successfully_n
jmp 0x140002935
lea rcx, str.WARNING:_The_service_is_already_stopped_n
call fcn.14000d520
xor esi, esi
test rbx, rbx
je 0x14000294a
mov rcx, rbx
call qword [sym.imp.api_ms_win_service_management_l1_1_0.dll_CloseServiceHandle]
mov rcx, rdi
call qword [sym.imp.api_ms_win_service_management_l1_1_0.dll_CloseServiceHandle]
mov eax, esi
mov rcx, qword [rsp + 0x40]
xor rcx, rsp
call fcn.14000c640
mov rbx, qword [rsp + 0x60]
mov rsi, qword [rsp + 0x68]
add rsp, 0x50
pop rdi
ret
sub rsp, 0x48
cmp r8d, 4
jle 0x140002fdb
cmp r8d, 6
jle 0x140002f76
cmp r8d, 8
jle 0x140002fdb
or eax, 0xffffffff
add rsp, 0x48
ret
cmp dword [rdx], 5
jne 0x140002fcf
and qword [rsp + 0x30], 0
lea rax, str.DiagnosticsHub.StandardCollector.Service
and qword [rsp + 0x38], 0
lea rcx, [rsp + 0x20]
mov qword [rsp + 0x20], rax
lea rax, [0x140003060]
mov qword [rsp + 0x28], rax
call qword [sym.imp.api_ms_win_service_core_l1_1_0.dll_StartServiceCtrlDispatcherW]
test eax, eax
jne 0x140002fd4
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov ecx, eax
cmp eax, 0x420
je 0x140002fd4
movzx eax, cx
or eax, 0x80070000
test ecx, ecx
cmovle eax, ecx
add rsp, 0x48
ret
call fcn.1400030d4
xor eax, eax
add rsp, 0x48
ret
mov ecx, dword [rdx]
sub ecx, 3
je 0x140002ffa
cmp ecx, 1
je 0x140002ff1
mov eax, 0x8000ffff
add rsp, 0x48
ret
add rsp, 0x48
jmp 0x140002874
add rsp, 0x48
jmp 0x140002774