Function at 0x40fed0
Capabilities:
Query service status

Disassembly:
push 0xffffffffffffffff
push 0x481380
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x40
push ebx
push ebp
mov ebx, ecx
push esi
push edi
lea ecx, [esp + 0x10]
call sub.MFC42u.DLL_CString::CString_4
lea esi, [ebx + 0xa0]
xor edi, edi
push 2
push 0xffffffffffffffff
mov ecx, esi
mov dword [esp + 0x60], edi
or ebp, 0xffffffff
call fcn.0040b6e0
inc eax
je 0x40ff21
lea ebp, [eax - 1]
push 2
push ebp
mov ecx, esi
call fcn.0040b6e0
mov dword [esp + 0x24], 0x48adf4
mov dword [esp + 0x28], edi
mov byte [esp + 0x58], 1
call dword [sym.imp.USER32.dll_CreatePopupMenu]
push eax
lea ecx, [esp + 0x28]
call sub.MFC42u.DLL_CMenu::Attach
mov eax, dword [0x5166dc]
mov ecx, dword [esp + 0x28]
mov esi, dword [sym.imp.USER32.dll_AppendMenuW]
mov eax, dword [eax*4 + 0x4a1720]
push eax
push 0x85fc
push edi
push ecx
call esi
mov edx, dword [esp + 0x28]
push edi
push edi
push 0x800
push edx
call esi
mov eax, dword [0x5166dc]
mov ecx, dword [esp + 0x28]
mov eax, dword [eax*4 + 0x4a172c]
push eax
push 0x85fd
push edi
push ecx
call esi
mov edx, dword [esp + 0x28]
mov edi, dword [sym.imp.USER32.dll_EnableMenuItem]
push 1
push 0x85fd
push edx
call edi
mov eax, dword [0x5166dc]
mov ecx, dword [esp + 0x28]
mov eax, dword [eax*4 + 0x4a1738]
push eax
push 0x85fe
push 0
push ecx
call esi
mov edx, dword [esp + 0x28]
push 1
push 0x85fe
push edx
call edi
mov eax, dword [0x5166dc]
mov ecx, dword [esp + 0x28]
mov eax, dword [eax*4 + 0x4a1744]
push eax
push 0x85ff
push 0
push ecx
call esi
mov edx, dword [esp + 0x28]
push 1
push 0x85ff
push edx
call edi
mov eax, dword [0x5166dc]
mov ecx, dword [esp + 0x28]
mov eax, dword [eax*4 + 0x4a1750]
push eax
push 0x8600
push 0
push ecx
call esi
mov edx, dword [esp + 0x28]
push 1
push 0x8600
push edx
call edi
mov eax, dword [0x5166dc]
mov eax, dword [eax*4 + 0x4a175c]
push eax
push 0x8601
push 0
mov ecx, dword [esp + 0x34]
push ecx
call esi
mov edx, dword [esp + 0x28]
push 1
push 0x8601
push edx
call edi
mov eax, dword [0x5166dc]
mov ecx, dword [esp + 0x28]
mov eax, dword [eax*4 + 0x4a1768]
push eax
push 0x8602
push 0
push ecx
call esi
mov edx, dword [esp + 0x28]
push 0
push 0x8602
push edx
call edi
mov eax, dword [esp + 0x28]
push 0
push 0
push 0x800
push eax
call esi
mov ecx, dword [0x5166dc]
mov edx, dword [esp + 0x28]
mov eax, dword [ecx*4 + 0x4a1774]
push eax
push 0x8603
push 0
push edx
call esi
mov eax, dword [esp + 0x28]
push 1
push 0x8603
push eax
call edi
mov ecx, dword [0x5166dc]
mov edx, dword [esp + 0x28]
mov eax, dword [ecx*4 + 0x4a1780]
push eax
push 0x8604
push 0
push edx
call esi
mov eax, dword [esp + 0x28]
push 1
push 0x8604
push eax
call edi
mov ecx, dword [0x5166dc]
mov edx, dword [esp + 0x28]
mov eax, dword [ecx*4 + 0x4a178c]
push eax
push 0x8605
push 0
push edx
call esi
mov eax, dword [esp + 0x28]
push 1
push 0x8605
push eax
call edi
test ebp, ebp
jl 0x410270
push 0
lea ecx, [esp + 0x18]
push ebp
push ecx
lea ecx, [ebx + 0xa0]
call sub.MFC42u.DLL_CListCtrl::GetItemText
push eax
lea ecx, [esp + 0x14]
mov byte [esp + 0x5c], 2
call sub.MFC42u.DLL_CString::operator_1
lea ecx, [esp + 0x14]
mov byte [esp + 0x58], 1
call sub.MFC42u.DLL_CString::CString
lea edx, [esp + 0x18]
lea eax, [esp + 0x10]
push edx
push eax
mov ecx, ebx
call fcn.0040fc90
cmp eax, 1
jne 0x4101ae
mov eax, dword [esp + 0x18]
cmp eax, 2
jne 0x41016c
mov ecx, dword [esp + 0x28]
push 0
push 0x8604
push ecx
call edi
mov edx, dword [esp + 0x28]
push 0
push 0x8605
push edx
jmp 0x4101ac
cmp eax, 3
jne 0x41018d
mov eax, dword [esp + 0x28]
push 0
push 0x8603
push eax
call edi
mov ecx, dword [esp + 0x28]
push 0
push 0x8605
push ecx
jmp 0x4101ac
cmp eax, 4
jne 0x4101ae
mov edx, dword [esp + 0x28]
push 0
push 0x8603
push edx
call edi
mov eax, dword [esp + 0x28]
push 0
push 0x8604
push eax
call edi
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
test eax, eax
mov dword [esp + 0x20], eax
je 0x410270
mov ecx, dword [esp + 0x10]
push 5
push ecx
push eax
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
test eax, eax
mov dword [esp + 0x1c], eax
je 0x410265
lea edx, [esp + 0x34]
push edx
push eax
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
je 0x41025a
mov eax, dword [esp + 0x38]
dec eax
je 0x41024c
sub eax, 3
je 0x410214
sub eax, 3
jne 0x41025a
test byte [esp + 0x3c], 2
je 0x410229
push 0
push 0x8600
jmp 0x410222
test byte [esp + 0x3c], 2
je 0x410229
push 0
push 0x85ff
mov eax, dword [esp + 0x30]
push eax
call edi
test byte [esp + 0x3c], 1
je 0x41025a
mov ecx, dword [esp + 0x28]
push 0
push 0x85fe
push ecx
call edi
mov edx, dword [esp + 0x28]
push 0
push 0x8601
push edx
jmp 0x410258
mov eax, dword [esp + 0x28]
push 0
push 0x85fd
push eax
call edi
mov ecx, dword [esp + 0x1c]
push ecx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov edx, dword [esp + 0x20]
push edx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, dword [esp + 0x28]
push 0
push 0
push 0x800
push eax
call esi
mov ecx, dword [0x5166dc]
mov edx, dword [esp + 0x28]
mov eax, dword [ecx*4 + 0x4a1798]
push eax
push 0x8606
push 0
push edx
call esi
mov ecx, dword [esp + 0x28]
xor eax, eax
test ebp, ebp
setl al
mov ebp, eax
push ebp
push 0x8606
push ecx
call edi
mov edx, dword [0x5166dc]
mov eax, dword [edx*4 + 0x4a17a4]
push eax
mov eax, dword [esp + 0x2c]
push 0x8607
push 0
push eax
call esi
mov ecx, dword [esp + 0x28]
push ebp
push 0x8607
push ecx
call edi
mov edx, dword [0x5166dc]
mov eax, dword [edx*4 + 0x4a17b0]
push eax
mov eax, dword [esp + 0x2c]
push 0x8608
push 0
push eax
call esi
mov ecx, dword [ebx + 0xc0]
push 0
push 0
push 0x1004
push ecx
call dword [sym.imp.USER32.dll_SendMessageW]
xor edx, edx
test eax, eax
mov eax, dword [esp + 0x28]
sete dl
push edx
push 0x8608
push eax
call edi
mov ecx, dword [esp + 0x28]
push 0
push 0
push 0x800
push ecx
call esi
mov edx, dword [0x5166dc]
mov eax, dword [edx*4 + 0x4a17bc]
push eax
mov eax, dword [esp + 0x2c]
push 0x8609
push 0
push eax
call esi
mov ecx, dword [esp + 0x28]
push ebp
push 0x8609
push ecx
call edi
mov edx, dword [0x5166dc]
mov eax, dword [edx*4 + 0x4a17c8]
push eax
push 0x860b
mov eax, dword [esp + 0x30]
push 0
push eax
call esi
mov ecx, dword [esp + 0x28]
push ebp
push 0x860b
push ecx
call edi
mov edx, dword [esp + 0x28]
push 0
push 0
push 0x800
push edx
call esi
mov eax, dword [0x5166dc]
mov ecx, dword [esp + 0x28]
mov eax, dword [eax*4 + 0x4a17d4]
push eax
push 0x860a
push 0
push ecx
call esi
mov edx, dword [esp + 0x28]
push ebp
push 0x860a
push edx
call edi
mov eax, dword [0x5166dc]
mov ecx, dword [esp + 0x28]
mov eax, dword [eax*4 + 0x4a17e0]
push eax
push 0x860c
push 0
push ecx
call esi
mov edx, dword [esp + 0x28]
push ebp
push 0x860c
push edx
call edi
mov eax, dword [esp + 0x28]
push 0
push 0
push 0x800
push eax
call esi
mov ecx, dword [0x5166dc]
mov edx, dword [esp + 0x28]
mov eax, dword [ecx*4 + 0x4a17ec]
push eax
push 0x860d
push 0
push edx
call esi
mov eax, dword [ebx + 0xc0]
mov ebp, dword [sym.imp.USER32.dll_SendMessageW]
push 0
push 0
push 0x1032
push eax
call ebp
mov edx, dword [esp + 0x28]
xor ecx, ecx
cmp eax, 1
setne cl
push ecx
push 0x860d
push edx
call edi
mov eax, dword [0x5166dc]
mov ecx, dword [esp + 0x28]
mov eax, dword [eax*4 + 0x4a17f8]
push eax
push 0x860e
push 0
push ecx
call esi
push 0
push 0
push 0x1032
mov edx, dword [ebx + 0xc0]
push edx
call ebp
mov edx, dword [esp + 0x28]
xor ecx, ecx
cmp eax, 1
setne cl
push ecx
push 0x860e
push edx
call edi
mov eax, dword [0x5166dc]
mov ecx, dword [esp + 0x28]
mov eax, dword [eax*4 + 0x4a1804]
push eax
push 0x860f
push 0
push ecx
call esi
mov edx, dword [ebx + 0xc0]
push 0
push 0
push 0x1032
push edx
call ebp
mov edx, dword [esp + 0x28]
xor ecx, ecx
cmp eax, 1
setne cl
push ecx
push 0x860f
push edx
call edi
mov eax, dword [esp + 0x28]
push 0
push 0
push 0x800
push eax
call esi
mov ecx, dword [0x5166dc]
mov edx, dword [esp + 0x28]
mov eax, dword [ecx*4 + 0x4a02c0]
push eax
push 0x8610
push 0
push edx
call esi
lea eax, [esp + 0x2c]
push eax
call dword [sym.imp.USER32.dll_GetCursorPos]
mov ecx, dword [esp + 0x30]
mov edx, dword [esp + 0x2c]
push 0
push ebx
push ecx
push edx
push 0
lea ecx, [esp + 0x38]
call sub.MFC42u.DLL_CMenu::TrackPopupMenu
mov eax, dword [esp + 0x64]
mov dword [esp + 0x24], 0x48adf4
mov dword [eax], 0
lea ecx, [esp + 0x24]
mov byte [esp + 0x58], 3
call sub.MFC42u.DLL_CMenu::DestroyMenu
lea ecx, [esp + 0x10]
mov dword [esp + 0x24], 0x48a950
mov dword [esp + 0x58], 0xffffffff
call sub.MFC42u.DLL_CString::CString
mov ecx, dword [esp + 0x50]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x4c
ret 8