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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3c
mov eax, dword [0x100e6018]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [ebp + 8]
push 0xf003f
push 0
push 0
mov byte [ebp - 0x2d], 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov ebx, eax
mov dword [ebp - 0x38], ebx
test ebx, ebx
je 0x10087793
cmp dword [esi + 0x14], 8
jb 0x10087779
mov esi, dword [esi]
push 0xf01ff
push esi
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov esi, eax
test esi, esi
jne 0x100877a5
push ebx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
pop esi
xor al, al
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.100947be
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 8]
push eax
push 0x24
lea eax, [ebp - 0x2c]
push eax
push 0
push esi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
test eax, eax
jne 0x100877da
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
push ebx
call esi
pop esi
xor al, al
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.100947be
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x28]
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GetTickCount]
cmp eax, 1
je 0x1008785f
cmp eax, 3
jne 0x10087885
call edi
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x34], eax
mov eax, 0xcccccccd
mul dword [ebp - 0x14]
shr edx, 3
cmp edx, 0x3e8
jae 0x10087817
mov edx, 0x3e8
jmp 0x10087825
cmp edx, 0x2710
mov eax, 0x2710
cmova edx, eax
push edx
call dword [sym.imp.KERNEL32.dll_Sleep]
lea eax, [ebp - 8]
push eax
push 0x24
lea eax, [ebp - 0x2c]
push eax
push 0
push esi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
test eax, eax
je 0x10087885
mov eax, dword [ebp - 0x34]
cmp dword [ebp - 0x18], eax
jbe 0x1008784f
call edi
jmp 0x10087859
call edi
sub eax, dword [ebp - 0x3c]
cmp eax, dword [ebp - 0x14]
ja 0x10087885
cmp dword [ebp - 0x28], 3
je 0x100877f2
push 0
push 0
push esi
call dword [sym.imp.ADVAPI32.dll_StartServiceW]
test eax, eax
je 0x10087885
lea eax, [ebp - 8]
push eax
push 0x24
lea eax, [ebp - 0x2c]
push eax
push 0
push esi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
test eax, eax
jne 0x100878a4
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
push ebx
call esi
pop edi
pop esi
xor al, al
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.100947be
mov esp, ebp
pop ebp
ret
call edi
mov ecx, dword [ebp - 0x28]
mov ebx, dword [ebp - 0x18]
mov dword [ebp - 0x34], eax
cmp ecx, 2
jne 0x10087920
mov eax, 0xcccccccd
mul dword [ebp - 0x14]
shr edx, 3
cmp edx, 0x3e8
jae 0x100878ce
mov edx, 0x3e8
jmp 0x100878dc
cmp edx, 0x2710
mov eax, 0x2710
cmova edx, eax
push edx
call dword [sym.imp.KERNEL32.dll_Sleep]
lea eax, [ebp - 8]
push eax
push 0x24
lea eax, [ebp - 0x2c]
push eax
push 0
push esi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
test eax, eax
je 0x1008791d
cmp dword [ebp - 0x18], ebx
jbe 0x10087909
call edi
mov ebx, dword [ebp - 0x18]
mov dword [ebp - 0x34], eax
jmp 0x10087913
call edi
sub eax, dword [ebp - 0x34]
cmp eax, dword [ebp - 0x14]
ja 0x1008791d
mov ecx, dword [ebp - 0x28]
cmp ecx, 2
je 0x100878b4
jmp 0x10087920
mov ecx, dword [ebp - 0x28]
movzx ebx, byte [ebp - 0x2d]
mov eax, 1
cmp ecx, 4
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
cmove ebx, eax
call esi
push dword [ebp - 0x38]
call esi
mov ecx, dword [ebp - 4]
pop edi
pop esi
mov al, bl
xor ecx, ebp
pop ebx
call fcn.100947be
mov esp, ebp
pop ebp
ret