Function at 0x14002c88c
Capabilities:
Enumerate services
Query service status

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
mov rbp, rsp
sub rsp, 0x70
mov rax, qword [0x1400502a8]
xor rax, rsp
mov qword [rbp - 0x10], rax
mov r15, rdx
mov qword [rbp - 0x40], rdx
mov rdi, rcx
mov r8, rdx
mov ebx, 1
lea rdx, str.Stopping_service__S._r_n
xor esi, esi
mov r12d, esi
lea ecx, [rbx + 3]
call fcn.1400168a8
test rdi, rdi
je 0x14002c8f2
lea rdx, str._local_
mov rcx, rdi
call qword [sym.imp.msvcrt.dll__wcsicmp]
test eax, eax
cmove rdi, rsi
xor edx, edx
mov r8d, 0xf003f
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov r13, rax
test rax, rax
jne 0x14002c912
mov ebx, esi
jmp 0x14002cac7
mov r8d, 0xf01ff
mov rdx, r15
mov rcx, r13
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov r14, rax
test rax, rax
je 0x14002cab0
mov esi, ebx
xor r15d, r15d
lea r8, [rbp - 0x30]
mov edx, esi
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
jne 0x14002ca3f
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
mov ecx, 0x57
cmove eax, ecx
cmp eax, 0x426
je 0x14002ca30
cmp eax, 0x425
jne 0x14002c98c
cmp dword [rbp - 0x2c], esi
je 0x14002ca30
cmp dword [rbp - 0x2c], 2
jne 0x14002ca3f
lea ecx, [rax - 0x3d]
call qword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x14002c935
cmp eax, 0x41b
jne 0x14002caa9
test r12d, r12d
jne 0x14002caa9
mov edx, 0x30
mov dword [rbp - 0x34], r15d
mov r12d, esi
mov dword [rbp - 0x38], r15d
lea ecx, [rdx + 0x34]
call qword [sym.imp.msvcrt.dll_calloc]
mov rsi, rax
test rax, rax
je 0x14002caa9
lea rax, [rbp - 0x38]
mov r9d, 0x12c0
mov qword [rsp + 0x28], rax
mov r8, rsi
lea rax, [rbp - 0x34]
mov edx, 1
mov rcx, r14
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_EnumDependentServicesW]
test eax, eax
je 0x14002ca34
cmp dword [rbp - 0x38], 0
jbe 0x14002ca1d
mov eax, r15d
mov rcx, rdi
lea rdx, [rax + rax*2]
add rdx, rdx
mov rdx, qword [rsi + rdx*8]
call fcn.14002c88c
neg eax
sbb ecx, ecx
inc r15d
and ebx, ecx
cmp r15d, dword [rbp - 0x38]
jb 0x14002c9f8
mov rcx, rsi
call qword [sym.imp.msvcrt.dll_free]
mov esi, 1
jmp 0x14002c932
mov ebx, esi
jmp 0x14002caac
mov rcx, rsi
call qword [sym.imp.msvcrt.dll_free]
jmp 0x14002caa9
lea rdx, [rbp - 0x30]
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
je 0x14002caa9
mov eax, dword [rbp - 0x2c]
cmp eax, esi
je 0x14002caac
mov ecx, dword [rbp - 0x1c]
mov r12d, 0x1f4
mov edi, dword [rbp - 0x18]
mov edx, 0x2710
cmp edi, 0x64
mov esi, ecx
cmovle edi, edx
test edi, edi
jle 0x14002caa0
cmp eax, 1
je 0x14002caac
mov ecx, r12d
call qword [sym.imp.KERNEL32.dll_Sleep]
lea rdx, [rbp - 0x30]
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
je 0x14002caa9
mov eax, dword [rbp - 0x2c]
sub edi, r12d
test edi, edi
jg 0x14002ca74
mov ecx, dword [rbp - 0x1c]
cmp eax, 1
je 0x14002caac
cmp esi, ecx
jne 0x14002ca60
mov ebx, r15d
mov r15, qword [rbp - 0x40]
mov rcx, r13
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
test r14, r14
je 0x14002cac7
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
test ebx, ebx
lea rax, str.succeeded
lea r9, str.failed
mov r8, r15
cmovne r9, rax
lea rdx, str.Stopping_service__S__S._r_n
mov ecx, 4
call fcn.1400168a8
mov eax, ebx
mov rcx, qword [rbp - 0x10]
xor rcx, rsp
call fcn.14003c810
mov rbx, qword [rsp + 0xc0]
add rsp, 0x70
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret