Function at 0x406f91
Capabilities:
Enumerate services

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x41140f
mov eax, dword fs:[0]
push eax
mov eax, 0x1202c
call fcn.0040fc40
push ebx
push esi
push edi
mov eax, dword [0x41b028]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
add edi, 4
xor eax, eax
mov dword [ebp - 0x38], edi
call fcn.0040748a
xor esi, esi
lea ecx, [ebp - 0x1c]
mov dword [ebp - 0x14], esi
mov dword [ebp - 0x34], esi
mov dword [ebp - 0x30], esi
call dword [0x4127a8]
lea ecx, [ebp - 0x18]
mov dword [ebp - 4], esi
call dword [0x4127a8]
push 0x80000004
push esi
push esi
mov byte [ebp - 4], 1
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
cmp eax, esi
jne 0x407028
lea ecx, [ebp - 0x18]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
lea ecx, [ebp - 0x1c]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
leave
ret
lea ecx, [ebp - 0x30]
push ecx
lea ecx, [ebp - 0x14]
push ecx
lea ecx, [ebp - 0x34]
push ecx
push 0x12000
lea ecx, [ebp - 0x12038]
push ecx
push 3
push 0x30
push eax
call dword [sym.imp.ADVAPI32.dll_EnumServicesStatusW]
test eax, eax
jne 0x407065
lea ecx, [ebp - 0x18]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
lea ecx, [ebp - 0x1c]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
mov eax, esi
jmp 0x407018
cmp dword [ebp - 0x14], esi
mov dword [ebp - 0x10], esi
jle 0x4070e3
lea edi, [ebp - 0x12038]
lea esi, [ebp - 0x2c]
call fcn.00406f20
mov byte [ebp - 4], 2
push dword [edi + 4]
lea ecx, [ebp - 0x28]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::operator_1]
push dword [edi]
mov ecx, esi
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::operator_1]
push dword [edi]
lea ecx, [ebp - 0x24]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::operator_1]
lea ebx, [ebp - 0x24]
call fcn.0040730b
test eax, eax
je 0x4070b6
mov eax, dword [ebp - 0x38]
mov ebx, esi
call fcn.0040738d
lea ecx, [ebp - 0x24]
mov byte [ebp - 4], 1
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
lea ecx, [ebp - 0x28]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
lea ecx, [ebp - 0x2c]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
inc dword [ebp - 0x10]
mov eax, dword [ebp - 0x10]
add edi, 0x24
cmp eax, dword [ebp - 0x14]
jl 0x407073
xor esi, esi
inc esi
jmp 0x40704f