Function at 0x1000cb70
Capabilities:
Accept command line arguments
Check for time delay via gettickcount
Query service status
Start service

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1005684c
mov eax, dword fs:[0]
push eax
sub esp, 0x14c
mov eax, dword [0x10079214]
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 + 0xc]
mov edi, dword [ebp + 8]
push 0xf003f
push 0
push 0
mov dword [ebp - 0x148], eax
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov ebx, eax
mov dword [ebp - 0x154], ebx
mov dword [ebp - 4], 0
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
test ebx, ebx
jne 0x1000cbe2
mov eax, 0x80004003
mov dword [ebp - 0x13c], eax
jmp 0x1000cecb
push 0xf01ff
push edi
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov edi, eax
mov dword [ebp - 0x158], edi
mov byte [ebp - 4], 1
test edi, edi
je 0x1000cd66
lea eax, [ebp - 0x144]
push eax
push 0x24
lea eax, [ebp - 0x34]
push eax
push 0
push edi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
test eax, eax
je 0x1000cd63
mov eax, dword [ebp - 0x30]
cmp eax, 1
je 0x1000cc32
cmp eax, 3
jne 0x1000cd63
call dword [sym.imp.KERNEL32.dll_GetTickCount]
cmp dword [ebp - 0x30], 3
mov ecx, 0x2710
mov dword [ebp - 0x13c], eax
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x140], eax
jne 0x1000ccee
nop word [eax + eax]
mov eax, 0xcccccccd
mul dword [ebp - 0x1c]
shr edx, 3
cmp edx, 0x3e8
jae 0x1000cc7a
mov edx, 0x3e8
jmp 0x1000cc83
cmp edx, 0x2710
cmova edx, ecx
push edx
call dword [sym.imp.KERNEL32.dll_Sleep]
lea eax, [ebp - 0x144]
push eax
push 0x24
lea eax, [ebp - 0x34]
push eax
push 0
push edi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
test eax, eax
je 0x1000cd63
mov eax, dword [ebp - 0x140]
cmp dword [ebp - 0x20], eax
jbe 0x1000ccca
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, dword [ebp - 0x20]
mov dword [ebp - 0x13c], eax
mov dword [ebp - 0x140], ecx
jmp 0x1000ccdf
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [ebp - 0x13c]
cmp eax, dword [ebp - 0x1c]
ja 0x1000cd63
cmp dword [ebp - 0x30], 3
mov ecx, 0x2710
je 0x1000cc60
push dword [ebp - 0x148]
lea ecx, [ebp - 0x138]
mov dword [ebp - 0x14c], 0
mov dword [ebp - 0x13c], 0
call fcn.1000c5b0
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x150]
push dword [eax]
call fcn.100036d0
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x134]
mov eax, dword [ebp - 0x138]
cmp eax, ecx
je 0x1000cd41
push eax
call fcn.10037222
add esp, 4
mov eax, dword [ebp - 0x150]
cmp dword [eax - 0xc], 0
je 0x1000cd79
lea ecx, [ebp - 0x14c]
push ecx
push eax
call dword [sym.imp.SHELL32.dll_CommandLineToArgvW]
mov dword [ebp - 0x13c], eax
jmp 0x1000cd7b
push edi
call esi
push ebx
call esi
mov eax, 0x80004005
mov dword [ebp - 0x13c], eax
jmp 0x1000ceb0
xor eax, eax
push eax
push dword [ebp - 0x14c]
push edi
call dword [sym.imp.ADVAPI32.dll_StartServiceW]
test eax, eax
jne 0x1000cd95
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x1000cdaf
lea eax, [ebp - 0x144]
push eax
push 0x24
lea eax, [ebp - 0x34]
push eax
push 0
push edi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
test eax, eax
jne 0x1000cdd5
push edi
call esi
push ebx
call esi
mov eax, dword [ebp - 0x13c]
test eax, eax
je 0x1000cdc6
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov dword [ebp - 0x13c], 0x80004005
jmp 0x1000ce9b
call dword [sym.imp.KERNEL32.dll_GetTickCount]
cmp dword [ebp - 0x30], 2
mov dword [ebp - 0x148], eax
mov eax, dword [ebp - 0x20]
jne 0x1000ce7c
mov ebx, dword [ebp - 0x148]
mov esi, eax
nop word [eax + eax]
mov eax, 0xcccccccd
mul dword [ebp - 0x1c]
shr edx, 3
cmp edx, 0x3e8
jae 0x1000ce1a
mov edx, 0x3e8
jmp 0x1000ce28
cmp edx, 0x2710
mov eax, 0x2710
cmova edx, eax
push edx
call dword [sym.imp.KERNEL32.dll_Sleep]
lea eax, [ebp - 0x144]
push eax
push 0x24
lea eax, [ebp - 0x34]
push eax
push 0
push edi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
test eax, eax
je 0x1000ce70
cmp dword [ebp - 0x20], esi
jbe 0x1000ce5d
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, dword [ebp - 0x20]
mov ebx, eax
mov esi, ecx
jmp 0x1000ce6a
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, ebx
cmp eax, dword [ebp - 0x1c]
ja 0x1000ce70
cmp dword [ebp - 0x30], 2
je 0x1000ce00
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov ebx, dword [ebp - 0x154]
push edi
call esi
push ebx
call esi
mov eax, dword [ebp - 0x13c]
test eax, eax
je 0x1000ce93
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
xor eax, eax
mov dword [ebp - 0x13c], eax
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x150]
call fcn.10003b50
mov eax, dword [ebp - 0x13c]
mov byte [ebp - 4], 0
test edi, edi
je 0x1000cecb
push edi
call esi
mov eax, dword [ebp - 0x13c]
mov dword [ebp - 0x158], 0
mov dword [ebp - 4], 0xffffffff
test ebx, ebx
je 0x1000cee9
push ebx
call esi
mov eax, dword [ebp - 0x13c]
mov dword [ebp - 0x154], 0
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.1002deb9
mov esp, ebp
pop ebp
ret