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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x656598
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x2c
push ebx
push esi
xor eax, eax
push edi
mov dword [ebp - 0x18], eax
mov dword [ebp - 4], eax
mov dword [ebp - 0x1c], eax
mov byte [ebp - 4], 1
mov esi, dword [ebp + 0xc]
mov ebx, dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov dword [ebp - 0x14], eax
lea esp, [esp]
mov eax, dword [0x700724]
mov edx, dword [eax + 0xc]
mov ecx, 0x700724
call edx
add eax, 0x10
mov dword [ebp - 0x10], eax
mov byte [ebp - 4], 2
test esi, esi
je 0x4e7a33
test esi, 0xffff0000
jne 0x4e7a33
movzx edi, si
push 0
push edi
call fcn.00403bf0
add esp, 8
test eax, eax
je 0x4e7a3c
push edi
push eax
lea ecx, [ebp - 0x10]
call fcn.00407a90
jmp 0x4e7a3c
push esi
lea ecx, [ebp - 0x10]
call fcn.00409320
mov byte [ebp - 4], 3
mov eax, dword [ebp - 0x10]
push 0xf003f
push 0
push eax
call fcn.005ba710
movzx ecx, al
add esp, 4
neg ecx
sbb ecx, ecx
not ecx
and ecx, esi
push ecx
call ebx
mov edi, eax
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x10]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4e7a86
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [ebp - 0x18], edi
test edi, edi
jne 0x4e7ad0
push 0x1f4
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, dword [ebp - 0x14]
inc eax
mov dword [ebp - 0x14], eax
cmp eax, 0x14
jl 0x4e79f0
mov dword [ebp - 4], 0xffffffff
test edi, edi
je 0x4e7aba
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
pop edi
pop esi
mov eax, 1
pop ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret
xor ebx, ebx
mov ecx, dword [ebp + 8]
push 0xf01ff
push ecx
push edi
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov esi, eax
mov dword [ebp - 0x1c], esi
test esi, esi
jne 0x4e7afe
push 0x1f4
call dword [sym.imp.KERNEL32.dll_Sleep]
inc ebx
cmp ebx, 0x14
jl 0x4e7ad2
jmp 0x4e7aa8
push 0
push 0
push esi
call dword [sym.imp.ADVAPI32.dll_StartServiceW]
test eax, eax
jne 0x4e7b13
call dword [sym.imp.KERNEL32.dll_GetLastError]
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [ebp + 0x10], eax
je 0x4e7bb7
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [ebp - 0x14], eax
xor ebx, ebx
lea ecx, [ecx]
lea edx, [ebp - 0x38]
push edx
push esi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
setne al
test al, al
jne 0x4e7b55
push 0x1f4
call dword [sym.imp.KERNEL32.dll_Sleep]
inc ebx
cmp ebx, 0x14
jl 0x4e7b30
mov ebx, 4
cmp dword [ebp - 0x34], ebx
je 0x4e7b8d
nop
mov eax, dword [ebp - 0x20]
push eax
call dword [sym.imp.KERNEL32.dll_Sleep]
lea ecx, [ebp - 0x38]
push ecx
push esi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
cmp dword [ebp - 0x34], ebx
je 0x4e7b8d
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [ebp - 0x14]
cmp eax, dword [ebp + 0x14]
ja 0x4e7bb7
cmp dword [ebp - 0x34], ebx
jne 0x4e7b60
mov byte [ebp - 4], 0
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
mov dword [ebp - 4], 0xffffffff
push edi
call esi
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
xor eax, eax
pop ebx
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret
mov byte [ebp - 4], 0
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
mov dword [ebp - 4], 0xffffffff
push edi
call esi
jmp 0x4e7aba