Function at 0x14018a290
Capabilities:
Delete service

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x18], rsi
push rbp
push rdi
push r14
mov rbp, rsp
sub rsp, 0x80
mov rax, qword [0x1405f98c0]
xor rax, rsp
mov qword [rbp - 8], rax
mov r14, rdx
mov bl, 1
xor edx, edx
xor ecx, ecx
mov r8d, 0xf003f
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov rsi, rax
test rax, rax
jne 0x14018a302
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rbp - 0x50], eax
lea rax, [rbp - 0x50]
mov qword [rsp + 0x20], rax
lea r9, str.OpenSCManager_failed_w_err_0x:08lx
lea r8, str.InstallService
lea edx, [rsi + 4]
call fcn.1400d1640
xor bl, bl
jmp 0x14018a5e5
mov r8d, 0xf01ff
lea rdx, [0x140578fe8]
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov rdi, rax
test rax, rax
jne 0x14018a360
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x424
je 0x14018a5dc
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rbp - 0x50], eax
lea rax, [rbp - 0x50]
mov qword [rsp + 0x20], rax
lea r9, str.OpenService_failed_w_err_
lea r8, str.InstallService
lea edx, [rdi + 4]
call fcn.1400d1640
xor bl, bl
jmp 0x14018a5dc
mov rdx, r14
mov rcx, rdi
call fcn.14018a130
test al, al
jne 0x14018a39b
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rbp - 0x50], eax
lea rax, [rbp - 0x50]
mov qword [rsp + 0x20], rax
lea r9, str.StopService___failed_____trying_DeleteService___anyway...
lea r8, str.InstallService
mov edx, 4
call fcn.1400d1640
xor bl, bl
xorps xmm0, xmm0
movups xmmword [rbp - 0x48], xmm0
xorps xmm1, xmm1
movdqu xmmword [rbp - 0x38], xmm1
mov r8d, setsockopt
lea rdx, [0x140578fe8]
lea rcx, [rbp - 0x48]
call fcn.1400c71d0
nop
lea rdx, [rbp - 0x48]
lea rcx, [rbp - 0x28]
call fcn.1401844a0
nop
cmp qword [rax + 0x18], 0xf
jbe 0x14018a3d9
mov rax, qword [rax]
mov qword [rbp - 0x50], rax
lea rax, [rbp - 0x50]
mov qword [rsp + 0x20], rax
lea r9, str.Service__is_stopped.
lea r8, str.InstallService
mov edx, 2
call fcn.1400d2b90
nop
mov rdx, qword [rbp - 0x10]
cmp rdx, 0xf
jbe 0x14018a43a
inc rdx
mov rcx, qword [rbp - 0x28]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14018a435
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14018a612
call fcn.1403e3650
movdqa xmm0, xmmword [0x14057a8c0]
movdqu xmmword [rbp - 0x18], xmm0
mov byte [rbp - 0x28], 0
mov rdx, qword [rbp - 0x30]
cmp rdx, 7
jbe 0x14018a48b
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x48]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14018a486
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14018a618
call fcn.1403e3650
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_DeleteService]
test eax, eax
jne 0x14018a4c9
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rbp - 0x50], eax
lea rax, [rbp - 0x50]
mov qword [rsp + 0x20], rax
lea r9, str.DeleteService_failed___
lea r8, str.InstallService
mov edx, 4
call fcn.1400d1640
xor bl, bl
jmp 0x14018a5d3
xorps xmm0, xmm0
movups xmmword [rbp - 0x48], xmm0
xorps xmm1, xmm1
movdqu xmmword [rbp - 0x38], xmm1
mov r8d, setsockopt
lea rdx, [0x140578fe8]
lea rcx, [rbp - 0x48]
call fcn.1400c71d0
nop
lea rdx, [rbp - 0x48]
lea rcx, [rbp - 0x28]
call fcn.1401844a0
nop
cmp qword [rax + 0x18], 0xf
jbe 0x14018a507
mov rax, qword [rax]
mov qword [rbp - 0x50], rax
lea rax, [rbp - 0x50]
mov qword [rsp + 0x20], rax
lea r9, str.Service__is_removed.
lea r8, str.InstallService
mov edx, 2
call fcn.1400d2b90
nop
mov rdx, qword [rbp - 0x10]
cmp rdx, 0xf
jbe 0x14018a568
inc rdx
mov rcx, qword [rbp - 0x28]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14018a563
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14018a61e
call fcn.1403e3650
movdqa xmm0, xmmword [0x14057a8c0]
movdqu xmmword [rbp - 0x18], xmm0
mov byte [rbp - 0x28], 0
mov rdx, qword [rbp - 0x30]
cmp rdx, 7
jbe 0x14018a5b5
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x48]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14018a5b0
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14018a60c
call fcn.1403e3650
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
add eax, 0xfffff43e
cmp eax, 1
jbe 0x14018a5cf
cmp ecx, 0x669
jne 0x14018a5d3
mov byte [r14], 1
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
movzx eax, bl
mov rcx, qword [rbp - 8]
xor rcx, rsp
call fcn.1403e3630
lea r11, [rsp + 0x80]
mov rbx, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x30]
mov rsp, r11
pop r14
pop rdi
pop rbp
ret
call fcn.1403fd768
nop
call fcn.1403fd768
nop
call fcn.1403fd768
nop
call fcn.1403fd768
int3