Function at 0x40eff0
Capabilities:
Enumerate services

Disassembly:
sub esp, 0x1c
cmp dword [esp + 0x20], 0
jle 0x40f017
mov eax, dword [esp + 0x24]
mov ecx, dword [eax]
push 0x4233f8
push ecx
call fcn.004082b0
add esp, 8
mov byte [esp + 0x20], 1
test eax, eax
jne 0x40f01c
mov byte [esp + 0x20], 0
push ebp
push 5
call fcn.0040ca50
mov ebp, eax
add esp, 4
mov dword [esp + 0x1c], ebp
test ebp, ebp
jne 0x40f04f
push 0x400001fb
call fcn.0041439a
add eax, 0x40
push eax
call fcn.004022a0
add esp, 8
lea eax, [ebp + 1]
pop ebp
add esp, 0x1c
ret
push ebx
push 0
lea edx, [esp + 0x14]
push edx
lea eax, [esp + 0x14]
push eax
lea ecx, [esp + 0x14]
push ecx
push 0
push 0
push 3
push 0x30
push 0
push ebp
mov dword [esp + 0x38], 0
call dword [sym.imp.ADVAPI32.dll_EnumServicesStatusExW]
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
call ebx
cmp eax, 0xea
je 0x40f0b6
call ebx
push eax
call fcn.004020f0
add esp, 4
push eax
push 0x40000220
call fcn.0041439a
add eax, 0x40
push eax
call fcn.004022a0
add esp, 0xc
pop ebx
mov eax, 2
pop ebp
add esp, 0x1c
ret
mov edx, dword [esp + 8]
push edi
push edx
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edi, eax
mov dword [esp + 0x18], edi
test edi, edi
jne 0x40f0ff
push str.list_nssm_services__
push str.ENUM_SERVICE_STATUS_PROCESS
push 0xc00001fa
call fcn.0041439a
add eax, 0x40
push eax
call fcn.004022a0
add esp, 0x10
lea eax, [edi + 3]
pop edi
pop ebx
pop ebp
add esp, 0x1c
ret
mov eax, dword [esp + 0xc]
push esi
mov dword [esp + 0x20], eax
push 0
lea ecx, [esp + 0x1c]
push ecx
mov ecx, dword [esp + 0x28]
lea edx, [esp + 0x1c]
push edx
lea eax, [esp + 0x1c]
push eax
push ecx
push edi
push 3
push 0x30
push 0
push ebp
call dword [sym.imp.ADVAPI32.dll_EnumServicesStatusExW]
mov esi, eax
mov dword [esp + 0x24], esi
test esi, esi
jne 0x40f143
call ebx
cmp eax, 0xea
jne 0x40f1d4
xor ebx, ebx
cmp dword [esp + 0x14], ebx
jbe 0x40f1c1
mov ebp, edi
lea ecx, [ecx]
call fcn.0040db50
mov esi, eax
test esi, esi
je 0x40f213
mov edx, dword [ebp]
push edx
push 0x421914
push 0xffffffffffffffff
lea edi, [esi + 2]
push 0x100
push edi
call fcn.0041454f
push 0
push esi
call fcn.0040bc80
add esp, 0x1c
cmp byte [esp + 0x30], 0
jne 0x40f194
cmp word [esi + 0x18416], 0
je 0x40f1a2
push edi
push 0x421a0c
call fcn.00415612
add esp, 8
push esi
call fcn.0040db90
mov edi, dword [esp + 0x20]
inc ebx
add esp, 4
add ebp, 0x2c
cmp ebx, dword [esp + 0x14]
jb 0x40f150
mov esi, dword [esp + 0x24]
mov ebp, dword [esp + 0x28]
test esi, esi
jne 0x40f250
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x40f108
push edi
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
call ebx
push eax
call fcn.004020f0
add esp, 4
push eax
push 0x40000220
call fcn.0041439a
add eax, 0x40
push eax
call fcn.004022a0
add esp, 0xc
pop esi
pop edi
pop ebx
mov eax, 4
pop ebp
add esp, 0x1c
ret
push edi
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
push str.list_nssm_services__
push str.nssm_service_t
push 0xc00001fa
call fcn.0041439a
add eax, 0x40
push eax
call fcn.004022a0
add esp, 0x10
pop esi
pop edi
pop ebx
mov eax, 5
pop ebp
add esp, 0x1c
ret
push edi
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
pop esi
pop edi
pop ebx
xor eax, eax
pop ebp
add esp, 0x1c
ret