Function at 0x14003509c
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 [0x1400592a0]
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.140019b1c
test rdi, rdi
je 0x140035108
lea rdx, str._local_
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_private_l1_1_0.dll__o__wcsicmp]
nop dword [rax + rax]
test eax, eax
cmove rdi, rsi
xor edx, edx
mov r8d, 0xf003f
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
nop dword [rax + rax]
mov r13, rax
test rax, rax
jne 0x14003512e
mov ebx, esi
jmp 0x14003532e
mov r8d, 0xf01ff
mov rdx, r15
mov rcx, r13
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
nop dword [rax + rax]
mov r14, rax
test rax, rax
je 0x14003530b
mov esi, ebx
xor r15d, r15d
lea r8, [rbp - 0x30]
mov edx, esi
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_ControlService]
nop dword [rax + rax]
test eax, eax
jne 0x14003528c
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
test eax, eax
je 0x140035304
cmp eax, 0x426
je 0x140035274
cmp eax, 0x425
jne 0x1400351be
cmp dword [rbp - 0x2c], esi
je 0x140035274
cmp dword [rbp - 0x2c], 2
jne 0x14003528c
lea ecx, [rax - 0x3d]
call qword [sym.imp.KERNEL32.dll_Sleep]
nop dword [rax + rax]
jmp 0x140035157
cmp eax, 0x41b
jne 0x140035304
test r12d, r12d
jne 0x140035304
mov edx, 0x30
mov dword [rbp - 0x34], r15d
mov r12d, esi
mov dword [rbp - 0x38], r15d
lea ecx, [rdx + 0x34]
call qword [sym.imp.api_ms_win_crt_private_l1_1_0.dll__o_calloc]
nop dword [rax + rax]
mov rsi, rax
test rax, rax
je 0x140035304
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]
nop dword [rax + rax]
test eax, eax
je 0x14003527b
cmp dword [rbp - 0x38], 0
jbe 0x14003525b
mov eax, r15d
mov rcx, rdi
lea rdx, [rax + rax*2]
add rdx, rdx
mov rdx, qword [rsi + rdx*8]
call fcn.14003509c
neg eax
sbb ecx, ecx
inc r15d
and ebx, ecx
cmp r15d, dword [rbp - 0x38]
jb 0x140035236
mov rcx, rsi
call qword [sym.imp.api_ms_win_crt_private_l1_1_0.dll__o_free]
nop dword [rax + rax]
mov esi, 1
jmp 0x140035154
mov ebx, esi
jmp 0x140035307
mov rcx, rsi
call qword [sym.imp.api_ms_win_crt_private_l1_1_0.dll__o_free]
nop dword [rax + rax]
jmp 0x140035304
lea rdx, [rbp - 0x30]
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
nop dword [rax + rax]
test eax, eax
je 0x140035304
mov eax, dword [rbp - 0x2c]
cmp eax, esi
je 0x140035307
mov ecx, dword [rbp - 0x1c]
mov r12d, 0x1f4
mov edi, dword [rbp - 0x18]
mov esi, ecx
cmp edi, 0x64
mov ecx, 0x2710
cmovle edi, ecx
cmp eax, 1
je 0x140035307
mov ecx, r12d
call qword [sym.imp.KERNEL32.dll_Sleep]
nop dword [rax + rax]
lea rdx, [rbp - 0x30]
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
nop dword [rax + rax]
test eax, eax
je 0x140035304
mov eax, dword [rbp - 0x2c]
sub edi, r12d
test edi, edi
jg 0x1400352c3
cmp eax, 1
je 0x140035307
mov ecx, dword [rbp - 0x1c]
cmp esi, ecx
jne 0x1400352b3
mov ebx, r15d
mov r15, qword [rbp - 0x40]
mov rcx, r13
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
nop dword [rax + rax]
test r14, r14
je 0x14003532e
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
nop dword [rax + rax]
test ebx, ebx
lea rax, str.failed
lea r9, str.succeeded
mov r8, r15
cmove r9, rax
lea rdx, str.Stopping_service__S__S._r_n
mov ecx, 4
call fcn.140019b1c
mov eax, ebx
mov rcx, qword [rbp - 0x10]
xor rcx, rsp
call fcn.1400017f0
mov rbx, qword [rsp + 0xc0]
add rsp, 0x70
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret