Function at 0x407960
Capabilities:
Delete service
Query service status
Stop service

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x450a70
mov eax, dword fs:[0]
push eax
sub esp, 0x3c
mov eax, dword [0x45e024]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
push 2
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov ebx, eax
test ebx, ebx
je 0x407bb6
push 0xf01ff
push str.Canon_Driver_Information_Assist_Service
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov edi, eax
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0xf
lea ecx, [ebp - 0x28]
mov byte [ebp - 0x28], 0
test edi, edi
jne 0x407a24
push 0x1e
push str.__DIAS_service_is_not_running.
call fcn.00409910
lea ecx, [ebp - 0x28]
mov dword [ebp - 4], edi
call fcn.00401ca0
mov edx, dword [ebp - 0x14]
cmp edx, 0x10
jb 0x407a18
mov ecx, dword [ebp - 0x28]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x407a0e
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x407d83
push edx
push ecx
call fcn.004120fb
add esp, 8
push ebx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x407bb6
push 0x23
push str.__stopping_DIAS_dependent_services
call fcn.00409910
lea ecx, [ebp - 0x28]
mov dword [ebp - 4], 1
call fcn.00401ca0
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp - 0x14]
cmp edx, 0x10
jb 0x407a7a
mov ecx, dword [ebp - 0x28]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x407a70
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x407d88
push edx
push ecx
call fcn.004120fb
add esp, 8
push ecx
mov edx, edi
mov ecx, ebx
call fcn.00408000
add esp, 4
mov dword [ebp - 0x18], 0
lea ecx, [ebp - 0x28]
mov dword [ebp - 0x14], 0xf
mov byte [ebp - 0x28], 0
push 0x17
push str.__stopping_DIAS_service
call fcn.00409910
lea ecx, [ebp - 0x28]
mov dword [ebp - 4], 2
call fcn.00401ca0
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp - 0x14]
cmp edx, 0x10
jb 0x407af2
mov ecx, dword [ebp - 0x28]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x407ae8
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x407d8d
push edx
push ecx
call fcn.004120fb
add esp, 8
xor esi, esi
lea eax, [ebp - 0x44]
push eax
push edi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
je 0x407baa
cmp dword [ebp - 0x40], 1
je 0x407bd4
test esi, esi
jne 0x407b2a
lea eax, [ebp - 0x44]
push eax
push 1
push edi
call dword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
je 0x407baa
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
push 3
push 0x459d84
lea ecx, [ebp - 0x28]
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0xf
mov byte [ebp - 0x28], 0
call fcn.00409910
lea ecx, [ebp - 0x28]
mov dword [ebp - 4], 4
call fcn.00401ca0
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp - 0x14]
cmp edx, 0x10
jb 0x407ba0
mov ecx, dword [ebp - 0x28]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x407b96
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x407d83
push edx
push ecx
call fcn.004120fb
add esp, 8
inc esi
cmp esi, 0x1e
jb 0x407af4
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push edi
call esi
push ebx
call esi
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00411cb8
mov esp, ebp
pop ebp
ret
push 0xa
push str.__stopped.
lea ecx, [ebp - 0x28]
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0xf
mov byte [ebp - 0x28], 0
call fcn.00409910
lea ecx, [ebp - 0x28]
mov dword [ebp - 4], 3
call fcn.00401ca0
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp - 0x14]
cmp edx, 0x10
jb 0x407c3f
mov ecx, dword [ebp - 0x28]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x407c35
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x407d92
push edx
push ecx
call fcn.004120fb
add esp, 8
push 0x20
push str.__unregister_DIAS_from_NTService
lea ecx, [ebp - 0x28]
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0xf
mov byte [ebp - 0x28], 0
call fcn.00409910
lea ecx, [ebp - 0x28]
mov dword [ebp - 4], 5
call fcn.00401ca0
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp - 0x14]
cmp edx, 0x10
jb 0x407caa
mov ecx, dword [ebp - 0x28]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x407ca0
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x407d97
push edx
push ecx
call fcn.004120fb
add esp, 8
push edi
call dword [sym.imp.ADVAPI32.dll_DeleteService]
mov dword [ebp - 0x18], 0
lea ecx, [ebp - 0x28]
mov dword [ebp - 0x14], 0xf
mov byte [ebp - 0x28], 0
test eax, eax
jne 0x407d22
push 0x27
push str.__failed_to_remove_the_service_from_SCM
call fcn.00409910
lea ecx, [ebp - 0x28]
mov dword [ebp - 4], 6
call fcn.00401ca0
mov edx, dword [ebp - 0x14]
cmp edx, 0x10
jb 0x407baa
mov ecx, dword [ebp - 0x28]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x407d13
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x407d9c
push edx
push ecx
call fcn.004120fb
add esp, 8
jmp 0x407baa
push 6
push str.__done
call fcn.00409910
lea ecx, [ebp - 0x28]
mov dword [ebp - 4], 7
call fcn.00401ca0
mov edx, dword [ebp - 0x14]
cmp edx, 0x10
jb 0x407d6d
mov ecx, dword [ebp - 0x28]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x407d63
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x407da1
push edx
push ecx
call fcn.004120fb
add esp, 8
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push edi
call esi
push ebx
call esi
mov eax, 1
jmp 0x407bb8
call fcn.0041c6cd
call fcn.0041c6cd
call fcn.0041c6cd
call fcn.0041c6cd
call fcn.0041c6cd
call fcn.0041c6cd
call fcn.0041c6cd
int3