Function at 0x18001aec0
Capabilities:
Enumerate services

Disassembly:
push rdi
push r12
push r13
push r14
push r15
mov eax, 0x2120
call fcn.180050b90
sub rsp, rax
mov qword [rsp + 0x80], 0xfffffffffffffffe
mov qword [rsp + 0x2150], rbx
mov qword [rsp + 0x2160], rbp
mov qword [rsp + 0x2168], rsi
mov rax, qword [0x1800754d0]
xor rax, rsp
mov qword [rsp + 0x2110], rax
mov rbx, rdx
mov qword [rsp + 0x60], rdx
xor r15d, r15d
mov dword [rsp + 0x48], r15d
lea ecx, [r15 + 8]
call fcn.18003c23c
cmp rax, r15
je 0x18001af30
mov qword [rax], rbx
jmp 0x18001af33
mov rax, r15
mov qword [rbx], rax
mov rcx, rbx
call fcn.18001826c
mov qword [rbx + 0x28], rax
mov qword [rbx + 0x30], r15
mov dword [rsp + 0x48], 1
xor edx, edx
xor ecx, ecx
lea r8d, [rdx + 4]
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov rbp, rax
cmp rax, r15
je 0x18001b210
mov dword [rsp + 0x40], r15d
mov dword [rsp + 0x44], r15d
mov qword [rsp + 0x38], r15
lea rax, [rsp + 0x44]
mov qword [rsp + 0x30], rax
lea rax, [rsp + 0x40]
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], r15d
xor r9d, r9d
lea edi, [r9 + 3]
mov r8d, edi
lea edx, [rdi + 0x2d]
mov rcx, rbp
call qword [sym.imp.ADVAPI32.dll_EnumServicesStatusW]
mov edx, dword [rsp + 0x40]
cmp edx, r15d
jbe 0x18001b207
mov rcx, rdx
call fcn.18003cee0
mov rsi, rax
cmp rax, r15
je 0x18001b207
mov qword [rsp + 0x38], r15
lea rax, [rsp + 0x44]
mov qword [rsp + 0x30], rax
lea rax, [rsp + 0x40]
mov qword [rsp + 0x28], rax
mov eax, dword [rsp + 0x40]
mov dword [rsp + 0x20], eax
mov r9, rsi
mov r8d, edi
lea edx, [rdi + 0x2d]
mov rcx, rbp
call qword [sym.imp.ADVAPI32.dll_EnumServicesStatusW]
cmp eax, r15d
je 0x18001b1ff
mov r12d, r15d
cmp dword [rsp + 0x44], r15d
jbe 0x18001b1ff
mov r13, rsi
lea ecx, [rdi + 4]
mov qword [rsp + 0xb0], rcx
mov qword [rsp + 0xa8], r15
mov word [rsp + 0x98], r15w
mov qword [rsp + 0xd8], rcx
mov qword [rsp + 0xd0], r15
mov word [rsp + 0xc0], r15w
mov qword [rsp + 0x108], rcx
mov qword [rsp + 0x100], r15
mov word [rsp + 0xf0], r15w
mov dword [rsp + 0xe0], r15d
mov dword [rsp + 0xe4], r15d
xor eax, eax
or rcx, 0xffffffffffffffff
mov rdi, qword [r13]
repne scasw ax, word [rdi]
not rcx
lea r8, [rcx - 1]
mov rdx, qword [r13]
lea rcx, [rsp + 0x90]
call fcn.180001df4
mov rdx, qword [r13 + 8]
xor eax, eax
or rcx, 0xffffffffffffffff
mov rdi, rdx
repne scasw ax, word [rdi]
not rcx
lea r8, [rcx - 1]
lea rcx, [rsp + 0xb8]
call fcn.180001df4
mov edx, dword [r13 + 0x14]
mov dword [rsp + 0xe0], edx
mov r8d, 1
mov rdx, qword [r13]
mov rcx, rbp
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov r14, rax
cmp rax, r15
je 0x18001b1a9
mov byte [rsp + 0x110], r15b
xor edx, edx
mov r8d, 0x1fff
lea rcx, [rsp + 0x111]
call fcn.1800413a0
lea r9, [rsp + 0x40]
mov edi, 0x2000
mov r8d, edi
lea rdx, [rsp + 0x110]
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_QueryServiceConfigW]
mov ecx, dword [rsp + 0xe4]
cmp eax, r15d
cmovne ecx, dword [rsp + 0x114]
mov dword [rsp + 0xe4], ecx
mov r8, rdi
xor edx, edx
lea rcx, [rsp + 0x110]
call fcn.1800413a0
lea rdx, [rsp + 0x40]
mov qword [rsp + 0x20], rdx
mov r9d, edi
lea r8, [rsp + 0x110]
mov edx, 1
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_QueryServiceConfig2W]
cmp eax, r15d
je 0x18001b1a0
mov rdx, qword [rsp + 0x110]
cmp rdx, r15
je 0x18001b1a0
xor eax, eax
or rcx, 0xffffffffffffffff
mov rdi, rdx
repne scasw ax, word [rdi]
not rcx
lea r8, [rcx - 1]
lea rcx, [rsp + 0xe8]
call fcn.180001df4
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rax, qword [rbx + 0x28]
mov qword [rsp + 0x58], rax
mov rax, qword [rbx]
mov qword [rsp + 0x50], rax
movaps xmm0, xmmword [rsp + 0x50]
movdqa xmmword [rsp + 0x70], xmm0
lea r8, [rsp + 0x90]
lea rdx, [rsp + 0x70]
mov rcx, rbx
call fcn.18001b730
nop
lea rcx, [rsp + 0x90]
call fcn.180005c8c
inc r12d
add r13, 0x30
cmp r12d, dword [rsp + 0x44]
mov ecx, 7
jb 0x18001b017
mov rcx, rsi
call fcn.18003cea0
mov rcx, rbp
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rax, rbx
mov rcx, qword [rsp + 0x2110]
xor rcx, rsp
call fcn.18003c180
lea r11, [rsp + 0x2120]
mov rbx, qword [r11 + 0x30]
mov rbp, qword [r11 + 0x40]
mov rsi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rdi
ret