Function at 0x5126f0
Capabilities:
Start service

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5ac730
mov eax, dword fs:[0]
push eax
sub esp, 0x50
mov eax, dword [0x608554]
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 ecx
push str.CBaseOSSpecTypeWin2K::DIASServiceControl
lea ecx, [ebp - 0x48]
call fcn.0040a480
mov dword [ebp - 4], 0
mov ecx, dword [0x608f30]
mov ebx, dword [ebp + 8]
cmp ecx, 0x608f30
je 0x5127b4
test byte [ecx + 0x1c], 1
je 0x512779
cmp dword [0x608f68], 8
mov eax, 0x608f54
mov edx, 0x5dd3a8
cmovae eax, dword [0x608f54]
push eax
push dword [ecx + 0x14]
push dword [ecx + 0x10]
mov ecx, 0xe7
call fcn.00401840
mov ecx, dword [0x608f30]
add esp, 0xc
cmp ecx, 0x608f30
je 0x5127b4
test byte [ecx + 0x1c], 1
je 0x5127b4
cmp dword [0x608f68], 8
mov eax, 0x608f54
push ebx
cmovae eax, dword [0x608f54]
mov edx, 0x5dd3a8
push eax
push dword [ecx + 0x14]
push dword [ecx + 0x10]
mov ecx, 0xe8
call fcn.004018a0
add esp, 0x10
push 0x20000000
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov edi, eax
test edi, edi
jne 0x512868
mov ecx, dword [0x608f30]
cmp ecx, 0x608f30
je 0x512821
test byte [ecx + 0x1c], 2
je 0x512821
cmp dword [0x608f68], 8
lea ecx, [ebp - 0x48]
mov esi, 0x608f54
cmovae esi, dword [0x608f54]
call fcn.0040a830
push eax
mov eax, dword [0x608f30]
mov edx, 0x5dd3a8
push esi
mov ecx, 0xe9
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.00405920
mov ecx, dword [0x608f30]
add esp, 0x10
test ebx, ebx
jne 0x512a94
mov byte [ebp - 0x44], 1
cmp ecx, 0x608f30
je 0x512ba2
test byte [ecx + 0x1c], 1
je 0x512ba2
cmp dword [0x608f68], 8
mov eax, 0x608f54
push ebx
cmovae eax, dword [0x608f54]
push eax
push dword [ecx + 0x14]
push dword [ecx + 0x10]
mov ecx, 0xea
jmp 0x512b95
push 0xf01ff
push str.Canon_Driver_Information_Assist_Service
push edi
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov dword [ebp - 0x50], eax
test eax, eax
jne 0x512924
mov eax, dword [0x608f30]
cmp eax, 0x608f30
je 0x5128d0
test byte [eax + 0x1c], 2
je 0x5128d0
cmp dword [0x608f68], 8
lea ecx, [ebp - 0x48]
mov esi, 0x608f54
cmovae esi, dword [0x608f54]
call fcn.0040a830
push eax
mov eax, dword [0x608f30]
mov edx, 0x5dd3a8
push esi
mov ecx, 0xeb
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.00405920
add esp, 0x10
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
test ebx, ebx
jne 0x512a94
mov byte [ebp - 0x44], 1
mov ecx, dword [0x608f30]
cmp ecx, 0x608f30
je 0x512ba2
test byte [ecx + 0x1c], 1
je 0x512ba2
cmp dword [0x608f68], 8
mov eax, 0x608f54
push ebx
cmovae eax, dword [0x608f54]
push eax
push dword [ecx + 0x14]
push dword [ecx + 0x10]
mov ecx, 0xec
jmp 0x512b95
test ebx, ebx
je 0x512b50
push 0
push 0
push eax
call dword [sym.imp.ADVAPI32.dll_StartServiceW]
test eax, eax
jne 0x512a0e
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
push ebx
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov ecx, dword [0x608f30]
cmp ecx, 0x608f30
je 0x51299c
test byte [ecx + 0x1c], 2
je 0x51299c
cmp dword [0x608f68], 8
lea ecx, [ebp - 0x48]
mov esi, 0x608f54
cmovae esi, dword [0x608f54]
call fcn.0040a830
push eax
mov eax, dword [0x608f30]
mov edx, 0x5dd3a8
push esi
mov ecx, 0xed
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.00405920
add esp, 0x10
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push edi
call esi
push dword [ebp - 0x50]
call esi
cmp ebx, 0x420
jne 0x512a94
mov byte [ebp - 0x44], 1
mov ecx, dword [0x608f30]
cmp ecx, 0x608f30
je 0x512b49
test byte [ecx + 0x1c], 1
je 0x512b49
cmp dword [0x608f68], 8
mov eax, 0x608f54
push 1
cmovae eax, dword [0x608f54]
mov edx, 0x5dd3a8
push eax
push dword [ecx + 0x14]
push dword [ecx + 0x10]
mov ecx, 0xee
call fcn.004018a0
add esp, 0x10
mov esi, 1
jmp 0x512ba4
lea ecx, [ebp - 0x4c]
call fcn.00470b20
push 0
mov byte [ebp - 4], 1
call fcn.005818c9
push 0
mov ebx, eax
mov esi, edx
call fcn.005818c9
add esp, 8
mov dword [ebp - 0x58], eax
sub ebx, eax
mov ecx, edx
mov dword [ebp - 0x54], ecx
sbb esi, ecx
test esi, esi
jg 0x512a88
jl 0x512a46
cmp ebx, 0x1e
jae 0x512a88
mov esi, dword [sym.imp.KERNEL32.dll_Sleep]
mov ebx, dword [ebp - 0x58]
nop
push str.Canon_Driver_Information_Assist_Service
lea ecx, [ebp - 0x4c]
call fcn.00474300
cmp eax, 4
je 0x512aed
push 0x3e8
call esi
push 0
call fcn.005818c9
add esp, 4
sub eax, ebx
sbb edx, dword [ebp - 0x54]
mov dword [ebp - 0x58], edx
js 0x512a50
jg 0x512a88
cmp eax, 0x1e
jb 0x512a50
lea ecx, [ebp - 0x4c]
mov byte [ebp - 4], 0
call fcn.00470bf0
push 0xb9
push dword [0x6184fc]
call fcn.00502d80
add esp, 8
mov byte [ebp - 0x44], 1
mov ecx, dword [0x608f30]
cmp ecx, 0x608f30
je 0x512ba2
test byte [ecx + 0x1c], 1
je 0x512ba2
cmp dword [0x608f68], 8
mov eax, 0x608f54
push 0
cmovae eax, dword [0x608f54]
push eax
push dword [ecx + 0x14]
push dword [ecx + 0x10]
mov ecx, 0xf1
jmp 0x512b95
lea ecx, [ebp - 0x4c]
call fcn.00470bf0
push dword [ebp - 0x50]
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
push edi
call esi
mov byte [ebp - 0x44], 1
mov ecx, dword [0x608f30]
cmp ecx, 0x608f30
je 0x512b49
test byte [ecx + 0x1c], 1
je 0x512b49
cmp dword [0x608f68], 8
mov eax, 0x608f54
push 1
cmovae eax, dword [0x608f54]
mov edx, 0x5dd3a8
push eax
push dword [ecx + 0x14]
push dword [ecx + 0x10]
mov ecx, 0xf0
call fcn.004018a0
add esp, 0x10
mov esi, 1
jmp 0x512ba4
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push eax
call esi
push edi
call esi
mov byte [ebp - 0x44], 1
mov ecx, dword [0x608f30]
cmp ecx, 0x608f30
je 0x512ba2
test byte [ecx + 0x1c], 1
je 0x512ba2
cmp dword [0x608f68], 8
mov eax, 0x608f54
push 0
cmovae eax, dword [0x608f54]
push eax
push dword [ecx + 0x14]
push dword [ecx + 0x10]
mov ecx, 0xef
mov edx, 0x5dd3a8
call fcn.004018a0
add esp, 0x10
xor esi, esi
lea ecx, [ebp - 0x48]
call fcn.0040a570
mov eax, esi
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.0056d977
mov esp, ebp
pop ebp
ret 4