Function at 0x401420
Capabilities:
Check for time delay via gettickcount
Query service status
Stop service

Disassembly:
push ebp
mov ebp, esp
push 0xfffffffffffffffe
push 0x41d958
push 0x4074e0
mov eax, dword fs:[0]
push eax
sub esp, 0xa4
mov eax, dword [section..data]
xor dword [ebp - 8], eax
xor eax, ebp
mov dword [ebp - 0x1c], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0x10]
mov dword fs:[0], eax
mov edi, ecx
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [ebp - 0x60], eax
mov dword [ebp - 0x68], 0
xor ebx, ebx
mov dword [ebp - 0x5c], ebx
xor esi, esi
mov dword [ebp - 0x58], esi
mov dword [ebp - 4], ebx
push 0xf003f
push esi
push esi
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov dword [ebp - 0x68], eax
test eax, eax
jne 0x4014e1
push eax
call fcn.00404943
mov dword [ebp - 0x64], eax
mov dword [ebp - 0x60], edx
lea eax, [ebp - 0x64]
push eax
call fcn.004045c1
push eax
push str._Y__m__d__H:_M:_S
push 0x14
lea eax, [ebp - 0x30]
push eax
call fcn.004045a4
add esp, 0x18
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push edi
lea eax, [ebp - 0x30]
push eax
push str.__s_ERROR:_StopService__s_:_OpenSCManager_failed___d_n
push dword [0x421558]
call fcn.004042e7
push dword [0x421558]
call fcn.004040a1
add esp, 0x18
jmp 0x4017f1
push 0xf01ff
push edi
push eax
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov ebx, eax
mov dword [ebp - 0x5c], ebx
test ebx, ebx
jne 0x40153c
push eax
call fcn.00404943
mov dword [ebp - 0xb4], eax
mov dword [ebp - 0xb0], edx
lea eax, [ebp - 0xb4]
push eax
call fcn.004045c1
push eax
push str._Y__m__d__H:_M:_S
push 0x14
lea eax, [ebp - 0x30]
push eax
call fcn.004045a4
add esp, 0x18
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push edi
lea eax, [ebp - 0x30]
push eax
push str.__s_ERROR:_StopService__s_:_OpenService_failed___d_n
jmp 0x4014c3
lea eax, [ebp - 0x6c]
push eax
push 0x24
lea eax, [ebp - 0x54]
push eax
push 0
push ebx
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
mov esi, eax
mov dword [ebp - 0x58], esi
test esi, esi
jne 0x4015a0
push eax
call fcn.00404943
mov dword [ebp - 0xa4], eax
mov dword [ebp - 0xa0], edx
lea eax, [ebp - 0xa4]
push eax
call fcn.004045c1
push eax
push str._Y__m__d__H:_M:_S
push 0x14
lea eax, [ebp - 0x30]
push eax
call fcn.004045a4
add esp, 0x18
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push edi
lea eax, [ebp - 0x30]
push eax
push str.__s_ERROR:_StopService__s_:_QueryServiceStatusEx_failed___d_n
jmp 0x4014c3
mov eax, dword [ebp - 0x50]
cmp eax, 1
je 0x4017f1
mov esi, 0x2710
cmp eax, 3
jne 0x4016c8
push 0
call fcn.00404943
mov dword [ebp - 0x74], eax
mov dword [ebp - 0x70], edx
lea eax, [ebp - 0x74]
push eax
call fcn.004045c1
push eax
push str._Y__m__d__H:_M:_S
push 0x14
lea eax, [ebp - 0x30]
push eax
call fcn.004045a4
push edi
lea eax, [ebp - 0x30]
push eax
push str.__s_LOG:_StopService__s_:_Service_stop_pending...._n
push dword [0x421558]
call fcn.004042e7
push dword [0x421558]
call fcn.004040a1
add esp, 0x2c
mov eax, 0xcccccccd
mul dword [ebp - 0x3c]
shr edx, 3
cmp edx, 0x3e8
jae 0x40161e
mov edx, 0x3e8
jmp 0x401627
cmp edx, 0x2710
cmova edx, esi
push edx
call dword [sym.imp.KERNEL32.dll_Sleep]
lea eax, [ebp - 0x6c]
push eax
push 0x24
lea eax, [ebp - 0x54]
push eax
push 0
push ebx
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
mov esi, eax
mov dword [ebp - 0x58], esi
test esi, esi
jne 0x401667
push eax
call fcn.00404943
mov dword [ebp - 0x9c], eax
mov dword [ebp - 0x98], edx
lea eax, [ebp - 0x9c]
jmp 0x401570
cmp dword [ebp - 0x50], 1
je 0x4017f1
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [ebp - 0x60]
cmp eax, 0x7530
jbe 0x4016c0
push 0
call fcn.00404943
mov dword [ebp - 0x8c], eax
mov dword [ebp - 0x88], edx
lea eax, [ebp - 0x8c]
push eax
call fcn.004045c1
push eax
push str._Y__m__d__H:_M:_S
push 0x14
lea eax, [ebp - 0x30]
push eax
call fcn.004045a4
push edi
lea eax, [ebp - 0x30]
push eax
push str.__s_ERROR:_StopService__s_:_Service_stop_timeout_n
jmp 0x4017d8
mov eax, dword [ebp - 0x50]
jmp 0x4015ac
lea eax, [ebp - 0x54]
push eax
push 1
push ebx
call dword [sym.imp.ADVAPI32.dll_ControlService]
mov esi, eax
mov dword [ebp - 0x58], esi
test esi, esi
jne 0x401726
push eax
call fcn.00404943
mov dword [ebp - 0xac], eax
mov dword [ebp - 0xa8], edx
lea eax, [ebp - 0xac]
push eax
call fcn.004045c1
push eax
push str._Y__m__d__H:_M:_S
push 0x14
lea eax, [ebp - 0x30]
push eax
call fcn.004045a4
add esp, 0x18
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push edi
lea eax, [ebp - 0x30]
push eax
push str.__s_ERROR:_StopService__s_:_ControlService_failed___d_n
jmp 0x4014c3
cmp dword [ebp - 0x50], 1
je 0x401796
push dword [ebp - 0x3c]
call dword [sym.imp.KERNEL32.dll_Sleep]
lea eax, [ebp - 0x6c]
push eax
push 0x24
lea eax, [ebp - 0x54]
push eax
push 0
push ebx
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
mov esi, eax
mov dword [ebp - 0x58], esi
test esi, esi
jne 0x401765
push eax
call fcn.00404943
mov dword [ebp - 0x7c], eax
mov dword [ebp - 0x78], edx
lea eax, [ebp - 0x7c]
jmp 0x401570
cmp dword [ebp - 0x50], 1
je 0x401796
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [ebp - 0x60]
cmp eax, 0x7530
jbe 0x401726
push 0
call fcn.00404943
mov dword [ebp - 0x84], eax
mov dword [ebp - 0x80], edx
lea eax, [ebp - 0x84]
jmp 0x40169a
mov esi, 1
mov dword [ebp - 0x58], esi
push 0
call fcn.00404943
mov dword [ebp - 0x94], eax
mov dword [ebp - 0x90], edx
lea eax, [ebp - 0x94]
push eax
call fcn.004045c1
push eax
push str._Y__m__d__H:_M:_S
push 0x14
lea eax, [ebp - 0x30]
push eax
call fcn.004045a4
push edi
lea eax, [ebp - 0x30]
push eax
push str.__s_LOG:_StopService__s_:_Service_stop_success_n
push dword [0x421558]
call fcn.004042e7
push dword [0x421558]
call fcn.004040a1
add esp, 0x2c
mov dword [ebp - 4], 0xfffffffe
call fcn.00401821
mov eax, esi
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x1c]
xor ecx, ebp
call fcn.00403f5b
mov esp, ebp
pop ebp
ret