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

Disassembly:
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x50
mov rax, qword [0x1400512d0]
xor rax, rsp
mov qword [rsp + 0x40], rax
xor eax, eax
mov rdi, rcx
xor edx, edx
lea r8d, [rax + 1]
xor ecx, ecx
mov qword [rsp + 0x20], rax
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x30], rax
mov dword [rsp + 0x38], eax
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov rsi, rax
test rax, rax
jne 0x14001caa8
test byte [0x1400512b0], 2
je 0x14001ca8f
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea r8, str.OpenSCManager_failed_w_err_0x_08lx_n
lea edx, [rsi + 2]
lea rcx, str.UninstallService
mov r9d, eax
call fcn.1400205a0
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, [0x140045fb0]
mov edx, eax
call fcn.1400230dc
jmp 0x14001cc8b
mov r8d, 0x10024
mov rdx, rdi
mov rcx, rax
mov qword [rsp + 0x68], rbx
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov rbx, rax
test rax, rax
jne 0x14001cb0f
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
cmp eax, 0x424
je 0x14001cc6f
test byte [0x1400512b0], 2
je 0x14001cafc
lea r8, str.OpenSCManager_failed_w_err_0x_08lx_n
lea edx, [rbx + 2]
lea rcx, str.UninstallService
mov r9d, eax
call fcn.1400205a0
lea rcx, str.OpenService_failed_w_err_0x_08lx_n
mov edx, edi
call fcn.1400230dc
jmp 0x14001cc6f
lea r8, [rsp + 0x20]
mov edx, 1
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
je 0x14001cbef
lea rcx, str.Stopping__s.
mov rdx, rdi
call fcn.1400230dc
mov ecx, 0x3e8
call qword [sym.imp.KERNEL32.dll_Sleep]
lea rdx, [rsp + 0x20]
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
je 0x14001cb88
mov eax, dword [rsp + 0x24]
cmp eax, 3
jne 0x14001cb8c
lea rcx, [0x140042314]
call fcn.1400230dc
mov ecx, 0x3e8
call qword [sym.imp.KERNEL32.dll_Sleep]
lea rdx, [rsp + 0x20]
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
jne 0x14001cb56
mov eax, dword [rsp + 0x24]
cmp eax, 1
jne 0x14001cbbc
test byte [0x1400512b0], 2
je 0x14001cbb3
lea r8, str._n_s_is_stopped._n
lea edx, [rax + 1]
lea rcx, str.UninstallService
mov r9, rdi
call fcn.1400206a0
lea rcx, str._n_s_is_stopped._n
jmp 0x14001cbe7
test byte [0x1400512b0], 2
je 0x14001cbe0
lea r8, str._n_s_failed_to_stop._n
lea rcx, str.UninstallService
mov r9, rdi
mov edx, 2
call fcn.1400206a0
lea rcx, str._n_s_failed_to_stop._n
mov rdx, rdi
call fcn.1400230dc
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_DeleteService]
test eax, eax
jne 0x14001cc3c
test byte [0x1400512b0], 2
je 0x14001cc26
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea r8, [0x140046170]
lea rcx, str.UninstallService
mov r9d, eax
mov edx, 2
call fcn.1400205a0
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.DeleteService_failed_w_err_0x_08lx_n
mov edx, eax
call fcn.1400230dc
jmp 0x14001cc6f
test byte [0x1400512b0], 2
je 0x14001cc60
lea r8, str._n_s_is_removed._n
lea rcx, str.UninstallService
mov r9, rdi
mov edx, 2
call fcn.1400206a0
lea rcx, str._s_is_removed._n
mov rdx, rdi
call fcn.1400230dc
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
test rbx, rbx
je 0x14001cc86
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rbx, qword [rsp + 0x68]
mov rcx, qword [rsp + 0x40]
xor rcx, rsp
call fcn.140021670
mov rsi, qword [rsp + 0x70]
add rsp, 0x50
pop rdi
ret