Function at 0x140016664
Capabilities:
Delete service

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rsi
mov qword [rax + 0x18], rdi
mov qword [rax + 0x20], r12
push rbp
push r14
push r15
lea rbp, [rax - 0xf68]
mov eax, 0x1050
call fcn.14001b440
sub rsp, rax
mov rax, qword [0x1400580e8]
xor rax, rsp
mov qword [rbp + 0xf40], rax
mov esi, 0xf003f
xor edx, edx
mov r8d, esi
xor ecx, ecx
xor edi, edi
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
lea r15d, [rdi + 1]
mov rbx, rax
test rax, rax
je 0x14001690d
lea r12, [0x14005b9f8]
mov r8d, r15d
mov rdx, r12
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
test rax, rax
je 0x1400166ec
mov rcx, rax
mov edi, r15d
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
test edi, edi
je 0x14001690d
mov r8d, esi
xor edx, edx
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov rsi, rax
test rax, rax
jne 0x14001677d
lea rdx, [rsp + 0x40]
mov ecx, 0xd80a
call fcn.140017008
test eax, eax
jne 0x140016763
lea r8, str.Could_not_open_Service_Manager
mov edx, 0x400
lea rcx, [rsp + 0x40]
call fcn.140023b18
test eax, eax
je 0x140016763
cmp eax, 0xc
je 0x140016956
cmp eax, 0x16
je 0x14001694b
cmp eax, 0x22
je 0x14001694b
cmp eax, 0x50
jne 0x140016940
lea rdx, [rsp + 0x40]
mov r8, r12
xor r9d, r9d
xor ecx, ecx
call qword [sym.imp.USER32.dll_MessageBoxW]
xor eax, eax
jmp 0x140016910
mov r8d, 0x10020
mov rdx, r12
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov r14, rax
test rax, rax
jne 0x1400167f6
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
lea rdx, [rsp + 0x40]
mov ecx, 0xd80c
call fcn.140017008
test eax, eax
jne 0x140016763
lea r8, str.Could_not_open_service
mov edx, 0x400
lea rcx, [rsp + 0x40]
call fcn.140023b18
test eax, eax
je 0x140016763
cmp eax, 0xc
je 0x140016977
cmp eax, 0x16
je 0x14001696c
cmp eax, 0x22
je 0x14001696c
cmp eax, 0x50
je 0x140016763
jmp 0x140016961
lea r8, [rsp + 0x20]
mov edx, r15d
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_ControlService]
mov edi, 0x400
test eax, eax
jne 0x14001688d
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x426
je 0x14001688d
cmp eax, 0x425
jne 0x14001682b
cmp dword [rsp + 0x24], 3
je 0x14001688d
lea rdx, [rsp + 0x40]
mov ecx, 0xd80e
call fcn.140017008
test eax, eax
jne 0x14001687a
lea r8, str.Could_not_stop_service
mov rdx, rdi
lea rcx, [rsp + 0x40]
call fcn.140023b18
test eax, eax
je 0x14001687a
cmp eax, 0xc
je 0x140016998
cmp eax, 0x16
je 0x14001698d
cmp eax, 0x22
je 0x14001698d
cmp eax, 0x50
jne 0x140016982
xor r9d, r9d
lea rdx, [rsp + 0x40]
mov r8, r12
xor ecx, ecx
call qword [sym.imp.USER32.dll_MessageBoxW]
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_DeleteService]
mov rcx, r14
mov ebx, eax
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
test ebx, ebx
jne 0x14001690d
lea rdx, [rbp + 0x740]
mov ecx, 0xd80d
call fcn.140017008
test eax, eax
jne 0x140016901
lea r8, str.Could_not_delete_service
mov rdx, rdi
lea rcx, [rbp + 0x740]
call fcn.140023b18
test eax, eax
je 0x140016901
cmp eax, 0xc
je 0x1400169b9
cmp eax, 0x16
je 0x1400169ae
cmp eax, 0x22
je 0x1400169ae
cmp eax, 0x50
jne 0x1400169a3
lea rdx, [rbp + 0x740]
jmp 0x140016768
mov eax, r15d
mov rcx, qword [rbp + 0xf40]
xor rcx, rsp
call fcn.14001a5c0
lea r11, [rsp + 0x1050]
mov rbx, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rdi, qword [r11 + 0x30]
mov r12, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop rbp
ret
mov ecx, 0x80004005
call fcn.140001820
int3
mov ecx, 0x80070057
call fcn.140001820
int3
mov ecx, 0x8007000e
call fcn.140001820
int3
mov ecx, 0x80004005
call fcn.140001820
int3
mov ecx, 0x80070057
call fcn.140001820
int3
mov ecx, 0x8007000e
call fcn.140001820
int3
mov ecx, 0x80004005
call fcn.140001820
int3
mov ecx, 0x80070057
call fcn.140001820
int3
mov ecx, 0x8007000e
call fcn.140001820
int3
mov ecx, 0x80004005
call fcn.140001820
int3
mov ecx, 0x80070057
call fcn.140001820
int3
mov ecx, 0x8007000e
call fcn.140001820
int3