Function at 0x40cab0
Capabilities:
Enumerate services

Disassembly:
sub esp, 0x220
mov eax, dword [0x422760]
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 0x40cb41
test edi, edi
je 0x40cb3a
cmp edi, esi
je 0x40cb3a
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 0x40cd15
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
cmp eax, 0x424
je 0x40cb79
call esi
push eax
call fcn.004052c0
add esp, 4
push eax
push 0x4000021f
call fcn.0041257c
add eax, 0x40
push eax
call fcn.00405470
add esp, 0xc
xor eax, eax
jmp 0x40cd15
test edi, edi
je 0x40cb50
lea eax, [esp + 0x20]
push eax
lea ecx, [esp + 0x1c]
push ecx
lea edx, [esp + 0x24]
push edx
push 0
push 0
push 3
push 0x3b
push ebx
mov dword [esp + 0x40], 0
call dword [sym.imp.ADVAPI32.dll_EnumServicesStatusW]
call esi
cmp eax, 0xea
jne 0x40cc82
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 0x40cbf1
push str.open_service__
push str.ENUM_SERVICE_STATUS
push 0xc00001fa
call fcn.0041257c
add eax, 0x40
push eax
call fcn.00405470
add esp, 0x10
xor eax, eax
jmp 0x40cd15
mov ecx, dword [esp + 0x1c]
mov dword [esp + 0x14], ecx
lea esp, [esp]
lea edx, [esp + 0x20]
push edx
mov edx, dword [esp + 0x18]
lea eax, [esp + 0x1c]
push eax
lea ecx, [esp + 0x24]
push ecx
push edx
push ebp
push 3
push 0x3b
push ebx
call dword [sym.imp.ADVAPI32.dll_EnumServicesStatusW]
mov edi, eax
mov dword [esp + 0x24], edi
test edi, edi
jne 0x40cc33
call esi
cmp eax, 0xea
jne 0x40cc72
xor esi, esi
cmp dword [esp + 0x18], esi
jbe 0x40cc62
lea edi, [ebp + 4]
mov edi, edi
mov eax, dword [esp + 0x10]
mov ecx, dword [edi]
push eax
push ecx
call fcn.004097b0
add esp, 8
test eax, eax
jne 0x40cc98
inc esi
add edi, 0x24
cmp esi, dword [esp + 0x18]
jb 0x40cc40
mov edi, dword [esp + 0x24]
test edi, edi
jne 0x40ccfb
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x40cc00
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.004052c0
add esp, 4
push eax
push 0x40000220
jmp 0x40cb61
mov ecx, dword [esp + 0x244]
lea edx, [esi + esi*8]
mov eax, dword [ebp + edx*4]
mov esi, dword [esp + 0x28]
push eax
push 0x41d4b4
push 0xffffffffffffffff
push ecx
push esi
call fcn.00412731
add esp, 0x14
push ebp
push 0
test eax, eax
jge 0x40ccdf
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 0x40cbd4
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov edx, dword [esp + 0x23c]
push 0
push 0
push edx
push esi
jmp 0x40cd0c
mov eax, dword [esp + 0x23c]
mov ecx, dword [esp + 0x10]
push 0
push 0
push eax
push ecx
push ebx
call fcn.0040cab0
add esp, 0x14
mov ecx, dword [esp + 0x22c]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00412cdc
add esp, 0x220
ret