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

Disassembly:
push 0xffffffffffffffff
push 0x4f96e4
mov eax, dword fs:[0]
push eax
sub esp, 0x30
push ebx
push ebp
push esi
push edi
mov eax, dword [0x53fa2c]
xor eax, esp
push eax
lea eax, [esp + 0x44]
mov dword fs:[0], eax
mov ebp, dword [sym.imp.KERNEL32.dll_GetTickCount]
call ebp
push 0xf003f
push 0
push 0
mov dword [esp + 0x24], eax
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov edi, eax
mov dword [esp + 0x1c], edi
test edi, edi
je 0x4d9ac6
mov eax, dword [esp + 0x54]
push 0x2c
push eax
push edi
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov esi, eax
test esi, esi
jne 0x4d98ef
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov ecx, dword [esp + 0x44]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x3c
ret
mov edi, dword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
lea ecx, [esp + 0x14]
push ecx
push 0x24
lea edx, [esp + 0x28]
push edx
push 0
push esi
call edi
test eax, eax
jne 0x4d9945
lea eax, [esp + 0x18]
push eax
call fcn.00491540
mov dword [esp + 0x50], 0
mov ecx, dword [eax]
push ecx
push str.QueryServiceStatusEx_failed___s_
push 8
call fcn.0043d500
add esp, 0x10
mov dword [esp + 0x4c], 0xffffffff
lea ecx, [esp + 0x18]
call dword [sym.imp.mfc90.dll_Ordinal_601]
jmp 0x4d9aa2
mov eax, dword [esp + 0x24]
cmp eax, 1
jne 0x4d9958
push str.Service_is_already_stopped
jmp 0x4d9a98
mov ebx, dword [sym.imp.KERNEL32.dll_Sleep]
cmp eax, 3
jne 0x4d99cd
push str.Service_stop_pending
push 8
call fcn.0043d500
mov eax, 0xcccccccd
mul dword [esp + 0x40]
shr edx, 3
add esp, 8
cmp edx, 0x3e8
jae 0x4d998d
mov edx, 0x3e8
jmp 0x4d999a
cmp edx, 0x2710
jbe 0x4d999a
mov edx, 0x2710
push edx
call ebx
lea edx, [esp + 0x14]
push edx
push 0x24
lea eax, [esp + 0x28]
push eax
push 0
push esi
call edi
test eax, eax
je 0x4d9a0c
cmp dword [esp + 0x24], 1
je 0x4d9a26
call ebp
sub eax, dword [esp + 0x18]
cmp eax, 0x7530
ja 0x4d9a2d
cmp dword [esp + 0x24], 3
je 0x4d9963
mov eax, dword [esp + 0x1c]
push esi
push eax
call fcn.004d9500
add esp, 8
lea ecx, [esp + 0x20]
push ecx
push 1
push esi
call dword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
jne 0x4d9a34
lea edx, [esp + 0x18]
push edx
call fcn.00491540
mov dword [esp + 0x50], 2
mov eax, dword [eax]
push eax
push str.ControlService_failed___s_
jmp 0x4d9924
lea ecx, [esp + 0x18]
push ecx
call fcn.00491540
mov dword [esp + 0x50], 1
mov edx, dword [eax]
push edx
jmp 0x4d991f
push str.Service_stopped_successfully
jmp 0x4d9a98
push str.Service_stop_timed_out
jmp 0x4d9a98
cmp dword [esp + 0x24], 1
je 0x4d9aa2
jmp 0x4d9a40
mov ecx, dword [esp + 0x38]
push ecx
call ebx
lea edx, [esp + 0x14]
push edx
push 0x24
lea eax, [esp + 0x28]
push eax
push 0
push esi
call edi
test eax, eax
je 0x4d9a79
cmp dword [esp + 0x24], 1
je 0x4d9aa2
call ebp
sub eax, dword [esp + 0x18]
cmp eax, 0x7530
ja 0x4d9a93
cmp dword [esp + 0x24], 1
jne 0x4d9a40
jmp 0x4d9aa2
lea ecx, [esp + 0x18]
push ecx
call fcn.00491540
mov dword [esp + 0x50], 3
mov edx, dword [eax]
push edx
jmp 0x4d991f
push str.Wait_timed_out
push 8
call fcn.0043d500
add esp, 8
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
mov eax, dword [esp + 0x1c]
push eax
call esi
mov ecx, dword [esp + 0x54]
push ecx
push str.StopService___s__OK
push 8
call fcn.0043d500
add esp, 0xc
mov ecx, dword [esp + 0x44]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x3c
ret