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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x38
mov eax, dword [0x43c3f4]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 0x10]
push esi
mov esi, dword [ebp + 8]
xor eax, eax
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [ebp - 0x2c], ebx
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x38], eax
call edi
mov dword [ebp - 0x30], eax
xor eax, eax
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x10], eax
mov dword [ebp - 0xc], eax
mov dword [ebp - 8], eax
cmp ebx, eax
jne 0x40db3e
push 0xf003f
push eax
push eax
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x38], 1
test eax, eax
jne 0x40db3c
call dword [sym.imp.KERNEL32.dll_GetLastError]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00419bd7
mov esp, ebp
pop ebp
ret
mov ebx, eax
push 0xf01ff
push esi
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov esi, eax
test esi, esi
je 0x40dcc8
mov ebx, dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
lea eax, [ebp - 0x20]
push eax
push esi
call ebx
mov eax, dword [ebp - 0x1c]
cmp eax, 3
jne 0x40dbca
lea ebx, [ebx]
mov eax, 0xcccccccd
mul dword [ebp - 8]
shr edx, 3
cmp edx, 0x3e8
jae 0x40db8a
mov edx, 0x3e8
jmp 0x40db97
cmp edx, 0x2710
jbe 0x40db97
mov edx, 0x2710
push edx
call dword [sym.imp.KERNEL32.dll_Sleep]
lea ecx, [ebp - 0x20]
push ecx
push esi
call ebx
cmp dword [ebp - 0x1c], 1
je 0x40dc91
call edi
sub eax, dword [ebp - 0x30]
cmp eax, 0x7530
ja 0x40dc91
cmp dword [ebp - 0x1c], 3
je 0x40db70
jmp 0x40dc91
cmp eax, 4
jne 0x40dc91
mov edi, dword [sym.imp.ADVAPI32.dll_EnumDependentServicesW]
lea edx, [ebp - 0x24]
push edx
xor eax, eax
lea ecx, [ebp - 0x28]
push ecx
push eax
push eax
push 1
push esi
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x24], eax
call edi
mov eax, dword [ebp - 0x28]
test eax, eax
je 0x40dc42
push eax
call fcn.004199a3
mov ecx, dword [ebp - 0x28]
add esp, 4
mov ebx, eax
lea edx, [ebp - 0x24]
push edx
lea eax, [ebp - 0x28]
push eax
push ecx
push ebx
push 1
push esi
mov dword [ebp - 0x24], 0
call edi
xor edi, edi
cmp dword [ebp - 0x24], edi
jbe 0x40dc3c
mov edx, dword [ebp - 0x2c]
mov eax, dword [ebx]
push edx
push 1
push eax
call fcn.0040dac0
inc edi
add esp, 0xc
add ebx, 0x24
cmp edi, dword [ebp - 0x24]
jb 0x40dc22
mov ebx, dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
lea ecx, [ebp - 0x20]
push ecx
push 1
push esi
call dword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
jne 0x40dc5e
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x34], eax
jmp 0x40dc91
cmp dword [ebp - 0x1c], 1
je 0x40dc91
mov edx, dword [ebp - 8]
push edx
call dword [sym.imp.KERNEL32.dll_Sleep]
lea eax, [ebp - 0x20]
push eax
push esi
call ebx
cmp dword [ebp - 0x1c], 1
je 0x40dc91
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [ebp - 0x30]
cmp eax, 0x7530
ja 0x40dc91
cmp dword [ebp - 0x1c], 1
jne 0x40dc64
lea ecx, [ebp - 0x20]
push ecx
push esi
xor edi, edi
call ebx
cmp dword [ebp - 0x1c], 1
je 0x40dcbe
cmp edi, 0xa
jge 0x40dcbe
push 0x1f4
inc edi
call dword [sym.imp.KERNEL32.dll_Sleep]
lea edx, [ebp - 0x20]
push edx
push esi
call ebx
cmp dword [ebp - 0x1c], 1
jne 0x40dca0
push esi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov ebx, dword [ebp - 0x2c]
cmp dword [ebp - 0x38], 0
je 0x40dcd5
push ebx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x34]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00419bd7
mov esp, ebp
pop ebp
ret