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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x23c
mov eax, dword [0x40a03c]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
push 0xf01ff
mov esi, ecx
push 0x4092dc
push esi
mov dword [ebp - 0x234], eax
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov edi, eax
test edi, edi
jne 0x401be5
push eax
push eax
push eax
push eax
push eax
push 0x40bd88
push 1
push 3
push 1
push 0xf01ff
push 0x4092dc
push 0x4092dc
push esi
call dword [sym.imp.ADVAPI32.dll_CreateServiceW]
mov edi, eax
test edi, edi
jne 0x401d3d
mov esi, str.CreateService:
call fcn.004012d0
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00401d8d
mov esp, ebp
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov esi, dword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
lea ecx, [ebp - 0x23c]
push ecx
push 0x24
lea edx, [ebp - 0x230]
push edx
push 0
push edi
mov dword [ebp - 0x238], eax
call esi
test eax, eax
jne 0x401c34
mov esi, str.QueryServiceStatusEx_1_:
call fcn.004012d0
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00401d8d
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x22c]
cmp eax, 3
jne 0x401cbd
mov ebx, dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x401c50
mov eax, 0xcccccccd
mul dword [ebp - 0x218]
shr edx, 3
cmp edx, 0x3e8
jae 0x401c6d
mov edx, 0x3e8
jmp 0x401c7a
cmp edx, 0x2710
jbe 0x401c7a
mov edx, 0x2710
push edx
call ebx
lea eax, [ebp - 0x23c]
push eax
push 0x24
lea ecx, [ebp - 0x230]
push ecx
push 0
push edi
call esi
test eax, eax
je 0x401cf1
cmp dword [ebp - 0x22c], 1
je 0x401cc2
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [ebp - 0x238]
cmp eax, 0x7530
ja 0x401d15
mov eax, dword [ebp - 0x22c]
cmp eax, 3
je 0x401c50
cmp eax, 1
jne 0x401d39
mov ecx, dword [ebp - 0x234]
lea edx, [ebp - 0x20c]
call fcn.004016d0
test eax, eax
jne 0x401d3d
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00401d8d
mov esp, ebp
pop ebp
ret
mov esi, str.QueryServiceStatusEx_2_:
call fcn.004012d0
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00401d8d
mov esp, ebp
pop ebp
ret
mov esi, str.Service_stop_timed_out:
call fcn.004012d0
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00401d8d
mov esp, ebp
pop ebp
ret
test eax, eax
jne 0x401d70
push 0
push 0
push edi
call dword [sym.imp.ADVAPI32.dll_StartServiceW]
test eax, eax
jne 0x401d70
mov esi, str.StartService:
call fcn.004012d0
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00401d8d
mov esp, ebp
pop ebp
ret
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
mov eax, 1
pop ebx
call fcn.00401d8d
mov esp, ebp
pop ebp
ret