Function at 0x40e460
Capabilities:
Enumerate services

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x47f641
push eax
mov eax, 0x1048
mov dword fs:[0], esp
call fcn.0047e2c0
push ebx
push esi
mov ebx, ecx
xor esi, esi
push edi
lea ecx, [esp + 0xc]
mov dword [esp + 0x20], esi
call sub.MFC42u.DLL_CString::CString_4
lea ecx, [esp + 0x14]
mov dword [esp + 0x105c], esi
call sub.MFC42u.DLL_CString::CString_4
lea ecx, [esp + 0x2c]
mov byte [esp + 0x105c], 1
call sub.MFC42u.DLL_CString::CString_4
push 0xf003f
push esi
push esi
mov byte [esp + 0x1068], 2
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov edi, eax
cmp edi, esi
mov dword [esp + 0x24], edi
je 0x40e776
lea eax, [esp + 0x20]
push ebp
lea ecx, [esp + 0x1c]
mov esi, dword [sym.imp.ADVAPI32.dll_EnumServicesStatusW]
push eax
lea edx, [esp + 0x18]
push ecx
push edx
lea eax, [esp + 0x40]
push 0x24
push eax
push 3
push 0x30
push edi
call esi
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xea
jne 0x40e76e
mov eax, dword [esp + 0x14]
add eax, 0x24
mov dword [esp + 0x14], eax
lea ecx, [eax + eax*8]
shl ecx, 2
push ecx
call sub.MFC42u.DLL_operatornew
mov ebp, eax
add esp, 4
test ebp, ebp
mov dword [esp + 0x2c], ebp
je 0x40e76e
lea edx, [esp + 0x24]
lea eax, [esp + 0x1c]
push edx
mov edx, dword [esp + 0x18]
lea ecx, [esp + 0x18]
push eax
push ecx
push edx
push ebp
push 3
push 0x30
push edi
mov dword [ebx + 0x10c], ebp
call esi
cmp eax, 1
jne 0x40e75b
mov eax, dword [esp + 0x1c]
xor esi, esi
test eax, eax
jbe 0x40e75b
lea edi, [ebx + 0xa0]
add ebp, 0xc
mov eax, dword [ebp - 0xc]
push 0
push 0
push 0
push 0
push eax
push esi
push 1
mov ecx, edi
call sub.MFC42u.DLL_CListCtrl::InsertItem
push 0
push 0
push 0
push 0
push 0
push 4
push 0
push esi
mov ecx, edi
call sub.MFC42u.DLL_CListCtrl::SetItem
mov eax, dword [ebp]
cmp eax, 7
ja 0x40e5ae
test eax, eax
jne 0x40e5b5
mov dword [ebp], 8
mov eax, dword [ebp]
dec eax
and eax, 7
mov dword [ebp], eax
mov ecx, dword [0x513e5c]
lea edx, [ecx + eax*2]
mov ecx, edi
add eax, edx
mov eax, dword [eax*4 + 0x49f620]
push eax
push 1
push esi
call sub.MFC42u.DLL_CListCtrl::SetItemText
mov ecx, dword [ebp - 0xc]
mov edx, dword [esp + 0x28]
push 1
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
test eax, eax
mov dword [esp + 0x20], eax
je 0x40e743
lea ecx, [esp + 0x14]
lea edx, [esp + 0x58]
push ecx
push 0x1000
push edx
push eax
call dword [sym.imp.ADVAPI32.dll_QueryServiceConfigW]
test eax, eax
je 0x40e738
mov eax, dword [esp + 0x5c]
mov byte [esp + 0x1057], 0
cmp eax, 4
mov byte [esp + 0x1056], 0
jbe 0x40e639
mov eax, 4
mov dword [esp + 0x5c], eax
mov ecx, dword [0x513e5c]
lea edx, [ecx + eax*2]
mov ecx, edi
add eax, edx
mov eax, dword [eax*4 + 0x49f680]
push eax
push 2
push esi
call sub.MFC42u.DLL_CListCtrl::SetItemText
mov ecx, dword [esp + 0x64]
lea edx, [esp + 0x10]
push ecx
push 0x49e1d8
push edx
call sub.MFC42u.DLL_CString::Format
add esp, 0xc
lea eax, [esp + 0x10]
mov ecx, ebx
push eax
call fcn.0040eb20
mov ecx, dword [esp + 0x10]
push ecx
push 4
push esi
mov ecx, edi
call sub.MFC42u.DLL_CListCtrl::SetItemText
lea edx, [esp + 0x10]
mov ecx, ebx
push edx
call fcn.0040ec60
mov eax, dword [ebx]
lea ecx, [esp + 0x18]
lea edx, [esp + 0x10]
push ecx
push edx
mov ecx, ebx
call dword [eax + 0xf0]
mov eax, dword [esp + 0x18]
mov ecx, edi
push eax
push 5
push esi
call sub.MFC42u.DLL_CListCtrl::SetItemText
mov edx, dword [ebx]
lea eax, [esp + 0x18]
push eax
mov ecx, ebx
call dword [edx + 0x114]
test eax, eax
jne 0x40e6db
push 3
push eax
push eax
push eax
push eax
push 4
push eax
push esi
mov ecx, edi
call sub.MFC42u.DLL_CListCtrl::SetItem
mov eax, dword [esp + 0x20]
lea ecx, [esp + 0x14]
push ecx
lea edx, [esp + 0x5c]
push 0x1000
push edx
push 1
push eax
call dword [sym.imp.ADVAPI32.dll_QueryServiceConfig2W]
test eax, eax
je 0x40e71a
mov ecx, dword [esp + 0x58]
mov byte [esp + 0x1057], 0
push ecx
push 3
push esi
mov ecx, edi
mov byte [esp + 0x1062], 0
call sub.MFC42u.DLL_CListCtrl::SetItemText
push 0x513d78
push 6
push esi
mov ecx, edi
call sub.MFC42u.DLL_CListCtrl::SetItemText
push 0x513d78
push 7
push esi
mov ecx, edi
call sub.MFC42u.DLL_CListCtrl::SetItemText
mov edx, dword [esp + 0x20]
push edx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, dword [esp + 0x1c]
inc esi
add ebp, 0x24
cmp esi, eax
jb 0x40e576
mov edi, dword [esp + 0x28]
mov ebp, dword [esp + 0x2c]
push ebp
mov dword [ebx + 0x10c], 0
call sub.MFC42u.DLL_operatordelete
add esp, 4
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
pop ebp
lea ecx, [esp + 0x2c]
mov byte [esp + 0x105c], 1
call sub.MFC42u.DLL_CString::CString
lea ecx, [esp + 0x14]
mov byte [esp + 0x105c], 0
call sub.MFC42u.DLL_CString::CString
lea ecx, [esp + 0xc]
mov dword [esp + 0x105c], 0xffffffff
call sub.MFC42u.DLL_CString::CString
mov ecx, dword [esp + 0x1054]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
add esp, 0x1054
ret