Function at 0x2d9e3cf0b0
Capabilities:
Enumerate services

Disassembly:
push rsi
push r12
push r14
push r15
sub rsp, 0x228
mov rax, qword [0x2d9e415008]
xor rax, rsp
mov qword [rsp + 0x200], rax
xor esi, esi
mov dword [rsp + 0x60], edx
mov r12d, edx
mov dword [rsp + 0x58], esi
mov r15, rcx
mov dword [rsp + 0x50], esi
xor edx, edx
mov dword [rsp + 0x54], esi
lea rcx, [rsp + 0x70]
mov r8d, 0x190
call fcn.2d9e3e3840
xor edx, edx
xor ecx, ecx
mov r8d, 0xf003f
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov r14, rax
test rax, rax
je 0x2d9e3cf163
mov qword [rsp + 0x48], rsi
lea rax, [rsp + 0x54]
mov qword [rsp + 0x40], rax
lea r9d, [rsi + 1]
lea rax, [rsp + 0x50]
xor edx, edx
mov qword [rsp + 0x38], rax
lea r8d, [rsi + 0x30]
lea rax, [rsp + 0x58]
mov rcx, r14
mov qword [rsp + 0x30], rax
mov dword [rsp + 0x28], esi
mov qword [rsp + 0x20], rsi
call qword [sym.imp.ADVAPI32.dll_EnumServicesStatusExW]
mov eax, dword [rsp + 0x58]
test eax, eax
jne 0x2d9e3cf16a
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
xor eax, eax
jmp 0x2d9e3cf35d
mov qword [rsp + 0x260], rbx
mov ecx, 0x40
lea ebx, [rax + 0x38]
mov qword [rsp + 0x210], r13
mov edx, ebx
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov r13, rax
mov rcx, r14
test rax, rax
jne 0x2d9e3cf1a2
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
xor eax, eax
jmp 0x2d9e3cf34d
mov qword [rsp + 0x48], rsi
lea rax, [rsp + 0x54]
mov qword [rsp + 0x40], rax
xor edx, edx
lea rax, [rsp + 0x50]
mov dword [rsp + 0x54], esi
mov qword [rsp + 0x38], rax
lea rax, [rsp + 0x58]
mov qword [rsp + 0x30], rax
mov dword [rsp + 0x28], ebx
lea r9d, [rdx + 1]
lea r8d, [rdx + 0x30]
mov qword [rsp + 0x20], r13
call qword [sym.imp.ADVAPI32.dll_EnumServicesStatusExW]
test eax, eax
jne 0x2d9e3cf1ff
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_LocalFree]
xor eax, eax
jmp 0x2d9e3cf34d
mov edx, 0x2000
mov qword [rsp + 0x218], rdi
mov ecx, 0x40
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov edi, esi
mov rdx, rax
mov qword [rsp + 0x68], rax
mov dword [rsp + 0x5c], esi
cmp dword [rsp + 0x50], esi
jbe 0x2d9e3cf2f5
mov r12, rax
mov qword [rsp + 0x220], rbp
nop word [rax + rax]
mov eax, edi
imul rbx, rax, 0x38
cmp dword [rbx + r13 + 0x14], 4
jne 0x2d9e3cf2d7
mov rdx, qword [rbx + r13]
mov r8d, 1
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov rbp, rax
test rax, rax
je 0x2d9e3cf2d7
lea r9, [rsp + 0x5c]
mov r8d, 0x2000
mov rdx, r12
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_QueryServiceConfigW]
test eax, eax
je 0x2d9e3cf2ce
mov rcx, qword [r12 + 0x10]
test rcx, rcx
je 0x2d9e3cf2ce
lea rdx, [0x2d9e409e08]
call qword [sym.imp.SHLWAPI.dll_StrStrIW]
test rax, rax
je 0x2d9e3cf2ce
mov r8d, dword [rbx + r13 + 0x2c]
mov edx, esi
mov rax, rsi
nop
mov ecx, dword [rsp + rax*4 + 0x70]
cmp ecx, r8d
je 0x2d9e3cf2ce
test ecx, ecx
je 0x2d9e3cf2c9
inc edx
inc rax
cmp edx, 0x64
jb 0x2d9e3cf2b0
jmp 0x2d9e3cf2ce
mov dword [rsp + rax*4 + 0x70], r8d
mov rcx, rbp
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
inc edi
cmp edi, dword [rsp + 0x50]
jb 0x2d9e3cf240
mov r12d, dword [rsp + 0x60]
mov rdx, qword [rsp + 0x68]
mov rbp, qword [rsp + 0x220]
mov rcx, rdx
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov edi, esi
lea rbx, [rsp + 0x70]
mov ecx, dword [rbx]
test ecx, ecx
je 0x2d9e3cf343
test r15, r15
je 0x2d9e3cf338
test r12d, r12d
je 0x2d9e3cf338
mov r8d, r12d
mov rdx, r15
call fcn.2d9e3cbbd0
test eax, eax
je 0x2d9e3cf338
inc esi
inc edi
add rbx, 4
cmp edi, 0x64
jb 0x2d9e3cf317
mov rdi, qword [rsp + 0x218]
mov eax, esi
mov rbx, qword [rsp + 0x260]
mov r13, qword [rsp + 0x210]
mov rcx, qword [rsp + 0x200]
xor rcx, rsp
call fcn.2d9e3da7d0
add rsp, 0x228
pop r15
pop r14
pop r12
pop rsi
ret