Function at 0x180021a00
Capabilities:
Enumerate services

Disassembly:
mov dword [rsp + 0x10], edx
mov qword [rsp + 8], rcx
push rsi
push rdi
sub rsp, 0x118
mov r8d, 4
xor edx, edx
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov qword [rsp + 0x60], rax
cmp qword [rsp + 0x60], 0
jne 0x180021a4d
mov rdi, qword [rsp + 0x130]
xor eax, eax
mov ecx, 0x38
rep stosb byte [rdi], al
mov rax, qword [rsp + 0x130]
jmp 0x180021c96
mov dword [rsp + 0x68], 0
mov qword [rsp + 0x48], 0
lea rax, [rsp + 0x68]
mov qword [rsp + 0x40], rax
lea rax, [rsp + 0x6c]
mov qword [rsp + 0x38], rax
lea rax, [rsp + 0x58]
mov qword [rsp + 0x30], rax
mov dword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0
mov r9d, 3
mov r8d, 0x30
xor edx, edx
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.ADVAPI32.dll_EnumServicesStatusExW]
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xea
je 0x180021adc
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rdi, qword [rsp + 0x130]
xor eax, eax
mov ecx, 0x38
rep stosb byte [rdi], al
mov rax, qword [rsp + 0x130]
jmp 0x180021c96
lea rcx, [rsp + 0x54]
call fcn.180001bb0
mov qword [rsp + 0x78], rax
mov eax, dword [rsp + 0x58]
mov qword [rsp + 0x80], rax
mov r8, qword [rsp + 0x78]
mov rdx, qword [rsp + 0x80]
lea rcx, [rsp + 0x88]
call fcn.180022310
lea rcx, [rsp + 0x88]
call fcn.1800102b0
mov qword [rsp + 0x70], rax
mov qword [rsp + 0x48], 0
lea rax, [rsp + 0x68]
mov qword [rsp + 0x40], rax
lea rax, [rsp + 0x6c]
mov qword [rsp + 0x38], rax
lea rax, [rsp + 0x58]
mov qword [rsp + 0x30], rax
mov eax, dword [rsp + 0x58]
mov dword [rsp + 0x28], eax
mov rax, qword [rsp + 0x70]
mov qword [rsp + 0x20], rax
mov r9d, 3
mov r8d, 0x30
xor edx, edx
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.ADVAPI32.dll_EnumServicesStatusExW]
test eax, eax
jne 0x180021bcc
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
lea rax, [rsp + 0xa0]
mov rdi, rax
xor eax, eax
mov ecx, 0x38
rep stosb byte [rdi], al
lea rax, [rsp + 0xa0]
mov rdi, qword [rsp + 0x130]
mov rsi, rax
mov ecx, 0x38
rep movsb byte [rdi], byte [rsi]
lea rcx, [rsp + 0x88]
call fcn.180017780
mov rax, qword [rsp + 0x130]
jmp 0x180021c96
mov dword [rsp + 0x50], 0
jmp 0x180021be0
mov eax, dword [rsp + 0x50]
inc eax
mov dword [rsp + 0x50], eax
mov eax, dword [rsp + 0x6c]
cmp dword [rsp + 0x50], eax
jae 0x180021c48
mov eax, dword [rsp + 0x50]
imul rax, rax, 0x38
mov rcx, qword [rsp + 0x70]
mov edx, dword [rsp + 0x138]
cmp dword [rcx + rax + 0x2c], edx
jne 0x180021c46
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, dword [rsp + 0x50]
imul rax, rax, 0x38
mov rcx, qword [rsp + 0x70]
mov rdi, qword [rsp + 0x130]
lea rsi, [rcx + rax]
mov ecx, 0x38
rep movsb byte [rdi], byte [rsi]
lea rcx, [rsp + 0x88]
call fcn.180017780
mov rax, qword [rsp + 0x130]
jmp 0x180021c96
jmp 0x180021bd6
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
lea rax, [rsp + 0xd8]
mov rdi, rax
xor eax, eax
mov ecx, 0x38
rep stosb byte [rdi], al
lea rax, [rsp + 0xd8]
mov rdi, qword [rsp + 0x130]
mov rsi, rax
mov ecx, 0x38
rep movsb byte [rdi], byte [rsi]
lea rcx, [rsp + 0x88]
call fcn.180017780
mov rax, qword [rsp + 0x130]
add rsp, 0x118
pop rdi
pop rsi
ret