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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x451240
push 0x4047a8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x64
push ebx
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ebx, eax
mov dword [ebp - 0x3c], ebx
mov dword [ebp - 0x1c], 0
lea eax, [ebp - 0x1c]
push eax
push 0x24
lea ecx, [ebp - 0x38]
push ecx
push 0
mov esi, dword [ebp + 0xc]
push esi
mov edi, dword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
call edi
test eax, eax
jne 0x401a98
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x34]
cmp eax, 1
je 0x401da0
cmp eax, 3
jne 0x401aec
push 0x7d0
call dword [sym.imp.KERNEL32.dll_Sleep]
lea edx, [ebp - 0x1c]
push edx
push 0x24
lea eax, [ebp - 0x38]
push eax
push 0
push esi
call edi
test eax, eax
je 0x401d48
cmp dword [ebp - 0x34], 1
je 0x401da0
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, ebx
cmp eax, dword [ebp + 0x14]
ja 0x401cc7
cmp dword [ebp - 0x34], 3
je 0x401aa9
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x401d37
lea ecx, [ebp - 0x44]
push ecx
lea edx, [ebp - 0x48]
push edx
push 0
push 0
push 1
push esi
mov ebx, dword [sym.imp.ADVAPI32.dll_EnumDependentServicesA]
call ebx
test eax, eax
jne 0x401d34
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
call edi
cmp eax, 0xea
je 0x401b38
call edi
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x48]
push eax
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edi, eax
mov dword [ebp - 0x40], edi
test edi, edi
jne 0x401b6b
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x44]
push ecx
lea edx, [ebp - 0x48]
push edx
mov eax, dword [ebp - 0x48]
push eax
push edi
push 1
push esi
call ebx
test eax, eax
jne 0x401bb1
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push 0xffffffffffffffff
lea ecx, [ebp - 0x10]
push ecx
call fcn.004046f2
add esp, 8
mov eax, esi
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
xor ebx, ebx
mov dword [ebp - 0x70], ebx
cmp ebx, dword [ebp - 0x44]
jae 0x401d06
lea edx, [ebx + ebx*8]
lea esi, [edi + edx*4]
mov ecx, 9
lea edi, [ebp - 0x6c]
rep movsd dword es:[edi], dword [esi]
push 0x24
mov eax, dword [ebp - 0x6c]
push eax
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov esi, eax
mov dword [ebp - 0x74], esi
test esi, esi
jne 0x401c11
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push 0xffffffffffffffff
lea edx, [ebp - 0x10]
push edx
call fcn.004046f2
add esp, 8
mov eax, esi
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edi, 1
mov dword [ebp - 4], edi
lea eax, [ebp - 0x38]
push eax
push edi
push esi
call dword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
jne 0x401c52
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push 0xffffffffffffffff
lea ecx, [ebp - 0x10]
push ecx
call fcn.004046f2
add esp, 8
mov eax, esi
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp dword [ebp - 0x34], edi
je 0x401cdd
push 0x7d0
call dword [sym.imp.KERNEL32.dll_Sleep]
lea edx, [ebp - 0x48]
push edx
push 0x24
lea eax, [ebp - 0x38]
push eax
push 0
push esi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
test eax, eax
jne 0x401ca6
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push 0xffffffffffffffff
lea ecx, [ebp - 0x10]
push ecx
call fcn.004046f2
add esp, 8
mov eax, esi
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp dword [ebp - 0x34], edi
je 0x401cdd
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [ebp - 0x3c]
cmp eax, dword [ebp + 0x14]
jbe 0x401c52
push 0xffffffffffffffff
lea edx, [ebp - 0x10]
push edx
call fcn.004046f2
add esp, 8
mov eax, 0x5b4
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov dword [ebp - 4], 0
call fcn.00401cfe
inc ebx
mov dword [ebp - 0x70], ebx
mov esi, dword [ebp + 0xc]
mov edi, dword [ebp - 0x40]
jmp 0x401bb6
mov dword [ebp - 4], 0xffffffff
call fcn.00401d1a
jmp 0x401d37
mov ebx, dword [ebp - 0x3c]
lea eax, [ebp - 0x38]
push eax
push 1
push esi
call dword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
jne 0x401d5f
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp dword [ebp - 0x34], 1
je 0x401da0
push 0x7d0
call dword [sym.imp.KERNEL32.dll_Sleep]
lea ecx, [ebp - 0x1c]
push ecx
push 0x24
lea edx, [ebp - 0x38]
push edx
push 0
push esi
call edi
test eax, eax
je 0x401d48
cmp dword [ebp - 0x34], 1
je 0x401da0
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, ebx
cmp eax, dword [ebp + 0x14]
ja 0x401cc7
cmp dword [ebp - 0x34], 1
jne 0x401d65
xor eax, eax
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret