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

Disassembly:
push rbp
push rdi
lea rbp, [rsp - 0x4f]
sub rsp, 0xa8
mov rax, qword [0x140070010]
xor rax, rsp
mov qword [rbp + 0x37], rax
xor edx, edx
xor ecx, ecx
lea r8d, [rdx + 1]
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov rdi, rax
test rax, rax
jne 0x1400222dc
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.OpenSCManager_fail
call fcn.140021260
jmp 0x1400224fe
mov r8d, 0x10004
mov qword [rsp + 0xc0], rbx
lea rdx, str.AsusCertService
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov rbx, rax
test rax, rax
jne 0x14002231b
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.OpenService_fail
call fcn.140021260
jmp 0x1400224f6
lea rdx, [rbp + 0x17]
mov qword [rsp + 0xa0], r15
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
xor r15d, r15d
test eax, eax
je 0x14002245e
cmp dword [rbp + 0x1b], 4
jne 0x14002245e
xor edx, edx
mov qword [rsp + 0xc8], rsi
xor ecx, ecx
lea r8d, [r15 + 1]
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov rsi, rax
test rax, rax
jne 0x14002237c
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.OpenSCManager_fail
call fcn.140021260
jmp 0x140022456
mov r8d, 0x20
mov qword [rsp + 0xd0], r14
lea rdx, str.AsusCertService
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov r14, rax
test rax, rax
jne 0x1400223b4
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.Open_service_fail
jmp 0x140022447
lea r8, [0x140075bd0]
mov edx, 1
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
je 0x14002243a
call fcn.1400078c0
mov qword [rbp - 0x31], 0x1c
lea rcx, str.Service_stopped_successfully
mov qword [rbp - 0x39], rcx
lea r9, [rbp - 0x39]
movaps xmm0, xmmword [rbp - 0x39]
lea rdx, [rbp - 9]
mov rcx, qword [rax + 0x1d8]
mov r8d, 2
movdqa xmmword [rbp - 0x39], xmm0
mov qword [rbp - 0x21], r15
mov qword [rbp - 0x29], r15
movups xmm1, xmmword [rbp - 0x29]
mov qword [rbp - 0x19], r15
movsd xmm0, qword [rbp - 0x19]
movsd qword [rbp + 7], xmm0
movaps xmmword [rbp - 9], xmm1
call fcn.140005330
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x14002244e
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.Stop_service_fail
mov edx, eax
call fcn.140021260
mov r14, qword [rsp + 0xd0]
mov rsi, qword [rsp + 0xc8]
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_DeleteService]
test eax, eax
je 0x1400224c6
call fcn.1400078c0
mov qword [rbp - 0x31], 0x20
lea rcx, str.Service_uninstalled_successfully
mov qword [rbp - 0x39], rcx
lea r9, [rbp - 0x39]
movaps xmm0, xmmword [rbp - 0x39]
lea rdx, [rbp - 9]
mov rcx, qword [rax + 0x1d8]
mov r8d, 2
movdqa xmmword [rbp - 0x39], xmm0
mov qword [rbp - 0x21], r15
mov qword [rbp - 0x29], r15
movups xmm1, xmmword [rbp - 0x29]
mov qword [rbp - 0x19], r15
movsd xmm0, qword [rbp - 0x19]
movsd qword [rbp + 7], xmm0
movaps xmmword [rbp - 9], xmm1
call fcn.140005330
jmp 0x1400224da
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.Uninstall_service_fail
call fcn.140021260
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov r15, qword [rsp + 0xa0]
xor eax, eax
mov rbx, qword [rsp + 0xc0]
mov rcx, qword [rbp + 0x37]
xor rcx, rsp
call fcn.140026300
add rsp, 0xa8
pop rdi
pop rbp
ret