Function at 0x1400166a8
Capabilities:
Delete service
Query service status
Stop service

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rdi
push rbp
mov rbp, rsp
sub rsp, 0x70
mov rax, qword [0x14012a418]
xor rax, rsp
mov qword [rbp - 8], rax
mov rbx, rcx
xor edx, edx
xor ecx, ecx
mov r8d, 0xf003f
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov rdi, rax
mov qword [rbp - 0x38], rax
test rax, rax
je 0x1400167c5
mov r8d, 0xf01ff
mov rdx, rbx
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov rbx, rax
mov qword [rbp - 0x30], rax
test rax, rax
je 0x1400167fa
lea rdx, [rbp - 0x28]
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
je 0x14001682f
cmp dword [rbp - 0x24], 4
jne 0x140016742
lea r8, [rbp - 0x28]
mov edx, 1
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
je 0x140016864
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_DeleteService]
test eax, eax
je 0x140016899
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
test eax, eax
je 0x1400168ce
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
test eax, eax
je 0x14001678f
mov rcx, qword [rbp - 8]
xor rcx, rsp
call fcn.14006b990
lea r11, [rsp + 0x70]
mov rbx, qword [r11 + 0x18]
mov rdi, qword [r11 + 0x20]
mov rsp, r11
pop rbp
ret
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop
mov edx, eax
lea rcx, str.Unable_to_close_service_handle:_error__u
call fcn.14000366c
lea rdx, str.Unable_to_close_service_handle
lea rcx, [rbp - 0x50]
call fcn.14000552c
lea rdx, [0x140127a68]
lea rcx, [rbp - 0x50]
call fcn.14006dab0
nop
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.Unable_to_open_service_control_manager_with_all_access:_error__u
call fcn.14000366c
lea rdx, str.Unable_to_open_service_control_manager
lea rcx, [rbp - 0x50]
call fcn.14000552c
lea rdx, [0x140127a68]
lea rcx, [rbp - 0x50]
call fcn.14006dab0
nop
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.Unable_to_open_service_for_uninstall:_error__u
call fcn.14000366c
lea rdx, str.Unable_to_open_service_for_uninstall
lea rcx, [rbp - 0x50]
call fcn.14000552c
lea rdx, [0x140127a68]
lea rcx, [rbp - 0x50]
call fcn.14006dab0
int3
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.Unable_to_query_service_status:_error__u
call fcn.14000366c
lea rdx, str.Unable_to_query_service_status
lea rcx, [rbp - 0x50]
call fcn.14000552c
lea rdx, [0x140127a68]
lea rcx, [rbp - 0x50]
call fcn.14006dab0
int3
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.Unable_to_stop_service:_error__u
call fcn.14000366c
lea rdx, str.Unable_to_stop_service
lea rcx, [rbp - 0x50]
call fcn.14000552c
lea rdx, [0x140127a68]
lea rcx, [rbp - 0x50]
call fcn.14006dab0
int3
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.Unable_to_delete_service:_error__u
call fcn.14000366c
lea rdx, str.Unable_to_delete_service
lea rcx, [rbp - 0x50]
call fcn.14000552c
lea rdx, [0x140127a68]
lea rcx, [rbp - 0x50]
call fcn.14006dab0
nop
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.Unable_to_close_service_handle:_error__u
call fcn.14000366c
lea rdx, str.Unable_to_close_service_handle
lea rcx, [rbp - 0x50]
call fcn.14000552c
lea rdx, [0x140127a68]
lea rcx, [rbp - 0x50]
call fcn.14006dab0
int3