Function at 0x40688c
Capabilities:
Enumerate services

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x410057
mov eax, dword fs:[0]
push eax
mov eax, 0x1202c
call fcn.0040e8e0
push ebx
push esi
push edi
mov eax, dword [0x41a028]
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.00406d85
xor esi, esi
lea ecx, [ebp - 0x1c]
mov dword [ebp - 0x14], esi
mov dword [ebp - 0x34], esi
mov dword [ebp - 0x30], esi
call dword [0x411784]
lea ecx, [ebp - 0x18]
mov dword [ebp - 4], esi
call dword [0x411784]
push 0x80000004
push esi
push esi
mov byte [ebp - 4], 1
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
cmp eax, esi
jne 0x406923
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 0x406960
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 0x406913
cmp dword [ebp - 0x14], esi
mov dword [ebp - 0x10], esi
jle 0x4069de
lea edi, [ebp - 0x12038]
lea esi, [ebp - 0x2c]
call fcn.0040681b
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.00406c06
test eax, eax
je 0x4069b1
mov eax, dword [ebp - 0x38]
mov ebx, esi
call fcn.00406c88
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 0x40696e
xor esi, esi
inc esi
jmp 0x40694a