Function at 0x1400170f0
Capabilities:
Query service status
Stop service

Disassembly:
mov qword [rsp + 0x20], rbx
push rbp
push rsi
push rdi
push r12
push r15
sub rsp, 0x50
mov rax, qword [0x14016b140]
xor rax, rsp
mov qword [rsp + 0x40], rax
lea rcx, str.KXSVC::StopService_n
mov qword [rsp + 0x80], r14
mov r15, r8
mov r12, rdx
call fcn.1400213c0
xor ebx, ebx
xor edx, edx
mov r8d, 0xf003f
mov rcx, r12
mov esi, ebx
mov edi, ebx
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov r14, rax
test rax, rax
je 0x1400171ac
mov r8d, 0xf01ff
mov rdx, r15
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov rbp, rax
test rax, rax
je 0x14001718b
lea rdx, [rsp + 0x20]
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
mov rcx, rbp
cmovne esi, dword [rsp + 0x24]
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x1400171c2
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.KXSVC::GetServiceStatus___OpenService_error___d_n
mov edi, eax
call fcn.140021160
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x1400171c2
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.KXSVC::GetServiceStatus___OpenSCManager_error___d_n
mov edi, eax
call fcn.140021160
mov ecx, edi
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov r14, qword [rsp + 0x80]
cmp esi, 4
jne 0x1400172f1
lea rcx, str.KXSVC::ControlService_n
call fcn.1400213c0
xor edx, edx
mov r8d, 0xf003f
mov rcx, r12
xor bpl, bpl
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov rsi, rax
test rax, rax
je 0x1400172cd
mov r8d, 0xf01ff
mov rdx, r15
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov rdi, rax
test rax, rax
je 0x1400172a0
lea r8, [rsp + 0x20]
mov edx, 1
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
je 0x14001726a
lea rcx, str.KXSVC::ControlService___Control_service_success_n
call fcn.1400213c0
mov rcx, rdi
mov bpl, 1
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_SetLastError]
movzx eax, bpl
jmp 0x1400172f3
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.KXSVC::ControlService___ControlService_error___d_n
mov ebx, eax
call fcn.140021160
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_SetLastError]
movzx eax, bpl
jmp 0x1400172f3
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.KXSVC::ControlService___OpenService_error___d_n
mov ebx, eax
call fcn.140021160
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_SetLastError]
movzx eax, bpl
jmp 0x1400172f3
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.KXSVC::ControlService___OpenSCManager_error___d_n
mov ebx, eax
call fcn.140021160
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_SetLastError]
movzx eax, bpl
jmp 0x1400172f3
xor al, al
mov rcx, qword [rsp + 0x40]
xor rcx, rsp
call fcn.140027790
mov rbx, qword [rsp + 0x98]
add rsp, 0x50
pop r15
pop r12
pop rdi
pop rsi
pop rbp
ret