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

Disassembly:
push ebp
mov ebp, esp
push 0xfffffffffffffffe
push 0x43b1b0
push 0x403a15
mov eax, dword fs:[0]
push eax
sub esp, 0x64
push ebx
push esi
push edi
mov eax, dword [0x43d01c]
xor dword [ebp - 8], eax
xor eax, ebp
push eax
lea eax, [ebp - 0x10]
mov dword fs:[0], eax
mov dword [ebp - 0x30], 0x9c40
mov ebx, dword [sym.imp.KERNEL32.dll_GetTickCount]
call ebx
mov esi, eax
mov dword [ebp - 0x2c], esi
lea eax, [ebp - 0x50]
push eax
mov edi, dword [ebp + 0xc]
push edi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
jne 0x404920
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
mov eax, dword [ebp - 0x4c]
cmp eax, 1
je 0x404bc9
cmp eax, 3
jne 0x404969
mov ecx, dword [ebp - 0x38]
push ecx
call dword [sym.imp.KERNEL32.dll_Sleep]
lea edx, [ebp - 0x50]
push edx
push edi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
je 0x404906
cmp dword [ebp - 0x4c], 1
je 0x404bc9
call ebx
sub eax, esi
cmp eax, 0x9c40
ja 0x404b1a
cmp dword [ebp - 0x4c], 3
je 0x404931
lea eax, [ebp - 0x20]
push eax
lea ecx, [ebp - 0x1c]
push ecx
push 0
push 0
push 1
push edi
mov ebx, dword [sym.imp.ADVAPI32.dll_EnumDependentServicesW]
call ebx
test eax, eax
jne 0x404b6e
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
cmp eax, 0xea
je 0x4049ad
call esi
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
mov edx, dword [ebp - 0x1c]
push edx
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 0x404906
mov dword [ebp - 4], 0
lea eax, [ebp - 0x20]
push eax
lea ecx, [ebp - 0x1c]
push ecx
mov edx, dword [ebp - 0x1c]
push edx
push esi
push 1
push edi
call ebx
test eax, eax
jne 0x404a1b
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push 0xfffffffffffffffe
lea eax, [ebp - 0x10]
push eax
push 0x43d01c
call sub.MSVCR90.dll__local_unwind4
add esp, 0xc
mov eax, esi
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
xor ebx, ebx
mov dword [ebp - 0x24], ebx
cmp ebx, dword [ebp - 0x20]
jae 0x404b62
lea ecx, [ebx + ebx*8]
lea esi, [esi + ecx*4]
mov ecx, 9
lea edi, [ebp - 0x74]
rep movsd dword es:[edi], dword [esi]
push 0x24
mov edx, dword [ebp - 0x74]
push edx
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov esi, eax
mov dword [ebp - 0x34], esi
test esi, esi
jne 0x404a83
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push 0xfffffffffffffffe
lea ecx, [ebp - 0x10]
push ecx
push 0x43d01c
call sub.MSVCR90.dll__local_unwind4
add esp, 0xc
mov eax, esi
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
mov edi, 1
mov dword [ebp - 4], edi
lea edx, [ebp - 0x50]
push edx
push edi
push esi
call dword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
je 0x4049ea
nop
cmp dword [ebp - 0x4c], edi
je 0x404b33
push 0x2710
call dword [sym.imp.KERNEL32.dll_Sleep]
lea ecx, [ebp - 0x50]
push ecx
push esi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
jne 0x404af4
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push 0xfffffffffffffffe
lea edx, [ebp - 0x10]
push edx
push 0x43d01c
call sub.MSVCR90.dll__local_unwind4
add esp, 0xc
mov eax, esi
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
cmp dword [ebp - 0x4c], edi
je 0x404b33
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [ebp - 0x2c]
cmp eax, dword [ebp - 0x30]
jbe 0x404aa0
push 0xfffffffffffffffe
lea eax, [ebp - 0x10]
push eax
push 0x43d01c
call sub.MSVCR90.dll__local_unwind4
add esp, 0xc
mov eax, 0x5b4
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
mov dword [ebp - 4], 0
call fcn.00404b5a
add ebx, edi
mov dword [ebp - 0x24], ebx
mov edi, dword [ebp + 0xc]
mov esi, dword [ebp - 0x28]
jmp 0x404a20
mov dword [ebp - 4], 0xfffffffe
call fcn.00404be5
lea ecx, [ebp - 0x50]
push ecx
mov ebx, 1
push ebx
push edi
call dword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
je 0x404906
cmp dword [ebp - 0x4c], ebx
je 0x404bc9
lea esp, [esp]
push 0x2710
call dword [sym.imp.KERNEL32.dll_Sleep]
lea edx, [ebp - 0x50]
push edx
push edi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
je 0x404906
cmp dword [ebp - 0x4c], ebx
je 0x404bc9
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, esi
cmp eax, dword [ebp - 0x30]
ja 0x404b1a
cmp dword [ebp - 0x4c], ebx
jne 0x404b90
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 8