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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5890d8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x3c
push ebx
push esi
xor eax, eax
push edi
mov dword [ebp - 0x18], eax
mov dword [ebp - 4], eax
mov dword [ebp - 0x1c], eax
mov byte [ebp - 4], 1
mov esi, dword [ebp + 0xc]
mov ebx, dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov dword [ebp - 0x14], eax
lea esp, [esp]
mov eax, dword [0x5f5774]
mov edx, dword [eax + 0xc]
mov ecx, 0x5f5774
call edx
add eax, 0x10
mov dword [ebp - 0x10], eax
mov byte [ebp - 4], 2
test esi, esi
je 0x45f943
test esi, 0xffff0000
jne 0x45f943
movzx edi, si
push 0
push edi
call fcn.004013d0
add esp, 8
test eax, eax
je 0x45f94c
push edi
push eax
lea ecx, [ebp - 0x10]
call fcn.00412bd0
jmp 0x45f94c
push esi
lea ecx, [ebp - 0x10]
call fcn.00412df0
mov byte [ebp - 4], 3
mov eax, dword [ebp - 0x10]
push 0xf003f
push 0
push eax
call fcn.00505a30
movzx ecx, al
add esp, 4
neg ecx
sbb ecx, ecx
not ecx
and ecx, esi
push ecx
call ebx
mov edi, eax
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x10]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x45f996
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [ebp - 0x18], edi
test edi, edi
jne 0x45f9e8
push 0x1f4
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, dword [ebp - 0x14]
inc eax
mov dword [ebp - 0x14], eax
cmp eax, 0x14
jl 0x45f900
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x45f9cc
and eax, 0xffff
or eax, 0x80070000
push str.hSCM
push eax
lea ecx, [ebp - 0x2c]
call fcn.00434a80
push 0x5cc0a0
lea ecx, [ebp - 0x2c]
push ecx
call fcn.00554cbc
xor ebx, ebx
lea ebx, [ebx]
mov edx, dword [ebp + 8]
push 0xf01ff
push edx
push edi
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov esi, eax
mov dword [ebp - 0x1c], esi
test esi, esi
jne 0x45fa4a
push 0x1f4
call dword [sym.imp.KERNEL32.dll_Sleep]
inc ebx
cmp ebx, 0x14
jl 0x45f9f0
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x45fa2e
and eax, 0xffff
or eax, 0x80070000
push str.hService
push eax
lea ecx, [ebp - 0x2c]
call fcn.00434a80
push 0x5cc0a0
lea eax, [ebp - 0x2c]
push eax
call fcn.00554cbc
push 0
push 0
push esi
call dword [sym.imp.ADVAPI32.dll_StartServiceW]
test eax, eax
jne 0x45fa82
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
call ebx
cmp eax, 0x420
je 0x45fa82
call ebx
test eax, eax
jle 0x45fa78
and eax, 0xffff
or eax, 0x80070000
push 0x5a0454
jmp 0x45f9d1
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [ebp + 0x10], eax
je 0x45fb57
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [ebp - 0x14], eax
xor ebx, ebx
lea esp, [esp]
lea edx, [ebp - 0x48]
push edx
push esi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
setne al
test al, al
jne 0x45faf5
push 0x1f4
call dword [sym.imp.KERNEL32.dll_Sleep]
inc ebx
cmp ebx, 0x14
jl 0x45faa0
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x45fad9
and eax, 0xffff
or eax, 0x80070000
push str.bRes
push eax
lea ecx, [ebp - 0x2c]
call fcn.00434a80
push 0x5cc0a0
lea eax, [ebp - 0x2c]
push eax
jmp 0x45f9e3
mov ebx, 4
cmp dword [ebp - 0x44], ebx
je 0x45fb2d
nop
mov ecx, dword [ebp - 0x30]
push ecx
call dword [sym.imp.KERNEL32.dll_Sleep]
lea edx, [ebp - 0x48]
push edx
push esi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
cmp dword [ebp - 0x44], ebx
je 0x45fb2d
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [ebp - 0x14]
cmp eax, dword [ebp + 0x14]
ja 0x45fb57
cmp dword [ebp - 0x44], ebx
jne 0x45fb00
mov byte [ebp - 4], 0
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
mov dword [ebp - 4], 0xffffffff
push edi
call esi
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret
mov byte [ebp - 4], 0
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
mov dword [ebp - 4], 0xffffffff
push edi
call esi
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov eax, 1
pop ebx
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret