Function at 0x140022030
Capabilities:
Delete service

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
mov qword [rsp + 0x20], rdi
push r12
push r14
push r15
sub rsp, 0x60
mov rax, qword [0x1400e00c0]
xor rax, rsp
mov qword [rsp + 0x50], rax
mov rbx, rcx
mov qword [rsp + 0x28], rcx
mov esi, 1
mov dword [rsp + 0x20], esi
xor edx, edx
xor ecx, ecx
mov r8d, 0xf003f
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov r14, rax
test rax, rax
jne 0x1400220fb
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rdx, rbx
cmp qword [rbx + 0x18], 8
jb 0x140022094
mov rdx, qword [rbx]
mov r8d, eax
lea rcx, str.SystemOperation::delService___OpenSCManager_failed:__s___d
call fcn.1400262b0
nop
mov rdx, qword [rbx + 0x18]
cmp rdx, 8
jb 0x1400220e3
mov rcx, qword [rbx]
lea rdx, [rdx*2 + 2]
cmp rdx, 0x1000
jb 0x1400220de
add rdx, 0x27
mov r8, qword [rcx - 8]
sub rcx, r8
lea rax, [rcx - 8]
cmp rax, 0x1f
ja 0x1400222b8
mov rcx, r8
call fcn.140070654
xor edi, edi
mov qword [rbx + 0x10], rdi
mov qword [rbx + 0x18], 7
mov word [rbx], di
mov eax, esi
jmp 0x14002228a
mov rdx, rbx
cmp qword [rbx + 0x18], 8
jb 0x140022108
mov rdx, qword [rbx]
mov r8d, 0xf01ff
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov r15, rax
test rax, rax
jne 0x1400221a6
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rdx, rbx
cmp qword [rbx + 0x18], 8
jb 0x140022136
mov rdx, qword [rbx]
mov r8d, eax
lea rcx, str.SystemOperation::delService___OpenService_failed:__s___d
call fcn.1400262b0
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
nop
mov rdx, qword [rbx + 0x18]
cmp rdx, 8
jb 0x14002218e
mov rcx, qword [rbx]
lea rdx, [rdx*2 + 2]
cmp rdx, 0x1000
jb 0x140022189
add rdx, 0x27
mov r8, qword [rcx - 8]
sub rcx, r8
lea rax, [rcx - 8]
cmp rax, 0x1f
ja 0x1400222b8
mov rcx, r8
call fcn.140070654
xor edi, edi
mov qword [rbx + 0x10], rdi
mov qword [rbx + 0x18], 7
mov word [rbx], di
mov eax, esi
jmp 0x14002228a
lea r8, [rsp + 0x30]
mov edx, esi
mov rcx, r15
call qword [sym.imp.ADVAPI32.dll_ControlService]
mov rcx, r15
call qword [sym.imp.ADVAPI32.dll_DeleteService]
test eax, eax
jne 0x140022203
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r12d, eax
mov ecx, eax
call fcn.1400096b0
xor edi, edi
test al, al
je 0x1400221df
mov dword [rsp + 0x20], esi
jmp 0x14002221e
mov esi, edi
mov dword [rsp + 0x20], edi
mov rdx, rbx
cmp qword [rbx + 0x18], 8
jb 0x1400221f2
mov rdx, qword [rbx]
mov r8d, r12d
lea rcx, str.SystemOperation::delService___failed_to_deleted_the_Service:__s__Error_Code_is:__d
call fcn.140026280
jmp 0x14002221e
mov rdx, rbx
cmp qword [rbx + 0x18], 8
jb 0x140022210
mov rdx, qword [rbx]
lea rcx, str.SystemOperation::delService___Successfully_deleted_the_Service:__s
call fcn.1400262b0
xor edi, edi
mov rcx, r15
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
nop
jmp 0x14002223e
mov rdx, qword [rbx + 0x18]
cmp rdx, 8
jb 0x140022279
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbx]
cmp rdx, 0x1000
jb 0x140022274
add rdx, 0x27
mov r8, qword [rcx - 8]
sub rcx, r8
lea rax, [rcx - 8]
cmp rax, 0x1f
ja 0x1400222b2
mov rcx, r8
call fcn.140070654
mov qword [rbx + 0x10], rdi
mov qword [rbx + 0x18], 7
mov word [rbx], di
mov eax, esi
mov rcx, qword [rsp + 0x50]
xor rcx, rsp
call fcn.140070140
lea r11, [rsp + 0x60]
mov rbx, qword [r11 + 0x28]
mov rsi, qword [r11 + 0x30]
mov rdi, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop r12
ret
call fcn.14007d0fc
int3
call fcn.14007d0fc
int3