Function at 0x140006d30
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, [0x140106190]
lea r13, [0x1400db968]
mov rcx, qword [0x140106190]
cmp rcx, r12
je 0x140006d83
test byte [rcx + 0x1c], 1
je 0x140006d83
mov edx, 0x40
mov r8, r13
mov rcx, qword [rcx + 0x10]
call fcn.140003538
mov esi, 0x400d377a
xor edx, edx
xor ecx, ecx
mov r8d, 0xf003f
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov rbx, rax
test rax, rax
jne 0x140006ed3
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov rcx, qword [0x140106190]
cmp rcx, r12
je 0x140006dd6
test byte [rcx + 0x1c], 2
je 0x140006dd6
cmp byte [rcx + 0x19], 2
jb 0x140006dd6
lea edx, [rbx + 0x41]
mov r9d, eax
mov r8, r13
mov rcx, qword [rcx + 0x10]
call fcn.1400035ec
cmp edi, 5
jne 0x140006ec9
mov esi, 0xc00d37e7
mov rax, qword [str.Xr_r_]
lea rcx, str.Xr_r_
mov rax, qword [rax + 0x18]
call qword [case.0x14006d218.0]
add rax, 0x18
mov qword [rsp + 0x80], rax
mov r8d, edi
lea rdx, [0x1400db950]
lea rcx, [rsp + 0x80]
call fcn.140008b90
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, esi
mov rcx, r14
call fcn.140005b58
mov r8d, edi
mov edx, esi
call fcn.140014f94
nop
lea rdx, [rbx - 0x18]
or eax, 0xffffffff
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x140006e72
mov rcx, qword [rdx]
mov rax, qword [rcx]
mov rax, qword [rax + 8]
call qword [case.0x14006d218.0]
mov rcx, qword [0x140106190]
cmp rcx, r12
je 0x140006eae
test byte [rcx + 0x1c], 1
je 0x140006eae
movzx r9d, byte [rcx + 0x19]
mov eax, edi
neg eax
sbb edx, edx
and edx, 0xfffffffd
add edx, 5
cmp r9d, edx
jb 0x140006eae
mov edx, 0x47
mov r9d, edi
mov r8, r13
mov rcx, qword [rcx + 0x10]
call fcn.1400035ec
mov eax, edi
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
mov esi, 0xc00d37e8
jmp 0x140007056
mov r8d, 0x10024
mov rdx, qword [r14 + 0x28]
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov rbp, rax
test rax, rax
jne 0x140006f61
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
cmp eax, 0x424
jne 0x140006f2b
mov rcx, qword [0x140106190]
cmp rcx, r12
je 0x140006f24
test byte [rcx + 0x1c], 2
je 0x140006f24
cmp byte [rcx + 0x19], 4
jb 0x140006f24
lea edx, [rbp + 0x42]
mov r8, r13
mov rcx, qword [rcx + 0x10]
call fcn.140003538
xor edi, edi
jmp 0x14000704d
mov rcx, qword [0x140106190]
cmp rcx, r12
je 0x140006f57
test byte [rcx + 0x1c], 2
je 0x140006f57
cmp byte [rcx + 0x19], 2
jb 0x140006f57
mov edx, 0x43
mov r9d, eax
mov r8, r13
mov rcx, qword [rcx + 0x10]
call fcn.1400035ec
mov esi, 0xc00d37e9
jmp 0x14000704d
mov rdx, rbp
mov rcx, rbx
call fcn.140006b14
mov rcx, rbp
call qword [sym.imp.ADVAPI32.dll_DeleteService]
test eax, eax
je 0x140006fa6
mov rcx, qword [0x140106190]
cmp rcx, r12
je 0x140006fa2
test byte [rcx + 0x1c], 2
je 0x140006fa2
cmp byte [rcx + 0x19], 4
jb 0x140006fa2
mov edx, 0x44
mov r8, r13
mov rcx, qword [rcx + 0x10]
call fcn.140003538
xor edi, edi
jmp 0x140007018
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
cmp eax, 0x430
jne 0x140006fe7
mov rcx, qword [0x140106190]
cmp rcx, r12
je 0x140006fde
test byte [rcx + 0x1c], 2
je 0x140006fde
cmp byte [rcx + 0x19], 4
jb 0x140006fde
mov edx, 0x45
mov r8, r13
mov rcx, qword [rcx + 0x10]
call fcn.140003538
xor edi, edi
mov esi, 0x400d377b
jmp 0x140007018
mov rcx, qword [0x140106190]
cmp rcx, r12
je 0x140007013
test byte [rcx + 0x1c], 2
je 0x140007013
cmp byte [rcx + 0x19], 2
jb 0x140007013
mov edx, 0x46
mov r9d, eax
mov r8, r13
mov rcx, qword [rcx + 0x10]
call fcn.1400035ec
mov esi, 0xc00d37ea
mov rcx, rbp
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, qword [r14 + 0x28]
sub rcx, 0x18
call fcn.140004b34
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.140006640
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
test edi, edi
jne 0x140006de4
lea edx, [rdi + 4]
and qword [rsp + 0x28], 0
and qword [rsp + 0x20], 0
mov r9, qword [r14 + 0x28]
mov r8d, esi
mov rcx, r14
call fcn.140005b58
xor r8d, r8d
mov edx, esi
call fcn.140014f94
jmp 0x140006e72