Function at 0x40dde0
Capabilities:
Check for time delay via gettickcount
Query service status
Start service

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x448890
mov eax, dword fs:[0]
push eax
sub esp, 0x30
mov eax, dword [0x45c070]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
xor esi, esi
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x38], ecx
mov dword [ebp - 0x30], esi
mov dword [ebp - 4], esi
mov dword [ebp - 0x3c], esi
mov byte [ebp - 4], 1
mov ebx, dword [sym.imp.KERNEL32.dll_Sleep]
xor edi, edi
cmp dword [ebp - 0x30], 0
jne 0x40de57
mov ecx, dword [ebp - 0x38]
call fcn.0040d800
push 0x64
mov dword [ebp - 0x30], eax
inc edi
call ebx
cmp edi, 0x14
jl 0x40de2b
cmp dword [ebp - 0x30], 0
jne 0x40de57
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x40df84
xor edi, edi
test esi, esi
jne 0x40de9d
mov edx, dword [ebp - 0x34]
mov eax, dword [ebp - 0x30]
push 0xf01ff
push edx
push eax
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
push 0x64
mov esi, eax
inc edi
call ebx
cmp edi, 0x14
jl 0x40de59
test esi, esi
jne 0x40de9d
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov eax, dword [ebp - 0x30]
test eax, eax
je 0x40de96
push eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, esi
jmp 0x40df84
push 0
push 0
push esi
call dword [sym.imp.ADVAPI32.dll_StartServiceW]
test eax, eax
jne 0x40deda
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
cmp edi, 0x420
je 0x40deda
mov ebx, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
test esi, esi
je 0x40dec9
push esi
call ebx
mov eax, dword [ebp - 0x30]
test eax, eax
je 0x40ded3
push eax
call ebx
mov eax, edi
jmp 0x40df84
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
test eax, eax
jne 0x40df05
mov edi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
test esi, esi
je 0x40def1
push esi
call edi
mov eax, dword [ebp - 0x30]
test eax, eax
je 0x40defb
push eax
call edi
mov eax, 1
jmp 0x40df84
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [ebp - 0x38], eax
xor eax, eax
xor edi, edi
jmp 0x40df17
mov eax, dword [ebp - 0x34]
test eax, eax
jne 0x40df33
lea ecx, [ebp - 0x2c]
push ecx
push esi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
push 0x64
mov dword [ebp - 0x34], eax
inc edi
call ebx
cmp edi, 0x14
jl 0x40df14
mov edi, 4
cmp dword [ebp - 0x28], edi
je 0x40df6b
lea ecx, [ecx]
mov edx, dword [ebp - 0x14]
push edx
call ebx
lea eax, [ebp - 0x2c]
push eax
push esi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
cmp dword [ebp - 0x28], edi
je 0x40df6b
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [ebp - 0x38]
cmp eax, 0x7530
ja 0x40dfa0
cmp dword [ebp - 0x28], edi
jne 0x40df40
mov edi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
test esi, esi
je 0x40df78
push esi
call edi
mov eax, dword [ebp - 0x30]
test eax, eax
je 0x40df82
push eax
call edi
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0042decf
mov esp, ebp
pop ebp
ret
mov edi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
test esi, esi
je 0x40dfad
push esi
call edi
mov eax, dword [ebp - 0x30]
test eax, eax
je 0x40dfb7
push eax
call edi
mov eax, 0x800705b4
jmp 0x40df84