Function at 0x140007110
Capabilities:
Delete service

Disassembly:
mov rax, rsp
push rsi
push rdi
push r12
push r13
push r14
sub rsp, 0x40
mov qword [rax - 0x38], 0xfffffffffffffffe
mov qword [rax + 8], rbx
mov qword [rax + 0x20], rbp
mov r14, rcx
lea r12, [0x14014dd40]
lea r13, [0x14011a3d8]
mov rcx, qword [0x14014dd40]
cmp rcx, r12
je 0x140007163
test byte [rcx + 0x1c], 1
je 0x140007163
mov edx, 0x40
mov r8, r13
mov rcx, qword [rcx + 0x10]
call fcn.140003614
mov edi, 0x400d377a
xor edx, edx
xor ecx, ecx
mov r8d, 0xf003f
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov rbx, rax
test rax, rax
jne 0x1400071cb
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov rcx, qword [0x14014dd40]
cmp rcx, r12
je 0x1400071b2
test byte [rcx + 0x1c], 2
je 0x1400071b2
cmp byte [rcx + 0x19], 2
jb 0x1400071b2
lea edx, [rbx + 0x41]
mov r9d, eax
mov r8, r13
mov rcx, qword [rcx + 0x10]
call fcn.1400036d4
cmp esi, 5
jne 0x1400071c1
mov edi, 0xc00d37e7
jmp 0x14000737f
mov edi, 0xc00d37e8
jmp 0x14000734e
mov r8d, 0x10024
mov rdx, qword [r14 + 0x28]
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov rbp, rax
test rax, rax
jne 0x140007259
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
cmp eax, 0x424
jne 0x140007223
mov rcx, qword [0x14014dd40]
cmp rcx, r12
je 0x14000721c
test byte [rcx + 0x1c], 2
je 0x14000721c
cmp byte [rcx + 0x19], 4
jb 0x14000721c
lea edx, [rbp + 0x42]
mov r8, r13
mov rcx, qword [rcx + 0x10]
call fcn.140003614
xor esi, esi
jmp 0x140007345
mov rcx, qword [0x14014dd40]
cmp rcx, r12
je 0x14000724f
test byte [rcx + 0x1c], 2
je 0x14000724f
cmp byte [rcx + 0x19], 2
jb 0x14000724f
mov edx, 0x43
mov r9d, eax
mov r8, r13
mov rcx, qword [rcx + 0x10]
call fcn.1400036d4
mov edi, 0xc00d37e9
jmp 0x140007345
mov rdx, rax
mov rcx, rbx
call fcn.140006eec
mov rcx, rbp
call qword [sym.imp.ADVAPI32.dll_DeleteService]
test eax, eax
je 0x14000729e
mov rcx, qword [0x14014dd40]
cmp rcx, r12
je 0x14000729a
test byte [rcx + 0x1c], 2
je 0x14000729a
cmp byte [rcx + 0x19], 4
jb 0x14000729a
mov edx, 0x44
mov r8, r13
mov rcx, qword [rcx + 0x10]
call fcn.140003614
xor esi, esi
jmp 0x140007310
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
cmp eax, 0x430
jne 0x1400072df
mov rcx, qword [0x14014dd40]
cmp rcx, r12
je 0x1400072d6
test byte [rcx + 0x1c], 2
je 0x1400072d6
cmp byte [rcx + 0x19], 4
jb 0x1400072d6
mov edx, 0x45
mov r8, r13
mov rcx, qword [rcx + 0x10]
call fcn.140003614
xor esi, esi
mov edi, 0x400d377b
jmp 0x140007310
mov rcx, qword [0x14014dd40]
cmp rcx, r12
je 0x14000730b
test byte [rcx + 0x1c], 2
je 0x14000730b
cmp byte [rcx + 0x19], 2
jb 0x14000730b
mov edx, 0x46
mov r9d, eax
mov r8, r13
mov rcx, qword [rcx + 0x10]
call fcn.1400036d4
mov edi, 0xc00d37ea
mov rcx, rbp
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, qword [r14 + 0x28]
sub rcx, 0x18
call fcn.140004dd4
add rax, 0x18
mov qword [rsp + 0x78], rax
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov r8d, eax
lea rdx, [rsp + 0x78]
mov rcx, rbx
call fcn.140006a08
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
test esi, esi
jne 0x14000737f
lea edx, [rsi + 4]
and qword [rsp + 0x28], 0
and qword [rsp + 0x20], 0
mov r9, qword [r14 + 0x28]
mov r8d, edi
mov rcx, r14
call fcn.140005ed8
xor r8d, r8d
mov edx, edi
call fcn.140015ec8
jmp 0x14000741e
mov rax, qword [0x14014e920]
mov rbx, qword [rax + 0x18]
mov rcx, rbx
call qword [fcn.140009050]
lea rcx, [0x14014e920]
call rbx
add rax, 0x18
mov qword [rsp + 0x80], rax
mov r8d, esi
lea rdx, [0x14011a3c0]
lea rcx, [rsp + 0x80]
call fcn.14000916c
mov edx, 1
and qword [rsp + 0x28], 0
mov rbx, qword [rsp + 0x80]
mov qword [rsp + 0x20], rbx
mov r9, qword [r14 + 0x28]
mov r8d, edi
mov rcx, r14
call fcn.140005ed8
mov r8d, esi
mov edx, edi
call fcn.140015ec8
nop
lea r14, [rbx - 0x18]
or eax, 0xffffffff
lock xadd dword [r14 + 0x10], eax
sub eax, 1
jg 0x14000741e
mov rdi, qword [r14]
mov rax, qword [rdi]
mov rbx, qword [rax + 8]
mov rcx, rbx
call qword [fcn.140009050]
mov rdx, r14
mov rcx, rdi
call rbx
mov rcx, qword [0x14014dd40]
cmp rcx, r12
je 0x14000745a
test byte [rcx + 0x1c], 1
je 0x14000745a
movzx r9d, byte [rcx + 0x19]
mov eax, esi
neg eax
sbb edx, edx
and edx, 0xfffffffd
add edx, 5
cmp r9d, edx
jl 0x14000745a
mov edx, 0x47
mov r9d, esi
mov r8, r13
mov rcx, qword [rcx + 0x10]
call fcn.1400036d4
mov eax, esi
lea r11, [rsp + 0x40]
mov rbx, qword [r11 + 0x30]
mov rbp, qword [r11 + 0x48]
mov rsp, r11
pop r14
pop r13
pop r12
pop rdi
pop rsi
ret