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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
mov eax, dword [0x56afe8]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
xor edi, edi
cmp dword [ebp + 0x18], edi
je 0x486df4
push 0xf003f
push edi
push edi
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov ebx, eax
mov dword [ebp - 0x28], ebx
test ebx, ebx
je 0x486df4
cmp dword [ebp + 0x1c], 8
lea ecx, [ebp + 8]
jb 0x486c88
mov ecx, dword [ebp + 8]
push 0xf01ff
push ecx
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov esi, eax
test esi, esi
jne 0x486ca7
push ebx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x486df4
lea eax, [ebp - 0x2c]
mov dword [ebp - 0x2c], edi
push eax
push edi
push edi
push esi
call dword [sym.imp.ADVAPI32.dll_QueryServiceConfigW]
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x486d07
mov eax, dword [ebp - 0x2c]
push eax
push edi
mov dword [ebp - 0x24], eax
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov ebx, eax
test ebx, ebx
je 0x486cfd
lea eax, [ebp - 0x2c]
push eax
push dword [ebp - 0x24]
push ebx
push esi
call dword [sym.imp.ADVAPI32.dll_QueryServiceConfigW]
test eax, eax
je 0x486cfd
push edi
push edi
push edi
push edi
push edi
push edi
push edi
push 0xffffffffffffffff
push 2
push 0xffffffffffffffff
push esi
call dword [sym.imp.ADVAPI32.dll_ChangeServiceConfigW]
push ebx
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov ebx, dword [ebp - 0x28]
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [ebp - 0x28], eax
call fcn.0048814f
mov dword [ebp - 0x24], eax
jmp 0x486d3d
mov eax, dword [ebp - 0x1c]
cmp eax, 2
je 0x486d27
cmp eax, 3
jne 0x486d4f
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [ebp - 0x28]
cmp eax, dword [ebp - 0x24]
ja 0x486d4c
lea eax, [ebp - 0x20]
push eax
push esi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
jne 0x486d1a
mov eax, dword [ebp - 0x1c]
cmp eax, 4
je 0x486de5
mov dword [ebp - 0x24], edi
push edi
push edi
push esi
call dword [sym.imp.ADVAPI32.dll_StartServiceW]
test eax, eax
jne 0x486d95
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x41f
je 0x486d7c
cmp eax, 0x41e
jne 0x486d9d
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, dword [ebp - 0x24]
inc eax
mov dword [ebp - 0x24], eax
cmp eax, 0x1e
jl 0x486d5b
jmp 0x486d9d
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [ebp - 0x28], eax
call fcn.0048814f
mov dword [ebp - 0x24], eax
jmp 0x486dce
mov eax, dword [ebp - 0x1c]
cmp eax, 2
jne 0x486de0
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [ebp - 0x28]
cmp eax, dword [ebp - 0x24]
ja 0x486ddd
lea eax, [ebp - 0x20]
push eax
push esi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
jne 0x486db0
mov eax, dword [ebp - 0x1c]
cmp eax, 4
jne 0x486de8
xor edi, edi
inc edi
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
push ebx
call esi
lea ecx, [ebp + 8]
call fcn.00410d88
mov ecx, dword [ebp - 4]
mov eax, edi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00522d04
leave
ret 0x18