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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x447e70
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 0x40ddd7
mov ecx, dword [ebp - 0x38]
call fcn.0040d790
push 0x64
mov dword [ebp - 0x30], eax
inc edi
call ebx
cmp edi, 0x14
jl 0x40ddab
cmp dword [ebp - 0x30], 0
jne 0x40ddd7
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x40df04
xor edi, edi
test esi, esi
jne 0x40de1d
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 0x40ddd9
test esi, esi
jne 0x40de1d
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov eax, dword [ebp - 0x30]
test eax, eax
je 0x40de16
push eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, esi
jmp 0x40df04
push 0
push 0
push esi
call dword [sym.imp.ADVAPI32.dll_StartServiceW]
test eax, eax
jne 0x40de5a
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
cmp edi, 0x420
je 0x40de5a
mov ebx, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
test esi, esi
je 0x40de49
push esi
call ebx
mov eax, dword [ebp - 0x30]
test eax, eax
je 0x40de53
push eax
call ebx
mov eax, edi
jmp 0x40df04
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
test eax, eax
jne 0x40de85
mov edi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
test esi, esi
je 0x40de71
push esi
call edi
mov eax, dword [ebp - 0x30]
test eax, eax
je 0x40de7b
push eax
call edi
mov eax, 1
jmp 0x40df04
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [ebp - 0x38], eax
xor eax, eax
xor edi, edi
jmp 0x40de97
mov eax, dword [ebp - 0x34]
test eax, eax
jne 0x40deb3
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 0x40de94
mov edi, 4
cmp dword [ebp - 0x28], edi
je 0x40deeb
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 0x40deeb
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [ebp - 0x38]
cmp eax, 0x7530
ja 0x40df20
cmp dword [ebp - 0x28], edi
jne 0x40dec0
mov edi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
test esi, esi
je 0x40def8
push esi
call edi
mov eax, dword [ebp - 0x30]
test eax, eax
je 0x40df02
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.0042d4af
mov esp, ebp
pop ebp
ret
mov edi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
test esi, esi
je 0x40df2d
push esi
call edi
mov eax, dword [ebp - 0x30]
test eax, eax
je 0x40df37
push eax
call edi
mov eax, 0x800705b4
jmp 0x40df04