Function at 0x100158a0
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 0x10081bec
mov eax, dword fs:[0]
push eax
sub esp, 0x14c
mov eax, dword [0x100ac1c4]
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 0x10015912
mov eax, 0x80004003
mov dword [ebp - 0x13c], eax
jmp 0x10015bfb
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 0x10015a96
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 0x10015a93
mov eax, dword [ebp - 0x30]
cmp eax, 1
je 0x10015962
cmp eax, 3
jne 0x10015a93
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 0x10015a1e
nop word [eax + eax]
mov eax, 0xcccccccd
mul dword [ebp - 0x1c]
shr edx, 3
cmp edx, 0x3e8
jae 0x100159aa
mov edx, 0x3e8
jmp 0x100159b3
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 0x10015a93
mov eax, dword [ebp - 0x140]
cmp dword [ebp - 0x20], eax
jbe 0x100159fa
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, dword [ebp - 0x20]
mov dword [ebp - 0x13c], eax
mov dword [ebp - 0x140], ecx
jmp 0x10015a0f
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [ebp - 0x13c]
cmp eax, dword [ebp - 0x1c]
ja 0x10015a93
cmp dword [ebp - 0x30], 3
mov ecx, 0x2710
je 0x10015990
push dword [ebp - 0x148]
lea ecx, [ebp - 0x138]
mov dword [ebp - 0x14c], 0
mov dword [ebp - 0x13c], 0
call fcn.100152e0
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x150]
push dword [eax]
call fcn.10003cf0
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x134]
mov eax, dword [ebp - 0x138]
cmp eax, ecx
je 0x10015a71
push eax
call fcn.10055f63
add esp, 4
mov eax, dword [ebp - 0x150]
cmp dword [eax - 0xc], 0
je 0x10015aa9
lea ecx, [ebp - 0x14c]
push ecx
push eax
call dword [sym.imp.SHELL32.dll_CommandLineToArgvW]
mov dword [ebp - 0x13c], eax
jmp 0x10015aab
push edi
call esi
push ebx
call esi
mov eax, 0x80004005
mov dword [ebp - 0x13c], eax
jmp 0x10015be0
xor eax, eax
push eax
push dword [ebp - 0x14c]
push edi
call dword [sym.imp.ADVAPI32.dll_StartServiceW]
test eax, eax
jne 0x10015ac5
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x10015adf
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 0x10015b05
push edi
call esi
push ebx
call esi
mov eax, dword [ebp - 0x13c]
test eax, eax
je 0x10015af6
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov dword [ebp - 0x13c], 0x80004005
jmp 0x10015bcb
call dword [sym.imp.KERNEL32.dll_GetTickCount]
cmp dword [ebp - 0x30], 2
mov dword [ebp - 0x148], eax
mov eax, dword [ebp - 0x20]
jne 0x10015bac
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 0x10015b4a
mov edx, 0x3e8
jmp 0x10015b58
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 0x10015ba0
cmp dword [ebp - 0x20], esi
jbe 0x10015b8d
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, dword [ebp - 0x20]
mov ebx, eax
mov esi, ecx
jmp 0x10015b9a
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, ebx
cmp eax, dword [ebp - 0x1c]
ja 0x10015ba0
cmp dword [ebp - 0x30], 2
je 0x10015b30
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 0x10015bc3
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.100054b0
mov eax, dword [ebp - 0x13c]
mov byte [ebp - 4], 0
test edi, edi
je 0x10015bfb
push edi
call esi
mov eax, dword [ebp - 0x13c]
mov dword [ebp - 0x158], 0
mov dword [ebp - 4], 0xffffffff
test ebx, ebx
je 0x10015c19
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.10047acb
mov esp, ebp
pop ebp
ret