Function at 0x140091700
Capabilities:
Enumerate services
Query service status
Stop service

Disassembly:
test rdx, rdx
je 0x140091a72
mov qword [rsp + 8], rcx
push rbp
push rbx
push r14
lea rbp, [rsp - 0x1b0]
sub rsp, 0x2b0
xor ebx, ebx
mov qword [rsp + 0x290], r13
mov r14, rdx
mov dword [rbp + 0x1d0], ebx
xor edx, edx
mov dword [rbp + 0x1d8], ebx
xor ecx, ecx
mov dword [rbp + 0x1e0], ebx
lea r8d, [rbx + 4]
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov qword [rbp + 0x1e8], rax
mov r13, rax
test rax, rax
je 0x140091a5f
lea rax, [rbp + 0x1e0]
xor r9d, r9d
mov qword [rsp + 0x38], rax
lea edx, [rbx + 0x30]
lea rax, [rbp + 0x1d8]
mov rcx, r13
mov qword [rsp + 0x30], rax
lea r8d, [rbx + 3]
lea rax, [rbp + 0x1d0]
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], ebx
call qword [sym.imp.ADVAPI32.dll_EnumServicesStatusW]
test eax, eax
jne 0x1400917b1
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xea
jne 0x140091a56
mov ecx, dword [rbp + 0x1d0]
mov qword [rsp + 0x2a8], rsi
mov rsi, 0xffffffffffffffff
mov qword [rsp + 0x2a0], rdi
movabs rdi, 0xaaaaaaaaaaaaaaab
mov rax, rdi
mov qword [rsp + 0x298], r12
mul rcx
mov eax, 0x30
shr rdx, 5
inc rdx
mul rdx
lea rdx, [0x14014fdc0]
cmovo rax, rsi
mov rcx, rax
call fcn.14002e8b0
mov r12, rax
test rax, rax
je 0x140091a3e
mov ecx, dword [rbp + 0x1d0]
lea r8d, [rsi + 4]
mov rax, rdi
mov r9, r12
mul rcx
xor eax, eax
mov rdi, r12
shr rdx, 5
inc rdx
lea rcx, [rdx + rdx*2]
shl rcx, 4
lea edx, [rsi + 0x31]
shr rcx, 2
rep stosd dword [rdi], eax
lea rax, [rbp + 0x1e0]
mov rcx, r13
mov qword [rsp + 0x38], rax
lea rax, [rbp + 0x1d8]
mov qword [rsp + 0x30], rax
lea rax, [rbp + 0x1d0]
mov qword [rsp + 0x28], rax
mov eax, dword [rbp + 0x1d0]
mov dword [rsp + 0x20], eax
call qword [sym.imp.ADVAPI32.dll_EnumServicesStatusW]
test eax, eax
je 0x140091a36
mov qword [rsp + 0x288], r15
mov r15d, ebx
cmp dword [rbp + 0x1d8], ebx
jbe 0x140091a2e
lea r13, [0x1401b6698]
lea rax, [rsp + 0x78]
mov dword [rsp + 0x70], ebx
mov qword [rsp + 0x68], rax
mov eax, r15d
mov dword [rsp + 0x74], 0x104
mov word [rsp + 0x78], bx
mov qword [rsp + 0x60], r13
lea rdi, [rax + rax*2]
add rdi, rdi
mov rdx, qword [r12 + rdi*8]
test rdx, rdx
je 0x140091a17
lea r8, [rsp + 0x60]
call fcn.1400913e0
test al, al
je 0x140091a17
mov rax, rsi
nop dword [rax]
inc rax
cmp word [r14 + rax*2], 0
jne 0x1400918f0
mov rcx, qword [rsp + 0x68]
test rcx, rcx
je 0x140091912
mov r8d, eax
mov rdx, r14
call fcn.140040364
jmp 0x14009191c
cmp dword [rsp + 0x70], 1
mov eax, ebx
setae al
test eax, eax
jne 0x140091a17
cmp dword [r12 + rdi*8 + 0x14], 1
je 0x140091a17
mov rdi, qword [r12 + rdi*8]
test rdi, rdi
je 0x140091a17
xor edx, edx
xor ecx, ecx
mov r8d, 0xf003f
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov rsi, rax
test rax, rax
je 0x140091a10
mov r8d, 0xf01ff
mov rdx, rdi
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov rbx, rax
test rax, rax
je 0x140091a05
xor edi, edi
nop dword [rax]
lea rdx, [rsp + 0x40]
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
je 0x1400919fc
mov eax, dword [rsp + 0x44]
cmp eax, 1
je 0x1400919fc
cmp eax, 4
je 0x1400919b9
cmp eax, 7
je 0x1400919b9
mov ecx, 0xfa
call qword [sym.imp.KERNEL32.dll_Sleep]
inc edi
cmp edi, 0x3c
jb 0x140091980
jmp 0x1400919fc
lea r8, [rsp + 0x40]
mov edx, 1
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_ControlService]
cmp edi, 0x3c
jae 0x1400919fc
lea rdx, [rsp + 0x40]
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
je 0x1400919fc
cmp dword [rsp + 0x44], 1
je 0x1400919fc
mov ecx, 0xfa
call qword [sym.imp.KERNEL32.dll_Sleep]
inc edi
cmp edi, 0x3c
jb 0x1400919d1
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
xor ebx, ebx
mov rsi, 0xffffffffffffffff
inc r15d
cmp r15d, dword [rbp + 0x1d8]
jb 0x1400918a1
mov r13, qword [rbp + 0x1e8]
mov r15, qword [rsp + 0x288]
mov rcx, r12
call fcn.14002e8a8
mov r12, qword [rsp + 0x298]
mov rdi, qword [rsp + 0x2a0]
mov rsi, qword [rsp + 0x2a8]
mov rcx, r13
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov r13, qword [rsp + 0x290]
add rsp, 0x2b0
pop r14
pop rbx
pop rbp
ret