Function at 0x412240
Capabilities:
Check for time delay via gettickcount
Print debug messages
Query service status
Stop service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
mov eax, dword [0x5c2b50]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetTickCount]
push edi
call esi
push 0xf003f
xor ebx, ebx
mov edi, eax
push ebx
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov dword [0x5c8368], eax
test eax, eax
jne 0x412323
mov ebx, dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
push str._n______________________________________________________________________________________________n
call ebx
push 0x800
call fcn.005369fe
push 0x800
mov esi, eax
push 0
push esi
call fcn.00537300
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
add esp, 0x10
call edi
push eax
push str.DoStopSvc
push 0x384
push str.c:devdragon_release_sync_srcdragonupdateservicedragonupdateservice_servicemain.cpp
push str.CD_Module
push str._s_____s____d____s___returned__d
push 0x800
push esi
call fcn.00406430
add esp, 0x20
push esi
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
push esi
push 0x384
push str.DoStopSvc
call fcn.00404610
add esp, 0xc
test esi, esi
je 0x4122f9
push esi
call fcn.005369c6
add esp, 4
push str._n______________________________________________________________________________________________n
call ebx
call edi
push eax
push str.OpenSCManager_failed___d__n
call fcn.00536761
add esp, 8
call edi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00536ab6
mov esp, ebp
pop ebp
ret
push 0x2c
push str.ChromodoUpdater
push eax
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov dword [0x5c836c], eax
test eax, eax
jne 0x4123f4
mov ebx, dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
push str._n______________________________________________________________________________________________n
call ebx
push 0x800
call fcn.005369fe
push 0x800
mov esi, eax
push 0
push esi
call fcn.00537300
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
add esp, 0x10
call edi
push eax
push str.DoStopSvc
push 0x394
push str.c:devdragon_release_sync_srcdragonupdateservicedragonupdateservice_servicemain.cpp
push str.CD_Module
push str._s_____s____d____s___returned__d
push 0x800
push esi
call fcn.00406430
add esp, 0x20
push esi
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
push esi
push 0x394
push str.DoStopSvc
call fcn.00404610
add esp, 0xc
test esi, esi
je 0x4123be
push esi
call fcn.005369c6
add esp, 4
push str._n______________________________________________________________________________________________n
call ebx
call edi
push eax
push str.OpenService_failed___d__n
call fcn.00536761
add esp, 8
push dword [0x5c8368]
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call edi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00536ab6
mov esp, ebp
pop ebp
ret
lea ecx, [ebp - 0x2c]
push ecx
push 0x24
lea ecx, [ebp - 0x28]
push ecx
push 0
push eax
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
test eax, eax
jne 0x412476
mov ebx, dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
push str._n______________________________________________________________________________________________n
call ebx
push 0x800
call fcn.005369fe
push 0x800
mov esi, eax
push 0
push esi
call fcn.00537300
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
add esp, 0x10
call edi
push eax
push str.DoStopSvc
push 0x3a4
push str.c:devdragon_release_sync_srcdragonupdateservicedragonupdateservice_servicemain.cpp
push str.CD_Module
push str._s_____s____d____s___returned__d
push 0x800
push esi
call fcn.00406430
add esp, 0x20
push esi
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
push esi
push 0x3a4
jmp 0x41274d
mov eax, dword [ebp - 0x24]
cmp eax, 1
jne 0x412490
push str.Service_is_already_stopped._n
call fcn.00536761
add esp, 4
jmp 0x4126af
cmp eax, 3
jne 0x412510
push str.Service_stop_pending..._n
call fcn.00536761
mov eax, 0xcccccccd
add esp, 4
mul dword [ebp - 0x10]
shr edx, 3
cmp edx, 0x3e8
jae 0x4124bc
mov edx, 0x3e8
jmp 0x4124ca
cmp edx, 0x2710
mov eax, 0x2710
cmova edx, eax
push edx
call dword [sym.imp.KERNEL32.dll_Sleep]
lea eax, [ebp - 0x2c]
push eax
push 0x24
lea eax, [ebp - 0x28]
push eax
push 0
push dword [0x5c836c]
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
test eax, eax
je 0x4125f3
cmp dword [ebp - 0x24], 1
je 0x4125e1
call esi
sub eax, edi
cmp eax, 0x7530
ja 0x4125cf
cmp dword [ebp - 0x24], 3
je 0x412495
call fcn.00412790
lea eax, [ebp - 0x28]
push eax
push 1
push dword [0x5c836c]
call dword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
jne 0x41265e
mov ebx, dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
push str._n______________________________________________________________________________________________n
call ebx
push 0x800
call fcn.005369fe
push 0x800
mov esi, eax
push 0
push esi
call fcn.00537300
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
add esp, 0x10
call edi
push eax
push str.DoStopSvc
push 0x3e8
push str.c:devdragon_release_sync_srcdragonupdateservicedragonupdateservice_servicemain.cpp
push str.CD_Module
push str._s_____s____d____s___returned__d
push 0x800
push esi
call fcn.00406430
add esp, 0x20
push esi
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
push esi
push 0x3e8
push str.DoStopSvc
call fcn.00404610
add esp, 0xc
test esi, esi
je 0x4125af
push esi
call fcn.005369c6
add esp, 4
push str._n______________________________________________________________________________________________n
call ebx
call edi
push eax
push str.ControlService_failed___d__n
call fcn.00536761
add esp, 8
call edi
mov ebx, eax
jmp 0x4126af
push str.Service_stop_timed_out._n
call fcn.00536761
add esp, 4
jmp 0x4126af
push str.Service_stopped_successfully._n
call fcn.00536761
add esp, 4
jmp 0x4126af
mov ebx, dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
push str._n______________________________________________________________________________________________n
call ebx
push 0x800
call fcn.005369fe
push 0x800
mov esi, eax
push 0
push esi
call fcn.00537300
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
add esp, 0x10
call edi
push eax
push str.DoStopSvc
push 0x3ca
push str.c:devdragon_release_sync_srcdragonupdateservicedragonupdateservice_servicemain.cpp
push str.CD_Module
push str._s_____s____d____s___returned__d
push 0x800
push esi
call fcn.00406430
add esp, 0x20
push esi
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
push esi
push 0x3ca
jmp 0x41274d
cmp dword [ebp - 0x24], 1
je 0x4126a0
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_Sleep]
lea eax, [ebp - 0x2c]
push eax
push 0x24
lea eax, [ebp - 0x28]
push eax
push 0
push dword [0x5c836c]
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
test eax, eax
je 0x4126e7
cmp dword [ebp - 0x24], 1
je 0x4126a0
call esi
sub eax, edi
cmp eax, 0x7530
ja 0x4126d8
cmp dword [ebp - 0x24], 1
jne 0x412664
push str.Service_stopped_successfully_n
call fcn.00536761
add esp, 4
xor ebx, ebx
push dword [0x5c836c]
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
push dword [0x5c8368]
call esi
mov ecx, dword [ebp - 4]
mov eax, ebx
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00536ab6
mov esp, ebp
pop ebp
ret
push str.Wait_timed_out_n
call fcn.00536761
add esp, 4
jmp 0x4126af
mov ebx, dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
push str._n______________________________________________________________________________________________n
call ebx
push 0x800
call fcn.005369fe
push 0x800
mov esi, eax
push 0
push esi
call fcn.00537300
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
add esp, 0x10
call edi
push eax
push str.DoStopSvc
push 0x3fa
push str.c:devdragon_release_sync_srcdragonupdateservicedragonupdateservice_servicemain.cpp
push str.CD_Module
push str._s_____s____d____s___returned__d
push 0x800
push esi
call fcn.00406430
add esp, 0x20
push esi
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
push esi
push 0x3fa
push str.DoStopSvc
call fcn.00404610
add esp, 0xc
test esi, esi
je 0x412767
push esi
call fcn.005369c6
add esp, 4
push str._n______________________________________________________________________________________________n
call ebx
call edi
push eax
push str.QueryServiceStatusEx_failed___d__n
call fcn.00536761
add esp, 8
call edi
mov ebx, eax
jmp 0x4126af