Function at 0x40b650
Capabilities:
Check for time delay via gettickcount
Enumerate services
Query service status
Stop service

Disassembly:
push ebp
mov ebp, esp
push 0xfffffffffffffffe
push 0x497218
push 0x441d00
mov eax, dword fs:[0]
push eax
add esp, 0xffffff8c
push ebx
push esi
push edi
mov eax, dword [0x4ecd5c]
xor dword [ebp - 8], eax
xor eax, ebp
push eax
lea eax, [ebp - 0x10]
mov dword fs:[0], eax
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [ebp - 0x38], eax
lea eax, [ebp - 0x34]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
jne 0x40b6a6
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x40b9a6
cmp dword [ebp - 0x30], 1
jne 0x40b6b3
xor eax, eax
jmp 0x40b9a6
cmp dword [ebp - 0x30], 3
jne 0x40b707
mov edx, dword [ebp - 0x1c]
push edx
call dword [sym.imp.KERNEL32.dll_Sleep]
lea eax, [ebp - 0x34]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
jne 0x40b6e0
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x40b9a6
cmp dword [ebp - 0x30], 1
jne 0x40b6ed
xor eax, eax
jmp 0x40b9a6
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [ebp - 0x38]
cmp eax, dword [ebp + 0x14]
jbe 0x40b705
mov eax, 0x5b4
jmp 0x40b9a6
jmp 0x40b6b3
cmp dword [ebp + 0x10], 0
je 0x40b93f
mov dword [ebp - 0x68], 0
lea edx, [ebp - 0x60]
push edx
lea eax, [ebp - 0x6c]
push eax
push 0
mov ecx, dword [ebp - 0x68]
push ecx
push 1
mov edx, dword [ebp + 0xc]
push edx
call dword [sym.imp.ADVAPI32.dll_EnumDependentServicesA]
test eax, eax
je 0x40b73b
jmp 0x40b93f
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xea
je 0x40b753
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x40b9a6
mov eax, dword [ebp - 0x6c]
push eax
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [ebp - 0x68], eax
cmp dword [ebp - 0x68], 0
jne 0x40b77a
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x40b9a6
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x60]
push ecx
lea edx, [ebp - 0x6c]
push edx
mov eax, dword [ebp - 0x6c]
push eax
mov ecx, dword [ebp - 0x68]
push ecx
push 1
mov edx, dword [ebp + 0xc]
push edx
call dword [sym.imp.ADVAPI32.dll_EnumDependentServicesA]
test eax, eax
jne 0x40b7c5
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x74], eax
push 0xfffffffffffffffe
lea eax, [ebp - 0x10]
push eax
push 0x4ecd5c
call fcn.00443bf4
add esp, 0xc
mov eax, dword [ebp - 0x74]
jmp 0x40b9a6
mov dword [ebp - 0x64], 0
jmp 0x40b7d7
mov ecx, dword [ebp - 0x64]
add ecx, 1
mov dword [ebp - 0x64], ecx
mov edx, dword [ebp - 0x64]
cmp edx, dword [ebp - 0x60]
jae 0x40b91d
mov esi, dword [ebp - 0x64]
imul esi, esi, 0x24
add esi, dword [ebp - 0x68]
mov ecx, 9
lea edi, [ebp - 0x5c]
rep movsd dword es:[edi], dword [esi]
push 0x24
mov eax, dword [ebp - 0x5c]
push eax
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov dword [ebp - 0x70], eax
cmp dword [ebp - 0x70], 0
jne 0x40b833
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x78], eax
push 0xfffffffffffffffe
lea edx, [ebp - 0x10]
push edx
push 0x4ecd5c
call fcn.00443bf4
add esp, 0xc
mov eax, dword [ebp - 0x78]
jmp 0x40b9a6
mov dword [ebp - 4], 1
lea eax, [ebp - 0x34]
push eax
push 1
mov ecx, dword [ebp - 0x70]
push ecx
call dword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
jne 0x40b872
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x7c], eax
push 0xfffffffffffffffe
lea edx, [ebp - 0x10]
push edx
push 0x4ecd5c
call fcn.00443bf4
add esp, 0xc
mov eax, dword [ebp - 0x7c]
jmp 0x40b9a6
cmp dword [ebp - 0x30], 1
je 0x40b8ff
mov eax, dword [ebp - 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_Sleep]
lea ecx, [ebp - 0x34]
push ecx
mov edx, dword [ebp - 0x70]
push edx
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
jne 0x40b8bc
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x80], eax
push 0xfffffffffffffffe
lea eax, [ebp - 0x10]
push eax
push 0x4ecd5c
call fcn.00443bf4
add esp, 0xc
mov eax, dword [ebp - 0x80]
jmp 0x40b9a6
cmp dword [ebp - 0x30], 1
jne 0x40b8c4
jmp 0x40b8ff
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [ebp - 0x38]
cmp eax, dword [ebp + 0x14]
jbe 0x40b8fa
mov dword [ebp - 0x84], 0x5b4
push 0xfffffffffffffffe
lea ecx, [ebp - 0x10]
push ecx
push 0x4ecd5c
call fcn.00443bf4
add esp, 0xc
mov eax, dword [ebp - 0x84]
jmp 0x40b9a6
jmp 0x40b872
mov dword [ebp - 4], 0
call fcn.0040b90d
jmp 0x40b918
jmp 0x40b7ce
mov dword [ebp - 4], 0xfffffffe
call fcn.0040b92b
jmp 0x40b93f
lea ecx, [ebp - 0x34]
push ecx
push 1
mov edx, dword [ebp + 0xc]
push edx
call dword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
jne 0x40b95b
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x40b9a6
cmp dword [ebp - 0x30], 1
je 0x40b9a4
mov eax, dword [ebp - 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_Sleep]
lea ecx, [ebp - 0x34]
push ecx
mov edx, dword [ebp + 0xc]
push edx
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
jne 0x40b985
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x40b9a6
cmp dword [ebp - 0x30], 1
jne 0x40b98d
jmp 0x40b9a4
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [ebp - 0x38]
cmp eax, dword [ebp + 0x14]
jbe 0x40b9a2
mov eax, 0x5b4
jmp 0x40b9a6
jmp 0x40b95b
xor eax, eax
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret