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

Disassembly:
push ebp
mov ebp, esp
push 0xfffffffffffffffe
push 0x40f968
push 0x40c350
mov eax, dword fs:[0]
push eax
sub esp, 0x6c
push ebx
push esi
push edi
mov eax, dword [0x41398c]
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 - 0x2c], eax
mov dword [ebp - 0x30], 0x7530
lea eax, [ebp - 0x20]
push eax
lea ecx, [ebp - 0x1c]
push ecx
push 0
push 0
push 1
mov ebx, dword [ebp + 8]
mov edx, dword [ebx + 4]
push edx
mov edi, dword [sym.imp.ADVAPI32.dll_EnumDependentServicesW]
call edi
test eax, eax
jne 0x408193
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xea
jne 0x408021
mov eax, dword [ebp - 0x1c]
push eax
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov esi, eax
mov dword [ebp - 0x28], esi
test esi, esi
je 0x408021
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x20]
push ecx
lea edx, [ebp - 0x1c]
push edx
mov eax, dword [ebp - 0x1c]
push eax
push esi
push 1
mov ecx, dword [ebx + 4]
push ecx
call edi
test eax, eax
jne 0x408035
push 0xfffffffffffffffe
lea edx, [ebp - 0x10]
push edx
push 0x41398c
call fcn.0040c468
add esp, 0xc
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
xor ebx, ebx
mov dword [ebp - 0x24], ebx
lea ebx, [ebx]
cmp ebx, dword [ebp - 0x20]
jae 0x408187
lea eax, [ebx + ebx*8]
lea esi, [esi + eax*4]
mov ecx, 9
lea edi, [ebp - 0x7c]
rep movsd dword es:[edi], dword [esi]
push 0x24
mov edi, dword [ebp - 0x7c]
push edi
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 8]
push edx
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov esi, eax
mov dword [ebp - 0x34], esi
test esi, esi
je 0x408175
push 0x40e028
push edi
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
je 0x408175
push 0x40e020
push edi
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
je 0x408175
mov edi, 1
mov dword [ebp - 4], edi
lea eax, [ebp - 0x58]
push eax
push edi
push esi
call dword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
jne 0x4080e0
push 0xfffffffffffffffe
lea ecx, [ebp - 0x10]
push ecx
push 0x41398c
call fcn.0040c468
add esp, 0xc
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
cmp dword [ebp - 0x54], edi
je 0x408144
mov edx, dword [ebp - 0x40]
push edx
call dword [sym.imp.KERNEL32.dll_Sleep]
lea eax, [ebp - 0x1c]
push eax
push 0x24
lea ecx, [ebp - 0x58]
push ecx
push 0
push esi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
test eax, eax
je 0x40800e
cmp dword [ebp - 0x54], edi
je 0x408144
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [ebp - 0x2c]
cmp eax, dword [ebp - 0x30]
jbe 0x4080e0
push 0xfffffffffffffffe
lea eax, [ebp - 0x10]
push eax
push 0x41398c
call fcn.0040c468
add esp, 0xc
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
mov dword [ebp - 4], 0
call fcn.00408168
add ebx, edi
mov dword [ebp - 0x24], ebx
mov esi, dword [ebp - 0x28]
jmp 0x408040
mov edi, 1
add ebx, edi
mov dword [ebp - 0x24], ebx
mov esi, dword [ebp - 0x28]
jmp 0x408040
mov dword [ebp - 4], 0xfffffffe
call fcn.004081ad
mov eax, 1
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret