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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x34
mov eax, dword [0x1ff584]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push esi
push edi
push 0xf003f
push 0
push 0
mov esi, ecx
mov dword [ebp - 0x30], eax
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov edi, eax
mov dword [ebp - 0x2c], edi
test edi, edi
je 0x104f2c
push 0xf01ff
push esi
push edi
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov esi, eax
test esi, esi
jne 0x104f40
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
pop edi
xor eax, eax
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00162239
mov esp, ebp
pop ebp
ret 8
lea ecx, [ebp - 0x34]
push ecx
push 0x24
lea edx, [ebp - 0x28]
push edx
push 0
push esi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
test eax, eax
jne 0x104f77
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
push edi
call esi
pop edi
xor eax, eax
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00162239
mov esp, ebp
pop ebp
ret 8
mov eax, dword [ebp - 0x24]
push ebx
cmp eax, 1
je 0x105003
cmp eax, 3
jne 0x10501c
lea ecx, [ecx]
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ebx, dword [ebp - 0x14]
mov edi, eax
mov eax, 0xcccccccd
mul dword [ebp - 0x10]
shr edx, 3
cmp edx, 0x3e8
jae 0x104fb5
mov edx, 0x3e8
jmp 0x104fc2
cmp edx, 0x2710
jbe 0x104fc2
mov edx, 0x2710
push edx
call dword [sym.imp.KERNEL32.dll_Sleep]
lea eax, [ebp - 0x34]
push eax
push 0x24
lea ecx, [ebp - 0x28]
push ecx
push 0
push esi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
test eax, eax
je 0x10503d
cmp dword [ebp - 0x14], ebx
jbe 0x104fed
call dword [sym.imp.KERNEL32.dll_GetTickCount]
jmp 0x104ffa
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, edi
cmp eax, dword [ebp - 0x10]
ja 0x105061
cmp dword [ebp - 0x24], 3
je 0x104f90
mov edi, dword [ebp - 0x2c]
mov ecx, dword [ebp - 0x30]
mov edx, dword [ebp + 8]
push ecx
push edx
push esi
call dword [sym.imp.ADVAPI32.dll_StartServiceA]
test eax, eax
jne 0x105085
call dword [sym.imp.KERNEL32.dll_GetLastError]
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
push edi
call esi
pop ebx
pop edi
xor eax, eax
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00162239
mov esp, ebp
pop ebp
ret 8
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
mov edx, dword [ebp - 0x2c]
push edx
call esi
pop ebx
pop edi
xor eax, eax
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00162239
mov esp, ebp
pop ebp
ret 8
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
mov eax, dword [ebp - 0x2c]
push eax
call esi
pop ebx
pop edi
xor eax, eax
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00162239
mov esp, ebp
pop ebp
ret 8
lea eax, [ebp - 0x34]
push eax
push 0x24
lea ecx, [ebp - 0x28]
push ecx
push 0
push esi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
test eax, eax
je 0x10501c
mov edi, dword [sym.imp.KERNEL32.dll_GetTickCount]
call edi
cmp dword [ebp - 0x24], 2
mov edx, dword [ebp - 0x14]
mov ebx, eax
mov dword [ebp - 0x30], edx
jne 0x10511a
mov eax, 0xcccccccd
mul dword [ebp - 0x10]
shr edx, 3
cmp edx, 0x3e8
jae 0x1050cc
mov edx, 0x3e8
jmp 0x1050d9
cmp edx, 0x2710
jbe 0x1050d9
mov edx, 0x2710
push edx
call dword [sym.imp.KERNEL32.dll_Sleep]
lea eax, [ebp - 0x34]
push eax
push 0x24
lea ecx, [ebp - 0x28]
push ecx
push 0
push esi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
test eax, eax
je 0x10511a
mov edx, dword [ebp - 0x30]
cmp dword [ebp - 0x14], edx
jbe 0x10510b
call edi
mov ebx, eax
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x30], eax
jmp 0x105114
call edi
sub eax, ebx
cmp eax, dword [ebp - 0x10]
ja 0x10511a
cmp dword [ebp - 0x24], 2
je 0x1050b2
xor edi, edi
cmp dword [ebp - 0x24], 4
jne 0x105127
mov edi, 1
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
mov ecx, dword [ebp - 0x2c]
push ecx
call esi
mov ecx, dword [ebp - 4]
pop ebx
mov eax, edi
pop edi
xor ecx, ebp
pop esi
call fcn.00162239
mov esp, ebp
pop ebp
ret 8