Function at 0x40efe0
Capabilities:
Enumerate services

Disassembly:
sub esp, 0x1c
cmp dword [esp + 0x20], 0
jle 0x40f007
mov eax, dword [esp + 0x24]
mov ecx, dword [eax]
push 0x4233d8
push ecx
call fcn.004082b0
add esp, 8
mov byte [esp + 0x20], 1
test eax, eax
jne 0x40f00c
mov byte [esp + 0x20], 0
push ebp
push 5
call fcn.0040ca40
mov ebp, eax
add esp, 4
mov dword [esp + 0x1c], ebp
test ebp, ebp
jne 0x40f03f
push 0x400001fb
call fcn.0041438a
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 0x40f0a6
call ebx
push eax
call fcn.004020f0
add esp, 4
push eax
push 0x40000220
call fcn.0041438a
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 0x40f0ef
push str.list_nssm_services__
push str.ENUM_SERVICE_STATUS_PROCESS
push 0xc00001fa
call fcn.0041438a
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 0x40f133
call ebx
cmp eax, 0xea
jne 0x40f1c4
xor ebx, ebx
cmp dword [esp + 0x14], ebx
jbe 0x40f1b1
mov ebp, edi
lea ecx, [ecx]
call fcn.0040db40
mov esi, eax
test esi, esi
je 0x40f203
mov edx, dword [ebp]
push edx
push 0x4218f4
push 0xffffffffffffffff
lea edi, [esi + 2]
push 0x100
push edi
call fcn.0041453f
push 0
push esi
call fcn.0040bc70
add esp, 0x1c
cmp byte [esp + 0x30], 0
jne 0x40f184
cmp word [esi + 0x18416], 0
je 0x40f192
push edi
push 0x4219ec
call fcn.00415602
add esp, 8
push esi
call fcn.0040db80
mov edi, dword [esp + 0x20]
inc ebx
add esp, 4
add ebp, 0x2c
cmp ebx, dword [esp + 0x14]
jb 0x40f140
mov esi, dword [esp + 0x24]
mov ebp, dword [esp + 0x28]
test esi, esi
jne 0x40f240
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x40f0f8
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
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.0041438a
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