Function at 0x40e070
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 0x44884b
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.0040d800
mov ebx, eax
mov dword [esp + 0x3c], ebx
test ebx, ebx
jne 0x40e0fe
call dword [sym.imp.KERNEL32.dll_GetLastError]
push ebx
mov esi, eax
call fcn.0042dffd
add esp, 4
mov eax, esi
jmp 0x40e427
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 0x40e134
call dword [sym.imp.KERNEL32.dll_GetLastError]
push edi
mov esi, eax
call fcn.0042dffd
add esp, 4
push ebx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, esi
jmp 0x40e427
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 0x40e2b6
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xea
je 0x40e195
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x40e176
and eax, 0xffff
or eax, 0x80070000
push eax
lea edx, [esp + 0x2c]
push edx
mov ecx, 0x452374
call fcn.00404c60
push 0x456ac8
lea eax, [esp + 0x2c]
push eax
call fcn.00434818
mov ecx, dword [esp + 0x14]
push ecx
call fcn.004305d1
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 0x40e1f2
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x40e1d3
and eax, 0xffff
or eax, 0x80070000
push eax
lea eax, [esp + 0x2c]
push eax
mov ecx, 0x452378
call fcn.00404c60
push 0x456ac8
lea ecx, [esp + 0x2c]
push ecx
call fcn.00434818
cmp dword [esp + 0x1c], 0
mov dword [esp + 0x38], 0
jbe 0x40e2b6
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 0x40e312
lea ecx, [esp + 0x64]
push ecx
mov edi, 1
push edi
push esi
call dword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
jne 0x40e25b
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x426
jne 0x40e345
cmp dword [esp + 0x68], edi
je 0x40e299
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 0x40e299
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [esp + 0x24]
cmp eax, 0x7530
ja 0x40e378
cmp dword [esp + 0x68], edi
jne 0x40e261
mov eax, dword [esp + 0x38]
add dword [esp + 0x18], 0x24
add eax, edi
mov dword [esp + 0x38], eax
cmp eax, dword [esp + 0x1c]
jb 0x40e20d
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 0x40e3a0
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
cmp eax, 0x426
je 0x40e39b
call esi
test eax, eax
jle 0x40e2f3
and eax, 0xffff
or eax, 0x80070000
push eax
lea edx, [esp + 0x2c]
push edx
mov ecx, 0x452374
call fcn.00404c60
push 0x456ac8
lea eax, [esp + 0x2c]
push eax
call fcn.00434818
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x40e326
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.00404c60
push 0x456ac8
lea edx, [esp + 0x2c]
push edx
call fcn.00434818
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x40e359
and eax, 0xffff
or eax, 0x80070000
push eax
lea eax, [esp + 0x2c]
push eax
mov ecx, 0x452374
call fcn.00404c60
push 0x456ac8
lea ecx, [esp + 0x2c]
push ecx
call fcn.00434818
push 0x800705b4
lea edx, [esp + 0x2c]
push edx
mov ecx, 0x451920
call fcn.00404c60
push 0x456ac8
lea eax, [esp + 0x2c]
push eax
call fcn.00434818
mov esi, 1
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [ebp + 8], eax
je 0x40e409
cmp dword [esp + 0x68], esi
je 0x40e3e5
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 0x40e3e5
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [esp + 0x24]
cmp eax, 0x7530
ja 0x40e402
cmp dword [esp + 0x68], esi
jne 0x40e3b1
mov ecx, dword [esp + 0x10]
push ecx
call fcn.0042dffd
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
add esp, 4
push edi
call esi
push ebx
call esi
xor eax, eax
jmp 0x40e427
mov eax, dword [esp + 0x10]
push eax
jmp 0x40e40e
mov edx, dword [esp + 0x10]
push edx
call fcn.0042dffd
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.0042decf
mov esp, ebp
pop ebp
ret