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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x34
mov eax, dword [0x51d584]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push esi
push edi
push 0xf003f
push 0
push 0
mov esi, ecx
mov dword [ebp - 0x30], eax
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov edi, eax
mov dword [ebp - 0x2c], edi
test edi, edi
je 0x42335c
push 0xf01ff
push esi
push edi
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov esi, eax
test esi, esi
jne 0x423370
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
pop edi
xor eax, eax
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004809b9
mov esp, ebp
pop ebp
ret 8
lea ecx, [ebp - 0x34]
push ecx
push 0x24
lea edx, [ebp - 0x28]
push edx
push 0
push esi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
test eax, eax
jne 0x4233a7
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
push edi
call esi
pop edi
xor eax, eax
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004809b9
mov esp, ebp
pop ebp
ret 8
mov eax, dword [ebp - 0x24]
push ebx
cmp eax, 1
je 0x423433
cmp eax, 3
jne 0x42344c
lea ecx, [ecx]
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ebx, dword [ebp - 0x14]
mov edi, eax
mov eax, 0xcccccccd
mul dword [ebp - 0x10]
shr edx, 3
cmp edx, 0x3e8
jae 0x4233e5
mov edx, 0x3e8
jmp 0x4233f2
cmp edx, 0x2710
jbe 0x4233f2
mov edx, 0x2710
push edx
call dword [sym.imp.KERNEL32.dll_Sleep]
lea eax, [ebp - 0x34]
push eax
push 0x24
lea ecx, [ebp - 0x28]
push ecx
push 0
push esi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
test eax, eax
je 0x42346d
cmp dword [ebp - 0x14], ebx
jbe 0x42341d
call dword [sym.imp.KERNEL32.dll_GetTickCount]
jmp 0x42342a
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, edi
cmp eax, dword [ebp - 0x10]
ja 0x423491
cmp dword [ebp - 0x24], 3
je 0x4233c0
mov edi, dword [ebp - 0x2c]
mov ecx, dword [ebp - 0x30]
mov edx, dword [ebp + 8]
push ecx
push edx
push esi
call dword [sym.imp.ADVAPI32.dll_StartServiceA]
test eax, eax
jne 0x4234b5
call dword [sym.imp.KERNEL32.dll_GetLastError]
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
push edi
call esi
pop ebx
pop edi
xor eax, eax
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004809b9
mov esp, ebp
pop ebp
ret 8
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
mov edx, dword [ebp - 0x2c]
push edx
call esi
pop ebx
pop edi
xor eax, eax
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004809b9
mov esp, ebp
pop ebp
ret 8
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
mov eax, dword [ebp - 0x2c]
push eax
call esi
pop ebx
pop edi
xor eax, eax
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004809b9
mov esp, ebp
pop ebp
ret 8
lea eax, [ebp - 0x34]
push eax
push 0x24
lea ecx, [ebp - 0x28]
push ecx
push 0
push esi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
test eax, eax
je 0x42344c
mov edi, dword [sym.imp.KERNEL32.dll_GetTickCount]
call edi
cmp dword [ebp - 0x24], 2
mov edx, dword [ebp - 0x14]
mov ebx, eax
mov dword [ebp - 0x30], edx
jne 0x42354a
mov eax, 0xcccccccd
mul dword [ebp - 0x10]
shr edx, 3
cmp edx, 0x3e8
jae 0x4234fc
mov edx, 0x3e8
jmp 0x423509
cmp edx, 0x2710
jbe 0x423509
mov edx, 0x2710
push edx
call dword [sym.imp.KERNEL32.dll_Sleep]
lea eax, [ebp - 0x34]
push eax
push 0x24
lea ecx, [ebp - 0x28]
push ecx
push 0
push esi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
test eax, eax
je 0x42354a
mov edx, dword [ebp - 0x30]
cmp dword [ebp - 0x14], edx
jbe 0x42353b
call edi
mov ebx, eax
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x30], eax
jmp 0x423544
call edi
sub eax, ebx
cmp eax, dword [ebp - 0x10]
ja 0x42354a
cmp dword [ebp - 0x24], 2
je 0x4234e2
xor edi, edi
cmp dword [ebp - 0x24], 4
jne 0x423557
mov edi, 1
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
mov ecx, dword [ebp - 0x2c]
push ecx
call esi
mov ecx, dword [ebp - 4]
pop ebx
mov eax, edi
pop edi
xor ecx, ebp
pop esi
call fcn.004809b9
mov esp, ebp
pop ebp
ret 8