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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x90
push esi
push edi
mov dword [ebp - 8], 0
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x20], 0x7530
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
je 0x404a28
mov dword [ebp - 0x10], 0
jmp 0x404840
mov eax, dword [ebp - 0x10]
add eax, 1
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0x2c
jae 0x404a1d
push 0x2c
mov ecx, dword [ebp - 0x10]
mov edx, dword [ecx*4 + section..data]
push edx
mov eax, dword [ebp - 0x18]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
je 0x404a18
lea ecx, [ebp - 0xc]
push ecx
push 0x24
lea edx, [ebp - 0x48]
push edx
push 0
mov eax, dword [ebp - 4]
push eax
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
test eax, eax
je 0x404a0d
cmp dword [ebp - 0x44], 1
je 0x404a0d
cmp dword [ebp - 0x44], 3
je 0x404a0d
lea ecx, [ebp - 0x24]
push ecx
lea edx, [ebp - 0xc]
push edx
push 0
mov eax, dword [ebp - 8]
push eax
push 1
mov ecx, dword [ebp - 4]
push ecx
call dword [sym.imp.ADVAPI32.dll_EnumDependentServicesA]
test eax, eax
jne 0x4049ae
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xea
jne 0x4049ae
mov edx, dword [ebp - 0xc]
push edx
call fcn.00412e80
add esp, 4
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
je 0x4049ae
lea eax, [ebp - 0x24]
push eax
lea ecx, [ebp - 0xc]
push ecx
mov edx, dword [ebp - 0xc]
push edx
mov eax, dword [ebp - 8]
push eax
push 1
mov ecx, dword [ebp - 4]
push ecx
call dword [sym.imp.ADVAPI32.dll_EnumDependentServicesA]
test eax, eax
je 0x4049a2
imul esi, dword [ebp - 0x10], 0x24
add esi, dword [ebp - 8]
mov ecx, 9
lea edi, [ebp - 0x90]
rep movsd dword es:[edi], dword [esi]
push 0x24
mov edx, dword [ebp - 0x90]
push edx
mov eax, dword [ebp - 0x18]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
je 0x4049a2
lea ecx, [ebp - 0x6c]
push ecx
push 1
mov edx, dword [ebp - 0x14]
push edx
call dword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
je 0x4049a2
cmp dword [ebp - 0x68], 1
je 0x404997
mov eax, dword [ebp - 0x54]
push eax
call dword [sym.imp.KERNEL32.dll_Sleep]
nop
lea ecx, [ebp - 0xc]
push ecx
push 0x24
lea edx, [ebp - 0x6c]
push edx
push 0
mov eax, dword [ebp - 0x14]
push eax
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
test eax, eax
je 0x404995
cmp dword [ebp - 0x68], 1
je 0x404993
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [ebp - 0x1c]
cmp eax, dword [ebp - 0x20]
jbe 0x404995
jmp 0x404997
jmp 0x404954
mov ecx, dword [ebp - 0x14]
push ecx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
nop
mov edx, dword [ebp - 8]
push edx
call fcn.00412eb0
add esp, 4
lea eax, [ebp - 0x48]
push eax
push 1
mov ecx, dword [ebp - 4]
push ecx
call dword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
je 0x404a0d
cmp dword [ebp - 0x44], 1
je 0x404a0d
mov edx, dword [ebp - 0x30]
push edx
call dword [sym.imp.KERNEL32.dll_Sleep]
nop
lea eax, [ebp - 0xc]
push eax
push 0x24
lea ecx, [ebp - 0x48]
push ecx
push 0
mov edx, dword [ebp - 4]
push edx
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
test eax, eax
jne 0x4049f1
jmp 0x404a0d
cmp dword [ebp - 0x44], 1
jne 0x4049f9
jmp 0x404a0d
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [ebp - 0x1c]
cmp eax, dword [ebp - 0x20]
jbe 0x404a0b
jmp 0x404a0d
jmp 0x4049c2
mov eax, dword [ebp - 4]
push eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
nop
jmp 0x404837
mov ecx, dword [ebp - 0x18]
push ecx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
nop
pop edi
pop esi
mov esp, ebp
pop ebp
ret