Function at 0x14000217c
Capabilities:
Query service status

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rdi
sub rsp, 0x50
mov rax, qword [0x140014238]
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 0x1400020cd
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 0x14000215a
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 0x140002116
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 0x140002116
cmp dword [rsp + 0x24], 1
jne 0x140002135
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 0x14000212c
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 0x140002143
lea rcx, str.SUCCESS:_The_service_was_started_successfully_n
jmp 0x14000213c
lea rcx, str.WARNING:_The_service_is_already_started_n
call fcn.14000ba50
xor esi, esi
test rbx, rbx
je 0x140002151
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.14000a920
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 [0x140014238]
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 0x1400021cd
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 0x14000225b
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 0x140002217
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 0x140002217
cmp dword [rsp + 0x24], esi
je 0x140002236
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 0x14000222d
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 0x140002244
lea rcx, str.SUCCESS:_The_service_was_stopped_successfully_n
jmp 0x14000223d
lea rcx, str.WARNING:_The_service_is_already_stopped_n
call fcn.14000ba50
xor esi, esi
test rbx, rbx
je 0x140002252
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.14000a920
mov rbx, qword [rsp + 0x60]
mov rsi, qword [rsp + 0x68]
add rsp, 0x50
pop rdi
ret
sub rsp, 0x48
cmp r8d, 4
jle 0x1400027db
cmp r8d, 6
jle 0x140002776
cmp r8d, 8
jle 0x1400027db
or eax, 0xffffffff
add rsp, 0x48
ret
cmp dword [rdx], 5
jne 0x1400027cf
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, [0x140002850]
mov qword [rsp + 0x28], rax
call qword [sym.imp.api_ms_win_service_core_l1_1_0.dll_StartServiceCtrlDispatcherW]
test eax, eax
jne 0x1400027d4
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov ecx, eax
cmp eax, 0x420
je 0x1400027d4
movzx eax, cx
or eax, 0x80070000
test ecx, ecx
cmovle eax, ecx
add rsp, 0x48
ret
call fcn.1400028b4
xor eax, eax
add rsp, 0x48
ret
mov ecx, dword [rdx]
sub ecx, 3
je 0x1400027fa
cmp ecx, 1
je 0x1400027f1
mov eax, 0x8000ffff
add rsp, 0x48
ret
add rsp, 0x48
jmp 0x14000217c
add rsp, 0x48
jmp 0x140002080