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

Disassembly:
push 0xffffffffffffffff
push 0x446498
mov eax, dword fs:[0]
push eax
sub esp, 0x30
push ebx
push ebp
push esi
push edi
mov eax, dword [0x4630d0]
xor eax, esp
push eax
lea eax, [esp + 0x44]
mov dword fs:[0], eax
mov dword [esp + 0x4c], 0
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push 0xf003f
push 0
push 0
mov dword [esp + 0x24], eax
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov edi, eax
test edi, edi
mov dword [esp + 0x1c], edi
jne 0x40fb20
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.OpenSCManager_failed___d__n
call fcn.00431702
add esp, 8
lea ecx, [esp + 0x54]
mov dword [esp + 0x4c], 0xffffffff
call fcn.0040ed90
mov eax, 0x64
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 eax, dword [esp + 0x58]
cmp dword [eax - 4], 1
jle 0x40fb3b
mov eax, dword [eax - 0xc]
push eax
lea ecx, [esp + 0x5c]
call fcn.00401c20
mov eax, dword [esp + 0x58]
push 0x2c
push eax
push edi
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov esi, eax
test esi, esi
jne 0x40fb68
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.OpenService_failed___d__n
call fcn.00431702
add esp, 8
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x40faf6
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 0x40fb9c
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.QueryServiceStatusEx_failed___d__n
call fcn.00431702
add esp, 8
jmp 0x40fc90
mov eax, dword [esp + 0x24]
cmp eax, 1
je 0x40fc90
mov ebx, dword [sym.imp.KERNEL32.dll_Sleep]
mov ebp, 3
cmp eax, ebp
jne 0x40fbf6
mov eax, dword [esp + 0x38]
push eax
call ebx
lea ecx, [esp + 0x14]
push ecx
push 0x24
lea edx, [esp + 0x28]
push edx
push 0
push esi
call edi
test eax, eax
je 0x40fb83
cmp dword [esp + 0x24], 1
je 0x40fc90
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [esp + 0x18]
cmp eax, 0x7530
ja 0x40fc30
cmp dword [esp + 0x24], ebp
je 0x40fbb8
mov eax, dword [esp + 0x1c]
push esi
push eax
call fcn.0040f660
add esp, 8
lea ecx, [esp + 0x20]
push ecx
mov ebp, 1
push ebp
push esi
call dword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
jne 0x40fc37
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.ControlService_failed___d__n
call fcn.00431702
add esp, 8
jmp 0x40fc90
push str.Service_stop_timed_out._n
jmp 0x40fc88
cmp dword [esp + 0x5c], 0
je 0x40fc90
cmp dword [esp + 0x24], ebp
je 0x40fc90
mov edx, dword [esp + 0x38]
push edx
call ebx
lea eax, [esp + 0x14]
push eax
push 0x24
lea ecx, [esp + 0x28]
push ecx
push 0
push esi
call edi
test eax, eax
je 0x40fb83
cmp dword [esp + 0x24], ebp
je 0x40fc90
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [esp + 0x18]
cmp eax, 0x7530
ja 0x40fc83
cmp dword [esp + 0x24], ebp
jne 0x40fc44
jmp 0x40fc90
push str.Wait_timed_out_n
call fcn.00431702
add esp, 4
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
mov edx, dword [esp + 0x1c]
push edx
call esi
lea ecx, [esp + 0x54]
mov dword [esp + 0x4c], 0xffffffff
call fcn.0040ed90
xor eax, eax
mov ecx, dword [esp + 0x44]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x3c
ret