Function at 0x140007040
Capabilities:
Delete service

Disassembly:
mov rax, rsp
push rbp
push rdi
push r12
push r14
push r15
mov rbp, rsp
sub rsp, 0x60
mov qword [rbp - 0x20], 0xfffffffffffffffe
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rsi
mov rax, qword [0x1400d3258]
xor rax, rsp
mov qword [rbp - 8], rax
mov r14, rcx
lea r15, [0x1400d0018]
lea r12, [0x1400b0738]
mov rcx, qword [0x1400d0018]
cmp rcx, r15
je 0x1400070a4
test byte [rcx + 0x1c], 1
je 0x1400070a4
mov edx, 0x3f
mov r8, r12
mov rcx, qword [rcx + 0x10]
call fcn.1400034f0
movups xmm0, xmmword [0x1400b0230]
movdqu xmmword [rbp - 0x18], xmm0
xor edx, edx
xor ecx, ecx
mov r8d, 0xf003f
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
nop dword [rax + rax]
mov rbx, rax
test rax, rax
jne 0x140007206
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
mov edi, eax
mov rcx, qword [0x1400d0018]
cmp rcx, r15
je 0x14000710a
test byte [rcx + 0x1c], 2
je 0x14000710a
cmp byte [rcx + 0x19], 2
jb 0x14000710a
lea edx, [rbx + 0x40]
mov r9d, eax
mov r8, r12
mov rcx, qword [rcx + 0x10]
call fcn.1400035c4
cmp edi, 5
jne 0x1400071f5
movups xmm0, xmmword [0x1400b0120]
movdqu xmmword [rbp - 0x18], xmm0
mov rax, qword [0x1400d2e50]
lea rcx, [0x1400d2e50]
mov rax, qword [rax + 0x18]
call qword [case.0x1400688bc.0]
add rax, 0x18
mov qword [rbp - 0x30], rax
mov r8d, edi
lea rdx, [0x1400b0720]
lea rcx, [rbp - 0x30]
call fcn.14000912c
and qword [rsp + 0x20], 0
mov rbx, qword [rbp - 0x30]
mov r9, rbx
mov r8, qword [r14 + 0x28]
lea rdx, [rbp - 0x18]
mov rcx, r14
call fcn.140005d18
nop
lea rdx, [rbx - 0x18]
or eax, 0xffffffff
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x140007191
mov rcx, qword [rdx]
mov rax, qword [rcx]
mov rax, qword [rax + 8]
call qword [case.0x1400688bc.0]
mov rcx, qword [0x1400d0018]
cmp rcx, r15
je 0x1400071cd
test byte [rcx + 0x1c], 1
je 0x1400071cd
movzx r9d, byte [rcx + 0x19]
mov eax, edi
neg eax
sbb edx, edx
and edx, 0xfffffffd
add edx, 5
cmp r9d, edx
jb 0x1400071cd
mov edx, 0x46
mov r9d, edi
mov r8, r12
mov rcx, qword [rcx + 0x10]
call fcn.1400035c4
mov eax, edi
mov rcx, qword [rbp - 8]
xor rcx, rsp
call fcn.1400a3a80
lea r11, [rsp + 0x60]
mov rbx, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r12
pop rdi
pop rbp
ret
movups xmm0, xmmword [0x1400b0110]
movdqu xmmword [rbp - 0x18], xmm0
jmp 0x1400073c8
mov r8d, 0x10024
mov rdx, qword [r14 + 0x28]
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
nop dword [rax + rax]
mov rsi, rax
test rax, rax
jne 0x1400072ab
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
mov edi, eax
cmp eax, 0x424
jne 0x14000726e
mov rcx, qword [0x1400d0018]
cmp rcx, r15
je 0x140007267
test byte [rcx + 0x1c], 2
je 0x140007267
cmp byte [rcx + 0x19], 4
jb 0x140007267
lea edx, [rsi + 0x41]
mov r8, r12
mov rcx, qword [rcx + 0x10]
call fcn.1400034f0
xor edi, edi
jmp 0x1400073b9
mov rcx, qword [0x1400d0018]
cmp rcx, r15
je 0x14000729a
test byte [rcx + 0x1c], 2
je 0x14000729a
cmp byte [rcx + 0x19], 2
jb 0x14000729a
mov edx, 0x42
mov r9d, eax
mov r8, r12
mov rcx, qword [rcx + 0x10]
call fcn.1400035c4
movups xmm0, xmmword [0x1400b0100]
movdqu xmmword [rbp - 0x18], xmm0
jmp 0x1400073b9
mov rdx, rsi
mov rcx, rbx
call fcn.140006e00
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_DeleteService]
nop dword [rax + rax]
test eax, eax
je 0x1400072f9
mov rcx, qword [0x1400d0018]
cmp rcx, r15
je 0x1400072f2
test byte [rcx + 0x1c], 2
je 0x1400072f2
cmp byte [rcx + 0x19], 4
jb 0x1400072f2
mov edx, 0x43
mov r8, r12
mov rcx, qword [rcx + 0x10]
call fcn.1400034f0
xor edi, edi
jmp 0x14000737a
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
mov edi, eax
cmp eax, 0x430
jne 0x140007342
mov rcx, qword [0x1400d0018]
cmp rcx, r15
je 0x140007337
test byte [rcx + 0x1c], 2
je 0x140007337
cmp byte [rcx + 0x19], 4
jb 0x140007337
mov edx, 0x44
mov r8, r12
mov rcx, qword [rcx + 0x10]
call fcn.1400034f0
xor edi, edi
movups xmm0, xmmword [0x1400b0220]
jmp 0x140007375
mov rcx, qword [0x1400d0018]
cmp rcx, r15
je 0x14000736e
test byte [rcx + 0x1c], 2
je 0x14000736e
cmp byte [rcx + 0x19], 2
jb 0x14000736e
mov edx, 0x45
mov r9d, eax
mov r8, r12
mov rcx, qword [rcx + 0x10]
call fcn.1400035c4
movups xmm0, xmmword [0x1400b00f0]
movdqu xmmword [rbp - 0x18], xmm0
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
nop dword [rax + rax]
mov rcx, qword [r14 + 0x28]
sub rcx, 0x18
call fcn.140004bf0
add rax, 0x18
mov qword [rbp - 0x28], rax
call qword [sym.imp.KERNEL32.dll_GetTickCount]
nop dword [rax + rax]
mov r8d, eax
lea rdx, [rbp - 0x28]
mov rcx, rbx
call fcn.1400068e0
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
nop dword [rax + rax]
test edi, edi
jne 0x14000711f
and qword [rsp + 0x20], 0
xor r9d, r9d
mov r8, qword [r14 + 0x28]
lea rdx, [rbp - 0x18]
mov rcx, r14
call fcn.140005d18
jmp 0x140007191