Function at 0x404d10
Capabilities:
Query service status
Start service
Stop service

Disassembly:
sub esp, 0xa4
mov eax, dword [0x46be4c]
xor eax, esp
mov dword [esp + 0xa0], eax
push edi
push 0x20000000
push 0
push 0
mov dword [esp + 0x10], 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov edi, eax
test edi, edi
jne 0x404d90
cmp dword [esp + 0xb0], 1
jne 0x404d78
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [esp + 0x28]
push str.OpenSCManager_ERROR____ld_
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
push edi
push str.Tool_VDCServiceStopAndStart
lea ecx, [esp + 0x2c]
push ecx
push edi
call dword [sym.imp.USER32.dll_MessageBoxA]
xor eax, eax
pop edi
mov ecx, dword [esp + 0xa0]
xor ecx, esp
call fcn.0044027a
add esp, 0xa4
ret
push esi
push 0xf01ff
push str.Canon_NetSpot_Suite_Service
push edi
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov esi, eax
test esi, esi
jne 0x404dfe
cmp dword [esp + 0xb4], 1
jne 0x404dde
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea edx, [esp + 0x2c]
push str.OpenService_ERROR____ld_
push edx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
push esi
push str.Tool_VDCServiceStopAndStart
lea eax, [esp + 0x30]
push eax
push esi
call dword [sym.imp.USER32.dll_MessageBoxA]
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
pop esi
xor eax, eax
pop edi
mov ecx, dword [esp + 0xa0]
xor ecx, esp
call fcn.0044027a
add esp, 0xa4
ret
cmp dword [esp + 0xb0], 0
push ebx
push ebp
je 0x404e71
push 0
push 0
push esi
call dword [sym.imp.ADVAPI32.dll_StartServiceA]
test eax, eax
jne 0x404e64
cmp dword [esp + 0xbc], 1
jne 0x404e51
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea ecx, [esp + 0x34]
push str.StartService_ERROR____ld_
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
push 0
push str.Tool_VDCServiceStopAndStart
lea edx, [esp + 0x38]
push edx
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
push edi
mov edi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call edi
push esi
call edi
xor eax, eax
jmp 0x404f77
mov dword [esp + 0x10], 1
jmp 0x404f67
lea eax, [esp + 0x14]
push eax
push esi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
jne 0x404ecc
cmp dword [esp + 0xbc], 1
jne 0x404eb9
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea ecx, [esp + 0x34]
push str.QueryServiceStatus_ERROR____ld_
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
push 0
push str.Tool_VDCServiceStopAndStart
lea edx, [esp + 0x38]
push edx
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
push edi
mov edi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call edi
push esi
call edi
xor eax, eax
jmp 0x404f77
cmp dword [esp + 0xbc], 1
mov ebx, dword [sym.imp.USER32.dll_wsprintfA]
mov ebp, dword [sym.imp.USER32.dll_MessageBoxA]
jne 0x404f06
mov eax, dword [esp + 0x18]
push eax
lea ecx, [esp + 0x34]
push str.QueryServiceStatus_SERVICE____ld_
push ecx
call ebx
add esp, 0xc
push 0
push str.Tool_VDCServiceStopAndStart
lea edx, [esp + 0x38]
push edx
push 0
call ebp
cmp dword [esp + 0x18], 1
je 0x404f67
lea eax, [esp + 0x14]
push eax
push 1
push esi
call dword [sym.imp.ADVAPI32.dll_ControlService]
mov ecx, 1
cmp eax, ecx
je 0x404f63
cmp dword [esp + 0xbc], ecx
jne 0x404f53
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea ecx, [esp + 0x34]
push str.ControlService_ERROR____ld_
push ecx
call ebx
add esp, 0xc
push 0
push str.Tool_VDCServiceStopAndStart
lea edx, [esp + 0x38]
push edx
push 0
call ebp
push edi
mov edi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call edi
push esi
call edi
xor eax, eax
jmp 0x404f77
mov dword [esp + 0x10], ecx
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
push edi
call esi
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0xb0]
pop ebp
pop ebx
pop esi
pop edi
xor ecx, esp
call fcn.0044027a
add esp, 0xa4
ret