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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5ac661
mov eax, dword fs:[0]
push eax
sub esp, 0x874
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::DOMSServiceControl
lea ecx, [ebp - 0x848]
call fcn.0040a480
mov dword [ebp - 4], 0
mov ecx, dword [0x608f30]
mov esi, dword [ebp + 8]
cmp ecx, 0x608f30
je 0x5115ca
test byte [ecx + 0x1c], 1
je 0x51158f
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, 0xc6
call fcn.00401840
mov ecx, dword [0x608f30]
add esp, 0xc
cmp ecx, 0x608f30
je 0x5115ca
test byte [ecx + 0x1c], 1
je 0x5115ca
cmp dword [0x608f68], 8
mov eax, 0x608f54
push esi
cmovae eax, dword [0x608f54]
mov edx, 0x5dd3a8
push eax
push dword [ecx + 0x14]
push dword [ecx + 0x10]
mov ecx, 0xc7
call fcn.004018a0
add esp, 0x10
push 0x20000000
xor edi, edi
push edi
push edi
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov dword [ebp - 0x86c], eax
test eax, eax
jne 0x511686
mov ecx, dword [0x608f30]
cmp ecx, 0x608f30
je 0x51162d
test byte [ecx + 0x1c], 4
je 0x51162d
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, 0xc8
call fcn.00401840
mov ecx, dword [0x608f30]
add esp, 0xc
test esi, esi
jne 0x511990
mov byte [ebp - 0x844], 1
cmp ecx, 0x608f30
je 0x511a24
test byte [ecx + 0x1c], 1
je 0x511a24
cmp dword [0x608f68], 8
mov eax, 0x608f54
push esi
cmovae eax, dword [0x608f54]
mov edx, 0x5dd3a8
push eax
push dword [ecx + 0x14]
push dword [ecx + 0x10]
mov ecx, 0xc9
call fcn.004018a0
add esp, 0x10
xor edi, edi
jmp 0x511c9c
push 0xf01ff
push str.Canon_Output_Manager_Service
push eax
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov ebx, eax
test ebx, ebx
jne 0x51175e
mov eax, dword [0x608f30]
cmp eax, 0x608f30
je 0x5116f3
test byte [eax + 0x1c], 2
je 0x5116f3
cmp dword [0x608f68], 8
lea ecx, [ebp - 0x848]
mov esi, 0x608f54
cmovae esi, dword [0x608f54]
call fcn.0040a830
push eax
mov eax, dword [0x608f30]
mov edx, 0x5dd3a8
push esi
mov ecx, 0xca
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.00405920
mov esi, dword [ebp + 8]
add esp, 0x10
push dword [ebp - 0x86c]
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
test esi, esi
jne 0x511990
mov byte [ebp - 0x844], 1
mov ecx, dword [0x608f30]
cmp ecx, 0x608f30
je 0x511a24
test byte [ecx + 0x1c], 1
je 0x511a24
cmp dword [0x608f68], 8
mov eax, 0x608f54
push esi
cmovae eax, dword [0x608f54]
mov edx, 0x5dd3a8
push eax
push dword [ecx + 0x14]
push dword [ecx + 0x10]
mov ecx, 0xcb
call fcn.004018a0
add esp, 0x10
xor edi, edi
jmp 0x511c9c
lea eax, [ebp - 0x864]
push eax
push ebx
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
jne 0x51182c
mov eax, dword [0x608f30]
cmp eax, 0x608f30
je 0x5117c3
test byte [eax + 0x1c], 2
je 0x5117c3
cmp dword [0x608f68], 8
lea ecx, [ebp - 0x848]
mov esi, 0x608f54
cmovae esi, dword [0x608f54]
call fcn.0040a830
push eax
mov eax, dword [0x608f30]
mov edx, 0x5dd3a8
push esi
mov ecx, 0xcc
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.00405920
add esp, 0x10
push dword [ebp - 0x86c]
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
push ebx
call esi
mov byte [ebp - 0x844], 1
mov ecx, dword [0x608f30]
cmp ecx, 0x608f30
je 0x511a24
test byte [ecx + 0x1c], 1
je 0x511a24
cmp dword [0x608f68], 8
mov eax, 0x608f54
push 0
cmovae eax, dword [0x608f54]
mov edx, 0x5dd3a8
push eax
push dword [ecx + 0x14]
push dword [ecx + 0x10]
mov ecx, 0xcd
call fcn.004018a0
add esp, 0x10
xor edi, edi
jmp 0x511c9c
mov eax, dword [ebp - 0x860]
test esi, esi
je 0x511a7b
cmp eax, 4
je 0x511a7b
push 0
push 0
push ebx
call dword [sym.imp.ADVAPI32.dll_StartServiceW]
test eax, eax
jne 0x5118b7
mov eax, dword [0x608f30]
cmp eax, 0x608f30
je 0x5118a1
test byte [eax + 0x1c], 2
je 0x5118a1
cmp dword [0x608f68], 8
lea ecx, [ebp - 0x848]
mov esi, 0x608f54
cmovae esi, dword [0x608f54]
call fcn.0040a830
push eax
mov eax, dword [0x608f30]
mov edx, 0x5dd3a8
push esi
mov ecx, 0xce
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.00405920
add esp, 0x10
push dword [ebp - 0x86c]
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
push ebx
call esi
jmp 0x511990
mov ecx, dword [0x608f30]
cmp ecx, 0x608f30
je 0x5118f7
test byte [ecx + 0x1c], 4
je 0x5118f7
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, 0xcf
call fcn.00401840
add esp, 0xc
lea ecx, [ebp - 0x868]
call fcn.00470b20
push 0
mov byte [ebp - 4], 1
call fcn.005818c9
mov esi, edx
mov edi, eax
push 0
mov dword [ebp - 0x870], esi
call fcn.005818c9
add esp, 8
sub eax, edi
sbb edx, esi
test edx, edx
jg 0x511981
jl 0x511930
cmp eax, 0x1e
jae 0x511981
mov esi, dword [sym.imp.KERNEL32.dll_Sleep]
nop word [eax + eax]
push str.Canon_Output_Manager_Service
lea ecx, [ebp - 0x868]
call fcn.00474300
cmp eax, 4
je 0x511a2b
push 0x3e8
call esi
push 0
call fcn.005818c9
add esp, 4
sub eax, edi
sbb edx, dword [ebp - 0x870]
mov dword [ebp - 0x874], edx
js 0x511940
jg 0x511981
cmp eax, 0x1e
jb 0x511940
lea ecx, [ebp - 0x868]
mov byte [ebp - 4], 0
call fcn.00470bf0
push 0x800
lea eax, [ebp - 0x810]
push 0
push eax
call fcn.00571c00
mov ecx, dword [0x6184f0]
lea eax, [ebp - 0x810]
add esp, 0xc
mov ecx, dword [ecx + 0x1c]
push eax
push str.DOMSNAME
call fcn.004f65f0
lea eax, [ebp - 0x810]
push eax
push eax
push 0xa2
push dword [0x6184fc]
call fcn.00502d80
add esp, 0x10
mov byte [ebp - 0x844], 1
mov ecx, dword [0x608f30]
cmp ecx, 0x608f30
je 0x511a24
test byte [ecx + 0x1c], 1
je 0x511a24
cmp dword [0x608f68], 8
mov eax, 0x608f54
push 0
cmovae eax, dword [0x608f54]
mov edx, 0x5dd3a8
push eax
push dword [ecx + 0x14]
push dword [ecx + 0x10]
mov ecx, 0xd5
call fcn.004018a0
add esp, 0x10
xor edi, edi
jmp 0x511c9c
mov ecx, dword [0x608f30]
cmp ecx, 0x608f30
je 0x511a6b
test byte [ecx + 0x1c], 4
je 0x511a6b
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, 0xd0
call fcn.00401840
add esp, 0xc
mov edi, 1
lea ecx, [ebp - 0x868]
jmp 0x511c3e
cmp eax, 1
je 0x511c43
lea eax, [ebp - 0x864]
push eax
push 1
push ebx
call dword [sym.imp.ADVAPI32.dll_ControlService]
cmp eax, 1
je 0x511b55
mov eax, dword [0x608f30]
cmp eax, 0x608f30
je 0x511aec
test byte [eax + 0x1c], 2
je 0x511aec
cmp dword [0x608f68], 8
lea ecx, [ebp - 0x848]
mov esi, 0x608f54
cmovae esi, dword [0x608f54]
call fcn.0040a830
push eax
mov eax, dword [0x608f30]
mov edx, 0x5dd3a8
push esi
mov ecx, 0xd1
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.00405920
add esp, 0x10
push dword [ebp - 0x86c]
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
push ebx
call esi
mov byte [ebp - 0x844], 1
mov ecx, dword [0x608f30]
cmp ecx, 0x608f30
je 0x511a24
test byte [ecx + 0x1c], 1
je 0x511a24
cmp dword [0x608f68], 8
mov eax, 0x608f54
push 0
cmovae eax, dword [0x608f54]
mov edx, 0x5dd3a8
push eax
push dword [ecx + 0x14]
push dword [ecx + 0x10]
mov ecx, 0xd2
call fcn.004018a0
add esp, 0x10
xor edi, edi
jmp 0x511c9c
lea ecx, [ebp - 0x870]
call fcn.00470b20
push 0
mov byte [ebp - 4], 2
call fcn.005818c9
mov esi, eax
mov dword [ebp - 0x868], edx
push 0
mov dword [ebp - 0x874], esi
call fcn.005818c9
add esp, 8
sub eax, esi
sbb edx, dword [ebp - 0x868]
test edx, edx
jg 0x511c38
jl 0x511b9e
cmp eax, 0x1e
jae 0x511c38
mov esi, dword [sym.imp.KERNEL32.dll_Sleep]
nop dword [eax]
nop dword [eax + eax]
push str.Canon_Output_Manager_Service
lea ecx, [ebp - 0x870]
call fcn.00474300
cmp eax, 1
je 0x511bf3
push 0x3e8
call esi
push 0
call fcn.005818c9
add esp, 4
sub eax, dword [ebp - 0x874]
sbb edx, dword [ebp - 0x868]
mov dword [ebp - 0x87c], edx
js 0x511bb0
jg 0x511c38
cmp eax, 0x1e
jb 0x511bb0
jmp 0x511c38
mov ecx, dword [0x608f30]
cmp ecx, 0x608f30
je 0x511c33
test byte [ecx + 0x1c], 4
je 0x511c33
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, 0xd3
call fcn.00401840
add esp, 0xc
mov edi, 1
lea ecx, [ebp - 0x870]
call fcn.00470bf0
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push ebx
call esi
push dword [ebp - 0x86c]
call esi
mov byte [ebp - 0x844], 1
mov ecx, dword [0x608f30]
cmp ecx, 0x608f30
je 0x511c9c
test byte [ecx + 0x1c], 1
je 0x511c9c
cmp dword [0x608f68], 8
mov eax, 0x608f54
push edi
cmovae eax, dword [0x608f54]
mov edx, 0x5dd3a8
push eax
push dword [ecx + 0x14]
push dword [ecx + 0x10]
mov ecx, 0xd4
call fcn.004018a0
add esp, 0x10
lea ecx, [ebp - 0x848]
call fcn.0040a570
mov eax, edi
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