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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x447e2b
mov eax, dword fs:[0]
push eax
sub esp, 0x78
mov eax, dword [0x45c070]
xor eax, esp
mov dword [esp + 0x70], eax
push ebx
push esi
push edi
mov eax, dword [0x45c070]
xor eax, esp
push eax
lea eax, [esp + 0x88]
mov dword fs:[0], eax
xor eax, eax
mov edi, ecx
mov esi, edx
mov dword [esp + 0x3c], eax
mov dword [esp + 0x90], eax
mov dword [esp + 0x20], eax
mov dword [esp + 0x10], eax
mov byte [esp + 0x90], 2
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, esi
mov dword [esp + 0x24], eax
call fcn.0040d790
mov ebx, eax
mov dword [esp + 0x3c], ebx
test ebx, ebx
jne 0x40e07e
call dword [sym.imp.KERNEL32.dll_GetLastError]
push ebx
mov esi, eax
call fcn.0042d5dd
add esp, 4
mov eax, esi
jmp 0x40e3a7
push 0xf01ff
push edi
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov edi, eax
mov dword [esp + 0x20], edi
test edi, edi
jne 0x40e0b4
call dword [sym.imp.KERNEL32.dll_GetLastError]
push edi
mov esi, eax
call fcn.0042d5dd
add esp, 4
push ebx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, esi
jmp 0x40e3a7
mov esi, dword [sym.imp.ADVAPI32.dll_EnumDependentServicesW]
lea eax, [esp + 0x1c]
push eax
lea ecx, [esp + 0x18]
push ecx
push 0
push 0
push 1
push edi
call esi
test eax, eax
jne 0x40e236
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xea
je 0x40e115
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x40e0f6
and eax, 0xffff
or eax, 0x80070000
push eax
lea edx, [esp + 0x2c]
push edx
mov ecx, 0x452274
call fcn.00404c70
push 0x456818
lea eax, [esp + 0x2c]
push eax
call fcn.00433e48
mov ecx, dword [esp + 0x14]
push ecx
call fcn.0042fc11
add esp, 4
lea edx, [esp + 0x1c]
push edx
mov edx, dword [esp + 0x18]
lea ecx, [esp + 0x18]
push ecx
push edx
push eax
push 1
push edi
mov dword [esp + 0x28], eax
call esi
test eax, eax
jne 0x40e172
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x40e153
and eax, 0xffff
or eax, 0x80070000
push eax
lea eax, [esp + 0x2c]
push eax
mov ecx, 0x452278
call fcn.00404c70
push 0x456818
lea ecx, [esp + 0x2c]
push ecx
call fcn.00433e48
cmp dword [esp + 0x1c], 0
mov dword [esp + 0x38], 0
jbe 0x40e236
mov edx, dword [esp + 0x10]
mov dword [esp + 0x18], edx
mov esi, dword [esp + 0x18]
mov ecx, 9
lea edi, [esp + 0x40]
rep movsd dword es:[edi], dword [esi]
mov eax, dword [esp + 0x40]
push 0x24
push eax
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov esi, eax
test esi, esi
je 0x40e292
lea ecx, [esp + 0x64]
push ecx
mov edi, 1
push edi
push esi
call dword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
jne 0x40e1db
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x426
jne 0x40e2c5
cmp dword [esp + 0x68], edi
je 0x40e219
mov edx, dword [esp + 0x7c]
push edx
call dword [sym.imp.KERNEL32.dll_Sleep]
lea eax, [esp + 0x64]
push eax
push esi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
cmp dword [esp + 0x68], edi
je 0x40e219
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [esp + 0x24]
cmp eax, 0x7530
ja 0x40e2f8
cmp dword [esp + 0x68], edi
jne 0x40e1e1
mov eax, dword [esp + 0x38]
add dword [esp + 0x18], 0x24
add eax, edi
mov dword [esp + 0x38], eax
cmp eax, dword [esp + 0x1c]
jb 0x40e18d
mov edi, dword [esp + 0x20]
lea ecx, [esp + 0x64]
push ecx
mov esi, 1
push esi
push edi
call dword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
jne 0x40e320
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
cmp eax, 0x426
je 0x40e31b
call esi
test eax, eax
jle 0x40e273
and eax, 0xffff
or eax, 0x80070000
push eax
lea edx, [esp + 0x2c]
push edx
mov ecx, 0x452274
call fcn.00404c70
push 0x456818
lea eax, [esp + 0x2c]
push eax
call fcn.00433e48
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x40e2a6
and eax, 0xffff
or eax, 0x80070000
push eax
lea ecx, [esp + 0x2c]
push ecx
mov ecx, str.hDepService__::OpenServiceW__hSCM__ess.lpServiceName__0x0020__0x0004_
call fcn.00404c70
push 0x456818
lea edx, [esp + 0x2c]
push edx
call fcn.00433e48
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x40e2d9
and eax, 0xffff
or eax, 0x80070000
push eax
lea eax, [esp + 0x2c]
push eax
mov ecx, 0x452274
call fcn.00404c70
push 0x456818
lea ecx, [esp + 0x2c]
push ecx
call fcn.00433e48
push 0x800705b4
lea edx, [esp + 0x2c]
push edx
mov ecx, 0x451820
call fcn.00404c70
push 0x456818
lea eax, [esp + 0x2c]
push eax
call fcn.00433e48
mov esi, 1
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [ebp + 8], eax
je 0x40e389
cmp dword [esp + 0x68], esi
je 0x40e365
mov ecx, dword [esp + 0x7c]
push ecx
call dword [sym.imp.KERNEL32.dll_Sleep]
lea edx, [esp + 0x64]
push edx
push edi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
cmp dword [esp + 0x68], esi
je 0x40e365
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [esp + 0x24]
cmp eax, 0x7530
ja 0x40e382
cmp dword [esp + 0x68], esi
jne 0x40e331
mov ecx, dword [esp + 0x10]
push ecx
call fcn.0042d5dd
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
add esp, 4
push edi
call esi
push ebx
call esi
xor eax, eax
jmp 0x40e3a7
mov eax, dword [esp + 0x10]
push eax
jmp 0x40e38e
mov edx, dword [esp + 0x10]
push edx
call fcn.0042d5dd
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
add esp, 4
push edi
call esi
push ebx
call esi
mov eax, 1
mov ecx, dword [esp + 0x88]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x70]
xor ecx, esp
call fcn.0042d4af
mov esp, ebp
pop ebp
ret