Function at 0x40ca80
Capabilities:
Enumerate services

Disassembly:
sub esp, 0x220
mov eax, dword [0x428930]
xor eax, esp
mov dword [esp + 0x21c], eax
mov eax, dword [esp + 0x22c]
push ebx
mov ebx, dword [esp + 0x228]
push ebp
push esi
mov esi, dword [esp + 0x234]
push edi
mov edi, dword [esp + 0x240]
push eax
push esi
push ebx
mov dword [esp + 0x1c], esi
mov dword [esp + 0x34], edi
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov ebp, eax
test ebp, ebp
je 0x40cb11
test edi, edi
je 0x40cb0a
cmp edi, esi
je 0x40cb0a
lea ecx, [esp + 0x10]
push ecx
lea edx, [esp + 0x30]
push edx
push esi
push ebx
mov dword [esp + 0x20], 0x100
call dword [sym.imp.ADVAPI32.dll_GetServiceDisplayNameW]
mov eax, dword [esp + 0x244]
lea ecx, [esp + 0x14]
push ecx
push edi
lea edx, [esp + 0x34]
push edx
push ebx
mov dword [esp + 0x24], eax
call dword [sym.imp.ADVAPI32.dll_GetServiceKeyNameW]
mov eax, ebp
jmp 0x40cce6
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
cmp eax, 0x424
je 0x40cb49
call esi
push eax
call fcn.004020f0
add esp, 4
push eax
push 0x4000021f
call fcn.0041438a
add eax, 0x40
push eax
call fcn.004022a0
add esp, 0xc
xor eax, eax
jmp 0x40cce6
test edi, edi
je 0x40cb20
push 0
lea eax, [esp + 0x24]
push eax
lea ecx, [esp + 0x20]
push ecx
lea edx, [esp + 0x28]
push edx
push 0
push 0
push 3
push 0x3b
push 0
push ebx
mov dword [esp + 0x48], 0
call dword [sym.imp.ADVAPI32.dll_EnumServicesStatusExW]
call esi
cmp eax, 0xea
jne 0x40cc54
mov eax, dword [esp + 0x1c]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ebp, eax
test ebp, ebp
jne 0x40cbc5
push str.open_service__
push str.ENUM_SERVICE_STATUS_PROCESS
push 0xc00001fa
call fcn.0041438a
add eax, 0x40
push eax
call fcn.004022a0
add esp, 0x10
xor eax, eax
jmp 0x40cce6
mov ecx, dword [esp + 0x1c]
mov dword [esp + 0x14], ecx
lea ecx, [ecx]
push 0
lea edx, [esp + 0x24]
push edx
mov edx, dword [esp + 0x1c]
lea eax, [esp + 0x20]
push eax
lea ecx, [esp + 0x28]
push ecx
push edx
push ebp
push 3
push 0x3b
push 0
push ebx
call dword [sym.imp.ADVAPI32.dll_EnumServicesStatusExW]
mov edi, eax
mov dword [esp + 0x24], edi
test edi, edi
jne 0x40cc07
call esi
cmp eax, 0xea
jne 0x40cc44
xor esi, esi
cmp dword [esp + 0x18], esi
jbe 0x40cc34
lea edi, [ebp + 4]
mov eax, dword [esp + 0x10]
mov ecx, dword [edi]
push eax
push ecx
call fcn.004082b0
add esp, 8
test eax, eax
jne 0x40cc6a
inc esi
add edi, 0x2c
cmp esi, dword [esp + 0x18]
jb 0x40cc12
mov edi, dword [esp + 0x24]
test edi, edi
jne 0x40cccc
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x40cbd0
push ebp
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
call esi
push eax
call fcn.004020f0
add esp, 4
push eax
push 0x40000220
jmp 0x40cb31
mov eax, dword [esp + 0x244]
imul esi, esi, 0x2c
mov edx, dword [esi + ebp]
mov esi, dword [esp + 0x28]
push edx
push 0x4218f4
push 0xffffffffffffffff
push eax
push esi
call fcn.0041453f
add esp, 0x14
push ebp
push 0
test eax, eax
jge 0x40ccb0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
push str.open_service__
push str.canonical_name
jmp 0x40cba8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov ecx, dword [esp + 0x23c]
push 0
push 0
push ecx
push esi
jmp 0x40ccdd
mov edx, dword [esp + 0x23c]
mov eax, dword [esp + 0x10]
push 0
push 0
push edx
push eax
push ebx
call fcn.0040ca80
add esp, 0x14
mov ecx, dword [esp + 0x22c]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00414adc
add esp, 0x220
ret