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

Disassembly:
sub esp, 0x2c
push ebx
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov ebx, eax
mov dword [esp + 4], ebx
test ebx, ebx
jne 0x47b412
pop ebx
add esp, 0x2c
ret
mov eax, dword [esp + 0x34]
push edi
push 0xf01ff
push eax
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov edi, eax
test edi, edi
jne 0x47b439
push ebx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
pop edi
xor eax, eax
pop ebx
add esp, 0x2c
ret
push esi
call fcn.0047b350
lea ecx, [esp + 0x10]
push ecx
push 0x24
lea edx, [esp + 0x1c]
push edx
push 0
push edi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
test eax, eax
jge 0x47b46d
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push edi
call esi
push ebx
call esi
pop esi
pop edi
xor eax, eax
pop ebx
add esp, 0x2c
ret
mov eax, dword [esp + 0x18]
cmp eax, 1
je 0x47b493
cmp eax, 3
je 0x47b493
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push edi
call esi
push ebx
call esi
pop esi
pop edi
mov eax, 1
pop ebx
add esp, 0x2c
ret
mov ebx, dword [sym.imp.KERNEL32.dll_GetTickCount]
push ebp
call ebx
cmp dword [esp + 0x1c], 3
mov ebp, dword [esp + 0x2c]
mov esi, eax
jne 0x47b51d
lea esp, [esp]
mov eax, 0xcccccccd
mul dword [esp + 0x30]
shr edx, 3
cmp edx, 0x3e8
jae 0x47b4cb
mov edx, 0x3e8
jmp 0x47b4d8
cmp edx, 0x2710
jbe 0x47b4d8
mov edx, 0x2710
push edx
call dword [sym.imp.KERNEL32.dll_Sleep]
lea eax, [esp + 0x14]
push eax
push 0x24
lea ecx, [esp + 0x20]
push ecx
push 0
push edi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
test eax, eax
je 0x47b54c
cmp dword [esp + 0x2c], ebp
jbe 0x47b508
call ebx
mov ebp, dword [esp + 0x2c]
mov esi, eax
jmp 0x47b516
call ebx
sub eax, esi
cmp eax, dword [esp + 0x30]
ja 0x47b696
cmp dword [esp + 0x1c], 3
je 0x47b4b0
push 0
push 0
push edi
call dword [sym.imp.ADVAPI32.dll_StartServiceW]
test eax, eax
jne 0x47b566
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push edi
call esi
mov ecx, dword [esp + 0x10]
push ecx
call esi
pop ebp
pop esi
pop edi
xor eax, eax
pop ebx
add esp, 0x2c
ret
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push edi
call esi
mov edx, dword [esp + 0x10]
push edx
call esi
pop ebp
pop esi
pop edi
xor eax, eax
pop ebx
add esp, 0x2c
ret
lea edx, [esp + 0x14]
push edx
push 0x24
lea eax, [esp + 0x20]
push eax
push 0
push edi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
test eax, eax
jne 0x47b5ad
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.QueryServiceStatusEx_failed___d__n
call fcn.004f9cd6
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
add esp, 8
push edi
call esi
mov ecx, dword [esp + 0x10]
push ecx
call esi
pop ebp
pop esi
pop edi
xor eax, eax
pop ebx
add esp, 0x2c
ret
call ebx
cmp dword [esp + 0x1c], 2
mov ebp, dword [esp + 0x2c]
mov esi, eax
jne 0x47b629
lea esp, [esp]
mov eax, 0xcccccccd
mul dword [esp + 0x30]
shr edx, 3
cmp edx, 0x3e8
jae 0x47b5db
mov edx, 0x3e8
jmp 0x47b5e8
cmp edx, 0x2710
jbe 0x47b5e8
mov edx, 0x2710
push edx
call dword [sym.imp.KERNEL32.dll_Sleep]
lea edx, [esp + 0x14]
push edx
push 0x24
lea eax, [esp + 0x20]
push eax
push 0
push edi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
test eax, eax
je 0x47b629
cmp dword [esp + 0x2c], ebp
jbe 0x47b618
call ebx
mov ebp, dword [esp + 0x2c]
mov esi, eax
jmp 0x47b622
call ebx
sub eax, esi
cmp eax, dword [esp + 0x30]
ja 0x47b629
cmp dword [esp + 0x1c], 2
je 0x47b5c0
cmp dword [esp + 0x1c], 4
jne 0x47b64d
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push edi
call esi
mov ecx, dword [esp + 0x10]
push ecx
call esi
pop ebp
pop esi
pop edi
mov eax, 1
pop ebx
add esp, 0x2c
ret
push str.Service_not_started.__n
call fcn.004f9cd6
mov edx, dword [esp + 0x20]
push edx
push str.__Current_State:__d_n
call fcn.004f9cd6
mov eax, dword [esp + 0x30]
push eax
push str.__Exit_Code:__d_n
call fcn.004f9cd6
mov ecx, dword [esp + 0x40]
push ecx
push str.__Check_Point:__d_n
call fcn.004f9cd6
mov edx, dword [esp + 0x4c]
push edx
push str.__Wait_Hint:__d_n
call fcn.004f9cd6
add esp, 0x24
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push edi
call esi
mov eax, dword [esp + 0x10]
push eax
call esi
pop ebp
pop esi
pop edi
xor eax, eax
pop ebx
add esp, 0x2c
ret