Function at 0x140017d70
Capabilities:
Delete service

Disassembly:
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0xc0
mov qword [rsp + 0x60], 0xfffffffffffffffe
mov qword [rsp + 0x100], rbx
mov r15, rcx
xor edx, edx
xor ecx, ecx
lea r8d, [rdx + 1]
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov rbx, rax
mov qword [rsp + 0x118], rax
test rax, rax
jne 0x140017e05
mov qword [rsp + 0x58], 0xf
xor r13d, r13d
mov qword [rsp + 0x50], r13
mov byte [rsp + 0x40], r13b
lea r8d, [rax + 0x1b]
lea rdx, str.Cannot_open_service_manager
lea rcx, [rsp + 0x38]
call fcn.1400128b0
nop
xor r8d, r8d
lea rdx, [rsp + 0x38]
lea rcx, [rsp + 0x68]
call fcn.14003e070
lea rdx, [0x1401d8ba0]
lea rcx, [rsp + 0x68]
call fcn.1400e0fa4
nop
cmp qword [r15 + 0x20], 8
jb 0x140017e15
lea r14, [r15 + 8]
mov rdx, qword [r14]
jmp 0x140017e1c
lea r14, [r15 + 8]
mov rdx, r14
mov r8d, 0x10000
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov rdi, rax
mov qword [rsp + 0x30], rax
test rax, rax
jne 0x140017e46
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x1400182bd
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_DeleteService]
test eax, eax
jne 0x1400182aa
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x110], eax
lea rcx, str.swifdiag.log
call fcn.140001910
mov rsi, rax
xor r13d, r13d
lea rbp, str.failed_to_delete_the
lea rax, str.local_unregisterService
lea r12, str....._src_swic_srcSwiConfigApp.cpp
test rsi, rsi
je 0x140018097
mov r10, qword [rsi]
mov qword [rsp + 0x20], rax
mov r9, r12
lea r8, str.default
lea edx, [r13 + 1]
mov rcx, rsi
call qword [r10 + 8]
test al, al
je 0x140018097
mov byte [rsi + 0xf8], 0x65
mov eax, r13d
mov r8b, 0x2e
mov rcx, r12
mov edx, 1
nop
cmp r8b, 0x5c
cmove eax, edx
inc edx
inc rcx
movzx r8d, byte [rcx]
test r8b, r8b
jne 0x140017ed0
add rax, r12
mov qword [rsi + 0x100], rax
mov dword [rsi + 0x108], 0x163
lea rax, str.local_unregisterService
mov qword [rsi + 0x110], rax
mov rcx, rsi
call fcn.1400027f0
mov r12, rax
mov rsi, r13
inc rsi
cmp byte [rsi + rbp], r13b
jne 0x140017f15
mov ecx, dword [rax + 0x430]
mov dword [rax + 0x430], r13d
cmp esi, ecx
jge 0x140017f64
movzx eax, byte [rax + 0x42c]
mov byte [rsp + 0x108], al
sub ecx, esi
mov ebp, ecx
mov r8d, 1
lea rdx, [rsp + 0x108]
mov rcx, r12
call fcn.14002f090
sub rbp, 1
jne 0x140017f41
lea rbp, str.failed_to_delete_the
mov r8, rsi
mov rdx, rbp
mov rcx, r12
call fcn.14002f090
cmp qword [r15 + 0x20], 8
jb 0x140017f7e
mov rdx, qword [r14]
jmp 0x140017f81
mov rdx, r14
mov rcx, r12
call fcn.140013b50
mov rbp, rax
mov rsi, r13
lea rax, str._service
inc rsi
cmp byte [rsi + rax], r13b
jne 0x140017f96
mov ecx, dword [rbp + 0x430]
mov dword [rbp + 0x430], r13d
cmp esi, ecx
jge 0x140017ff3
movzx eax, byte [rbp + 0x42c]
mov byte [rsp + 0x108], al
sub ecx, esi
mov r12d, ecx
nop word [rax + rax]
mov r8d, 1
lea rdx, [rsp + 0x108]
mov rcx, rbp
call fcn.14002f090
sub r12, 1
jne 0x140017fd0
lea rax, str._service
mov r8, rsi
mov rdx, rax
mov rcx, rbp
call fcn.14002f090
mov rsi, r13
lea rax, str._err:
nop dword [rax + rax]
inc rsi
cmp byte [rsi + rax], r13b
jne 0x140018010
mov ecx, dword [rbp + 0x430]
mov dword [rbp + 0x430], r13d
cmp esi, ecx
jge 0x140018063
movzx eax, byte [rbp + 0x42c]
mov byte [rsp + 0x108], al
sub ecx, esi
mov r12d, ecx
nop dword [rax]
mov r8d, 1
lea rdx, [rsp + 0x108]
mov rcx, rbp
call fcn.14002f090
sub r12, 1
jne 0x140018040
lea rax, str._err:
mov r8, rsi
mov rdx, rax
mov rcx, rbp
call fcn.14002f090
mov edx, dword [rsp + 0x110]
mov rcx, rbp
call fcn.1400146a0
mov rdx, qword [rax]
mov rcx, rax
call qword [rdx + 8]
lea rbp, str.failed_to_delete_the
lea r12, str....._src_swic_srcSwiConfigApp.cpp
lea rcx, [0x14019e670]
call fcn.140030de0
mov rsi, rax
test rax, rax
je 0x140018295
mov r10, qword [rax]
lea rax, str.local_unregisterService
mov qword [rsp + 0x20], rax
mov r9, r12
lea r8, str.default
mov edx, 1
mov rcx, rsi
call qword [r10 + 8]
test al, al
je 0x140018295
mov byte [rsi + 0xf8], 0x65
mov eax, r13d
mov r8b, 0x2e
mov rcx, r12
mov edx, 1
nop word [rax + rax]
cmp r8b, 0x5c
cmove eax, edx
inc edx
inc rcx
movzx r8d, byte [rcx]
test r8b, r8b
jne 0x140018100
add rax, r12
mov qword [rsi + 0x100], rax
mov dword [rsi + 0x108], 0x163
lea rax, str.local_unregisterService
mov qword [rsi + 0x110], rax
mov rcx, rsi
call fcn.1400027f0
mov r12, rax
mov rsi, r13
inc rsi
cmp byte [rsi + rbp], r13b
jne 0x140018145
mov ecx, dword [rax + 0x430]
mov dword [rax + 0x430], r13d
cmp esi, ecx
jge 0x140018194
movzx eax, byte [rax + 0x42c]
mov byte [rsp + 0x108], al
sub ecx, esi
mov ebp, ecx
mov r8d, 1
lea rdx, [rsp + 0x108]
mov rcx, r12
call fcn.14002f090
sub rbp, 1
jne 0x140018171
lea rbp, str.failed_to_delete_the
mov r8, rsi
mov rdx, rbp
mov rcx, r12
call fcn.14002f090
cmp qword [r15 + 0x20], 8
jb 0x1400181ac
mov r14, qword [r14]
mov rdx, r14
mov rcx, r12
call fcn.140013b50
mov rbp, rax
mov rsi, r13
lea r14, str._service
inc rsi
cmp byte [rsi + r14], r13b
jne 0x1400181c4
mov ecx, dword [rax + 0x430]
mov dword [rax + 0x430], r13d
cmp esi, ecx
jge 0x14001820d
movzx eax, byte [rax + 0x42c]
mov byte [rsp + 0x108], al
sub ecx, esi
mov r12d, ecx
mov r8d, 1
lea rdx, [rsp + 0x108]
mov rcx, rbp
call fcn.14002f090
sub r12, 1
jne 0x1400181f1
mov r8, rsi
mov rdx, r14
mov rcx, rbp
call fcn.14002f090
mov rsi, r13
lea r14, str._err:
inc rsi
cmp byte [rsi + r14], r13b
jne 0x140018225
mov ecx, dword [rbp + 0x430]
mov dword [rbp + 0x430], r13d
cmp esi, ecx
jge 0x14001826e
movzx eax, byte [rbp + 0x42c]
mov byte [rsp + 0x108], al
sub ecx, esi
mov r12d, ecx
mov r8d, 1
lea rdx, [rsp + 0x108]
mov rcx, rbp
call fcn.14002f090
sub r12, 1
jne 0x140018252
mov r8, rsi
mov rdx, r14
mov rcx, rbp
call fcn.14002f090
mov edx, dword [rsp + 0x110]
mov rcx, rbp
call fcn.1400146a0
mov rdx, qword [rax]
mov rcx, rax
call qword [rdx + 8]
nop
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
nop
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x1400182bd
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
nop
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rbx, qword [rsp + 0x100]
add rsp, 0xc0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret