Function at 0x414680
Capabilities:
Enumerate services

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x4a2f41
push eax
mov eax, 0x1048
mov dword fs:[0], esp
call fcn.004a15e0
push ebp
push esi
mov ebp, ecx
xor esi, esi
push edi
lea ecx, [esp + 0xc]
mov dword [esp + 0x20], esi
call sub.MFC42u.DLL_CString::CString_5
lea ecx, [esp + 0x14]
mov dword [esp + 0x105c], esi
call sub.MFC42u.DLL_CString::CString_5
lea ecx, [esp + 0x2c]
mov byte [esp + 0x105c], 1
call sub.MFC42u.DLL_CString::CString_5
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 0x414977
lea eax, [esp + 0x20]
push ebx
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 0x41496f
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 ebx, eax
add esp, 4
test ebx, ebx
mov dword [esp + 0x2c], ebx
je 0x41496f
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 ebx
push 3
push 0x30
push edi
mov dword [ebp + 0x120], ebx
call esi
cmp eax, 1
jne 0x41495c
mov eax, dword [esp + 0x1c]
xor esi, esi
test eax, eax
jbe 0x41495c
lea edi, [ebp + 0xa0]
add ebx, 0xc
mov eax, dword [ebx - 0xc]
mov ecx, edi
push eax
push esi
call fcn.00403850
push 0
push esi
mov ecx, edi
call fcn.00404310
mov eax, dword [ebx]
cmp eax, 7
ja 0x4147b7
test eax, eax
jne 0x4147bd
mov dword [ebx], 8
mov eax, dword [ebx]
dec eax
and eax, 7
mov dword [ebx], eax
mov ecx, dword [0x5401c4]
lea edx, [ecx + eax*2]
mov ecx, edi
add eax, edx
mov eax, dword [eax*4 + 0x4c9250]
push eax
push 1
push esi
call fcn.00403f00
mov ecx, dword [ebx - 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 0x414944
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 0x414939
mov eax, dword [esp + 0x5c]
mov byte [esp + 0x1057], 0
cmp eax, 4
mov byte [esp + 0x1056], 0
jbe 0x41483f
mov eax, 4
mov dword [esp + 0x5c], eax
mov ecx, dword [0x5401c4]
lea edx, [ecx + eax*2]
mov ecx, edi
add eax, edx
mov eax, dword [eax*4 + 0x4c92b0]
push eax
push 2
push esi
call fcn.00403f00
mov ecx, dword [esp + 0x64]
lea edx, [esp + 0x10]
push ecx
push 0x4c61d8
push edx
call sub.MFC42u.DLL_CString::Format
add esp, 0xc
lea eax, [esp + 0x10]
mov ecx, ebp
push eax
call fcn.00414d20
mov ecx, dword [esp + 0x10]
push ecx
push 4
push esi
mov ecx, edi
call fcn.00403f00
lea edx, [esp + 0x10]
mov ecx, ebp
push edx
call fcn.00414e60
mov eax, dword [ebp]
lea ecx, [esp + 0x18]
lea edx, [esp + 0x10]
push ecx
push edx
mov ecx, ebp
call dword [eax + 0xf0]
mov eax, dword [esp + 0x18]
mov ecx, edi
push eax
push 5
push esi
call fcn.00403f00
mov edx, dword [ebp]
lea eax, [esp + 0x18]
push eax
mov ecx, ebp
call dword [edx + 0x118]
test eax, eax
jne 0x4148dc
push 3
push esi
mov ecx, edi
call fcn.00404310
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 0x41491b
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 fcn.00403f00
push 0x540014
push 6
push esi
mov ecx, edi
call fcn.00403f00
push 0x540014
push 7
push esi
mov ecx, edi
call fcn.00403f00
mov edx, dword [esp + 0x20]
push edx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, dword [esp + 0x1c]
inc esi
add ebx, 0x24
cmp esi, eax
jb 0x414796
mov edi, dword [esp + 0x28]
mov ebx, dword [esp + 0x2c]
push ebx
mov dword [ebp + 0x120], 0
call sub.MFC42u.DLL_operatordelete
add esp, 4
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
pop ebx
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 ebp
mov dword fs:[0], ecx
add esp, 0x1054
ret