Function at 0x40ca90
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 0x40cb21
test edi, edi
je 0x40cb1a
cmp edi, esi
je 0x40cb1a
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 0x40ccf6
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
cmp eax, 0x424
je 0x40cb59
call esi
push eax
call fcn.004020f0
add esp, 4
push eax
push 0x4000021f
call fcn.0041439a
add eax, 0x40
push eax
call fcn.004022a0
add esp, 0xc
xor eax, eax
jmp 0x40ccf6
test edi, edi
je 0x40cb30
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 0x40cc64
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 0x40cbd5
push str.open_service__
push str.ENUM_SERVICE_STATUS_PROCESS
push 0xc00001fa
call fcn.0041439a
add eax, 0x40
push eax
call fcn.004022a0
add esp, 0x10
xor eax, eax
jmp 0x40ccf6
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 0x40cc17
call esi
cmp eax, 0xea
jne 0x40cc54
xor esi, esi
cmp dword [esp + 0x18], esi
jbe 0x40cc44
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 0x40cc7a
inc esi
add edi, 0x2c
cmp esi, dword [esp + 0x18]
jb 0x40cc22
mov edi, dword [esp + 0x24]
test edi, edi
jne 0x40ccdc
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x40cbe0
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 0x40cb41
mov eax, dword [esp + 0x244]
imul esi, esi, 0x2c
mov edx, dword [esi + ebp]
mov esi, dword [esp + 0x28]
push edx
push 0x421914
push 0xffffffffffffffff
push eax
push esi
call fcn.0041454f
add esp, 0x14
push ebp
push 0
test eax, eax
jge 0x40ccc0
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 0x40cbb8
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 0x40cced
mov edx, dword [esp + 0x23c]
mov eax, dword [esp + 0x10]
push 0
push 0
push edx
push eax
push ebx
call fcn.0040ca90
add esp, 0x14
mov ecx, dword [esp + 0x22c]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00414aec
add esp, 0x220
ret