Function at 0x417390
Capabilities:
Enumerate services

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x4a8381
push eax
mov eax, 0x1048
mov dword fs:[0], esp
call fcn.004a6750
push ebx
push esi
push edi
mov edi, ecx
xor esi, esi
lea ecx, [esp + 0x10]
mov dword [esp + 0x1c], edi
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 + 0x28]
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 ebx, eax
cmp ebx, esi
mov dword [esp + 0x24], ebx
je 0x417689
lea eax, [esp + 0x20]
push ebp
lea ecx, [esp + 0x1c]
mov esi, dword [sym.imp.ADVAPI32.dll_EnumServicesStatusW]
push eax
lea edx, [esp + 0x14]
push ecx
push edx
lea eax, [esp + 0x40]
push 0x24
push eax
push 3
push 0x30
push ebx
call esi
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xea
jne 0x417681
mov eax, dword [esp + 0x10]
add eax, 0x24
mov dword [esp + 0x10], 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 + 0x30], ebp
je 0x417681
lea edx, [esp + 0x24]
lea eax, [esp + 0x1c]
push edx
mov edx, dword [esp + 0x14]
lea ecx, [esp + 0x14]
push eax
push ecx
push edx
push ebp
push 3
push 0x30
push ebx
mov dword [edi + 0x120], ebp
call esi
cmp eax, 1
jne 0x41766e
mov eax, dword [esp + 0x1c]
xor esi, esi
test eax, eax
jbe 0x41766e
add edi, 0xa0
add ebp, 0xc
jmp 0x4174b0
mov ebx, dword [esp + 0x28]
mov eax, dword [ebp - 0xc]
mov ecx, edi
push eax
push esi
call fcn.00403850
push 0
push esi
mov ecx, edi
call fcn.00404310
mov eax, dword [ebp]
cmp eax, 7
ja 0x4174d2
test eax, eax
jne 0x4174d9
mov dword [ebp], 8
mov eax, dword [ebp]
dec eax
and eax, 7
mov dword [ebp], eax
mov ecx, dword [0x545f7c]
lea edx, [ecx + eax*2]
mov ecx, edi
add eax, edx
mov eax, dword [eax*4 + 0x4cee90]
push eax
push 1
push esi
call fcn.00403f00
mov ecx, dword [ebp - 0xc]
push 1
push ecx
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov ebx, eax
test ebx, ebx
je 0x417652
lea edx, [esp + 0x10]
lea eax, [esp + 0x58]
push edx
push 0x1000
push eax
push ebx
call dword [sym.imp.ADVAPI32.dll_QueryServiceConfigW]
test eax, eax
je 0x41764b
mov eax, dword [esp + 0x5c]
mov byte [esp + 0x1057], 0
cmp eax, 4
mov byte [esp + 0x1056], 0
jbe 0x417557
mov eax, 4
mov dword [esp + 0x5c], eax
mov ecx, dword [0x545f7c]
lea edx, [ecx + eax*2]
mov ecx, edi
add eax, edx
mov eax, dword [eax*4 + 0x4ceef0]
push eax
push 2
push esi
call fcn.00403f00
mov ecx, dword [esp + 0x64]
lea edx, [esp + 0x14]
push ecx
push 0x4cb1f8
push edx
call sub.MFC42u.DLL_CString::Format
mov ecx, dword [esp + 0x2c]
add esp, 0xc
lea eax, [esp + 0x14]
push eax
call fcn.00417a30
mov ecx, dword [esp + 0x14]
push ecx
push 4
push esi
mov ecx, edi
call fcn.00403f00
mov ecx, dword [esp + 0x20]
lea edx, [esp + 0x14]
push edx
call fcn.00417b70
lea eax, [esp + 0x18]
lea ecx, [esp + 0x14]
push eax
push ecx
call fcn.0040ab80
mov edx, dword [esp + 0x20]
add esp, 8
mov ecx, edi
push edx
push 5
push esi
call fcn.00403f00
lea eax, [esp + 0x18]
push eax
call fcn.0040b4a0
add esp, 4
test eax, eax
jne 0x4175f2
push 3
push esi
mov ecx, edi
call fcn.00404310
lea ecx, [esp + 0x10]
lea edx, [esp + 0x58]
push ecx
push 0x1000
push edx
push 1
push ebx
call dword [sym.imp.ADVAPI32.dll_QueryServiceConfig2W]
test eax, eax
je 0x41762d
mov eax, dword [esp + 0x58]
mov ecx, edi
push eax
push 3
push esi
mov byte [esp + 0x1063], 0
mov byte [esp + 0x1062], 0
call fcn.00403f00
push 0x545dc4
push 6
push esi
mov ecx, edi
call fcn.00403f00
push 0x545dc4
push 7
push esi
mov ecx, edi
call fcn.00403f00
push ebx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, dword [esp + 0x1c]
inc esi
add ebp, 0x24
cmp esi, eax
jb 0x4174ac
mov edi, dword [esp + 0x20]
mov ebx, dword [esp + 0x28]
mov ebp, dword [esp + 0x30]
push ebp
mov dword [edi + 0x120], 0
call sub.MFC42u.DLL_operatordelete
add esp, 4
push ebx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
pop ebp
lea ecx, [esp + 0x28]
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 + 0x10]
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