Function at 0x4020f0
Capabilities:
Enumerate services
Query service configuration

Disassembly:
push 0xffffffffffffffff
push 0x406983
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x68
push ebx
push esi
mov esi, ecx
xor ebx, ebx
push edi
lea eax, [esp + 0x28]
push ebx
lea ecx, [esp + 0x14]
push eax
mov eax, dword [esi + 0x50]
lea edx, [esp + 0x20]
push ecx
mov ecx, dword [esi + 0x4c]
push edx
push ebx
push ebx
push 3
push eax
or edi, 0xffffffff
push ebx
push ecx
mov dword [esi + 0x68], edi
mov dword [esi + 0x64], edi
mov dword [esp + 0x50], ebx
mov dword [esp + 0x38], ebx
mov dword [esp + 0x40], ebx
call dword [sym.imp.ADVAPI32.dll_EnumServicesStatusExA]
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xea
je 0x4021b8
lea edx, [esp + 0x20]
mov ecx, esi
push edx
call fcn.004032a0
push eax
lea eax, [esp + 0x28]
push 0x40a2cc
push eax
mov dword [esp + 0x88], ebx
call sub.MFC42.DLL_operator
mov eax, dword [eax]
push 0x10
push ebx
push eax
mov ecx, esi
mov byte [esp + 0x88], 1
call sub.MFC42.DLL_CWnd::MessageBoxA
lea ecx, [esp + 0x24]
mov byte [esp + 0x7c], bl
call fcn.00405ea6
lea ecx, [esp + 0x20]
mov dword [esp + 0x7c], edi
call fcn.00405ea6
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x68]
mov dword fs:[0], ecx
add esp, 0x74
ret
push ebp
call sub.MFC42.DLL_AfxGetModuleState
mov eax, dword [eax + 4]
mov ecx, eax
mov dword [esp + 0x34], eax
call sub.MFC42.DLL_CCmdTarget::BeginWaitCursor
mov ecx, dword [0x40a1c0]
mov eax, dword [esi + 0x50]
cmp ecx, eax
mov dword [esp + 0x24], ebx
mov dword [esp + 0x28], ebx
mov dword [esp + 0x20], ebx
jne 0x402339
mov edx, dword [esi + 0x20]
mov ebp, dword [sym.imp.USER32.dll_SendMessageA]
push ebx
push ebx
push 0x1027
push edx
call ebp
mov edi, eax
mov eax, dword [esi + 0x20]
push ebx
push ebx
push 0x1028
push eax
mov dword [esp + 0x34], edi
call ebp
cmp eax, ebx
je 0x40221b
lea ecx, [edi + eax - 1]
mov dword [esp + 0x24], ecx
mov edx, dword [esi + 0x20]
push ebx
push ebx
push 0x1032
push edx
call ebp
mov edi, eax
lea eax, [edi*4 + 4]
push eax
call sub.MFC42.DLL_operatornew
add esp, 4
mov dword [esp + 0x30], eax
cmp eax, ebx
mov dword [esp + 0x80], 2
je 0x402265
push fcn.00405ea6
push sub.MFC42.DLL_CString::CString
lea ebx, [eax + 4]
push edi
push 4
push ebx
mov dword [eax], edi
call fcn.004064b4
mov ecx, dword [esi + 0x20]
push 2
push 0xffffffffffffffff
push 0x100c
push ecx
mov dword [esp + 0x90], 0xffffffff
mov dword [esp + 0x38], ebx
call ebp
lea edi, [eax + 1]
test edi, edi
je 0x4022ee
mov edx, dword [esi + 0x20]
lea ebp, [edi - 1]
push 2
push ebp
push 0x100c
push edx
call dword [sym.imp.USER32.dll_SendMessageA]
lea edi, [eax + 1]
push 0
lea eax, [esp + 0x14]
push ebp
push eax
mov ecx, esi
call sub.MFC42.DLL_CListCtrl::GetItemText
mov edx, dword [esp + 0x20]
mov ecx, ebx
inc edx
push eax
mov dword [esp + 0x84], 3
mov dword [esp + 0x24], edx
add ebx, 4
call fcn.00405f0c
lea ecx, [esp + 0x10]
mov dword [esp + 0x80], 0xffffffff
call fcn.00405ea6
test edi, edi
jne 0x40228a
mov ebp, dword [sym.imp.USER32.dll_SendMessageA]
xor ebx, ebx
mov ecx, dword [esi + 0x50]
push ebx
mov dword [0x40a1c0], ecx
mov ecx, esi
call sub.MFC42.DLL_CWnd::ShowWindow
mov edx, dword [esi + 0x20]
push ebx
push ebx
push 0x1009
push edx
call ebp
mov eax, dword [esp + 0x1c]
push eax
call sub.MFC42.DLL_operatornew
mov edi, eax
add esp, 4
cmp edi, ebx
mov dword [esp + 0x30], edi
jne 0x402341
push 0x10
push ebx
push 0x40a2b0
mov ecx, esi
call sub.MFC42.DLL_CWnd::MessageBoxA
jmp 0x4025e2
mov ebp, dword [sym.imp.USER32.dll_SendMessageA]
jmp 0x4022f0
lea ecx, [esp + 0x2c]
push ebx
lea edx, [esp + 0x18]
push ecx
mov ecx, dword [esp + 0x24]
lea eax, [esp + 0x24]
push edx
mov edx, dword [esi + 0x50]
push eax
mov eax, dword [esi + 0x4c]
push ecx
push edi
push 3
push edx
push ebx
push eax
call dword [sym.imp.ADVAPI32.dll_EnumServicesStatusExA]
mov eax, dword [esp + 0x14]
mov ecx, eax
dec eax
test ecx, ecx
mov dword [esp + 0x14], eax
je 0x4025d9
lea ebp, [edi + 8]
jmp 0x402382
xor ebx, ebx
mov eax, dword [ebp - 8]
push ebx
push ebx
push ebx
push ebx
push eax
push 0x7fffffff
push 1
mov ecx, esi
call sub.MFC42.DLL_CListCtrl::InsertItem
mov edx, dword [ebp - 4]
mov edi, eax
push edx
push 1
push edi
mov ecx, esi
mov dword [esp + 0x1c], edi
call sub.MFC42.DLL_CListCtrl::SetItemText
mov eax, dword [esp + 0x20]
test eax, eax
jle 0x4023ee
mov edi, dword [esp + 0x28]
mov eax, dword [ebp - 8]
mov ecx, dword [edi]
push eax
push ecx
call dword [sym.imp.MSVCRT.dll__mbsicmp]
add esp, 8
test eax, eax
je 0x4023da
mov eax, dword [esp + 0x20]
inc ebx
add edi, 4
cmp ebx, eax
jl 0x4023b8
jmp 0x4023ea
mov eax, dword [esp + 0x10]
push 2
push 2
push eax
mov ecx, esi
call sub.MFC42.DLL_CListCtrl::SetItemState
mov edi, dword [esp + 0x10]
mov edx, dword [ebp]
and dh, 0xfe
mov eax, edx
mov dword [ebp], edx
dec eax
cmp eax, 0x1f
ja case.0x402407.5
xor ecx, ecx
mov cl, byte [eax + 0x4026b0]
jmp dword [ecx*4 + 0x40269c]
mov eax, 0x40a2a0
jmp 0x40242f
mov eax, 0x40a294
jmp 0x40242f
mov eax, 0x40a284
jmp 0x40242f
mov eax, 0x40a274
jmp 0x40242f
mov eax, 0x40a26c
push eax
push 2
push edi
mov ecx, esi
call sub.MFC42.DLL_CListCtrl::SetItemText
mov eax, dword [ebp + 4]
add eax, 0xfffffffe
cmp eax, 5
ja case.0x402445.5
jmp dword [eax*4 + 0x4026d0]
mov eax, 0x40a264
jmp 0x402474
mov eax, 0x40a25c
jmp 0x402474
mov eax, 0x40a250
jmp 0x402474
mov eax, 0x40a244
jmp 0x402474
mov eax, 0x40a238
jmp 0x402474
mov eax, 0x40a740
push eax
push 3
push edi
mov ecx, esi
call sub.MFC42.DLL_CListCtrl::SetItemText
mov eax, dword [ebp + 0x1c]
test eax, eax
je 0x4024a6
lea edx, [esp + 0x38]
push 0xa
push edx
push eax
call dword [sym.imp.MSVCRT.dll__ultoa]
add esp, 0xc
lea eax, [esp + 0x38]
mov ecx, esi
push eax
push 4
push edi
call sub.MFC42.DLL_CListCtrl::SetItemText
mov ecx, dword [ebp - 8]
mov edx, dword [esi + 0x4c]
push 0x80000000
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov ebx, eax
test ebx, ebx
je 0x4025b9
lea eax, [esp + 0x18]
mov dword [esp + 0x18], 0
push eax
push 0
push 0
push ebx
call dword [sym.imp.ADVAPI32.dll_QueryServiceConfigA]
mov eax, dword [esp + 0x18]
test eax, eax
je 0x402567
push eax
call sub.MFC42.DLL_operatornew
mov edx, dword [esp + 0x1c]
add esp, 4
lea ecx, [esp + 0x18]
mov edi, eax
push ecx
push edx
push edi
push ebx
call dword [sym.imp.ADVAPI32.dll_QueryServiceConfigA]
mov ecx, dword [edi + 4]
mov eax, 0x40a740
cmp ecx, 4
ja case.default.0x402511
jmp dword [ecx*4 + 0x4026e8]
mov eax, 0x40a22c
jmp case.default.0x402511
mov eax, 0x40a220
jmp case.default.0x402511
mov eax, 0x40a214
jmp case.default.0x402511
mov eax, 0x40a208
jmp case.default.0x402511
mov eax, 0x40a1fc
push eax
mov eax, dword [esp + 0x14]
push 5
push eax
mov ecx, esi
call sub.MFC42.DLL_CListCtrl::SetItemText
mov ecx, dword [edi + 0xc]
mov edx, dword [esp + 0x10]
push ecx
push 7
push edx
mov ecx, esi
call sub.MFC42.DLL_CListCtrl::SetItemText
push edi
call sub.MFC42.DLL_operatordelete
mov edi, dword [esp + 0x14]
add esp, 4
push 0x1000
call sub.MFC42.DLL_operatornew
add esp, 4
mov dword [esp + 0x10], eax
test eax, eax
je 0x4025b2
lea ecx, [esp + 0x18]
push ecx
push 0x1000
push eax
push 1
push ebx
call dword [sym.imp.ADVAPI32.dll_QueryServiceConfig2A]
test eax, eax
je 0x4025a5
mov edx, dword [esp + 0x10]
mov ecx, esi
mov eax, dword [edx]
push eax
push 6
push edi
call sub.MFC42.DLL_CListCtrl::SetItemText
mov ecx, dword [esp + 0x10]
push ecx
call sub.MFC42.DLL_operatordelete
add esp, 4
push ebx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, dword [esp + 0x14]
add ebp, 0x2c
mov edx, eax
dec eax
test edx, edx
mov dword [esp + 0x14], eax
jne 0x402380
mov ebp, dword [sym.imp.USER32.dll_SendMessageA]
mov edi, dword [esp + 0x30]
push edi
call sub.MFC42.DLL_operatordelete
add esp, 4
mov edi, 2
mov eax, dword [esi + 0x20]
push 0xfffe
push edi
push 0x101e
push eax
call ebp
inc edi
cmp edi, 4
jle 0x4025e7
mov ecx, esi
call fcn.00405250
mov ebx, dword [esi + 0x40]
mov eax, dword [ebx + 0x54]
test eax, eax
je 0x40262f
xor edi, edi
mov eax, dword [ebx + 0x54]
mov edx, dword [esi + 0x20]
mov ecx, edi
push 0xfffe
add ecx, eax
push ecx
push 0x101e
push edx
call ebp
inc edi
cmp edi, 3
jl 0x402611
mov ecx, esi
call fcn.004040b0
mov eax, dword [esp + 0x24]
mov ecx, dword [esi + 0x20]
push 1
push eax
push 0x1013
push ecx
call ebp
push 5
mov ecx, esi
call sub.MFC42.DLL_CWnd::ShowWindow
mov eax, dword [esp + 0x28]
pop ebp
test eax, eax
je 0x402677
mov edx, dword [eax - 4]
lea edi, [eax - 4]
push fcn.00405ea6
push edx
push 4
push eax
call fcn.004063c0
push edi
call sub.MFC42.DLL_operatordelete
add esp, 4
mov ecx, esi
call fcn.00404a50
mov ecx, dword [esp + 0x30]
call sub.MFC42.DLL_CCmdTarget::EndWaitCursor
mov ecx, dword [esp + 0x74]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
add esp, 0x74
ret