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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x40
mov eax, dword [0x465074]
xor eax, ebp
mov dword [ebp - 4], eax
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov dword [ebp - 0x34], eax
cmp dword [ebp - 0x34], 0
jne 0x41c673
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x41c91d
push 0xf01ff
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebp - 0x34]
push ecx
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov dword [ebp - 0x2c], eax
cmp dword [ebp - 0x2c], 0
jne 0x41c6a4
mov edx, dword [ebp - 0x34]
push edx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x41c91d
lea eax, [ebp - 0x40]
push eax
push 0x24
lea ecx, [ebp - 0x28]
push ecx
push 0
mov edx, dword [ebp - 0x2c]
push edx
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
test eax, eax
jne 0x41c6dd
mov eax, dword [ebp - 0x2c]
push eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov ecx, dword [ebp - 0x34]
push ecx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x41c91d
cmp dword [ebp - 0x24], 1
je 0x41c704
cmp dword [ebp - 0x24], 3
je 0x41c704
mov edx, dword [ebp - 0x2c]
push edx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, dword [ebp - 0x34]
push eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
xor eax, eax
jmp 0x41c91d
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [ebp - 0x3c], eax
mov ecx, dword [ebp - 0x14]
mov dword [ebp - 0x38], ecx
cmp dword [ebp - 0x24], 3
jne 0x41c7dc
mov eax, dword [ebp - 0x10]
xor edx, edx
mov ecx, 0xa
div ecx
mov dword [ebp - 0x30], eax
cmp dword [ebp - 0x30], 0x3e8
jae 0x41c73e
mov dword [ebp - 0x30], 0x3e8
jmp 0x41c74e
cmp dword [ebp - 0x30], 0x2710
jbe 0x41c74e
mov dword [ebp - 0x30], 0x2710
mov edx, dword [ebp - 0x30]
push edx
call dword [sym.imp.KERNEL32.dll_Sleep]
lea eax, [ebp - 0x40]
push eax
push 0x24
lea ecx, [ebp - 0x28]
push ecx
push 0
mov edx, dword [ebp - 0x2c]
push edx
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
test eax, eax
jne 0x41c791
mov eax, dword [ebp - 0x2c]
push eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov ecx, dword [ebp - 0x34]
push ecx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x41c91d
mov edx, dword [ebp - 0x14]
cmp edx, dword [ebp - 0x38]
jbe 0x41c7aa
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x38], eax
jmp 0x41c7d7
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [ebp - 0x3c]
cmp eax, dword [ebp - 0x10]
jbe 0x41c7d7
mov ecx, dword [ebp - 0x2c]
push ecx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov edx, dword [ebp - 0x34]
push edx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x41c91d
jmp 0x41c713
push 0
push 0
mov eax, dword [ebp - 0x2c]
push eax
call dword [sym.imp.ADVAPI32.dll_StartServiceW]
test eax, eax
jne 0x41c80d
mov ecx, dword [ebp - 0x2c]
push ecx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov edx, dword [ebp - 0x34]
push edx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x41c91d
lea eax, [ebp - 0x40]
push eax
push 0x24
lea ecx, [ebp - 0x28]
push ecx
push 0
mov edx, dword [ebp - 0x2c]
push edx
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
test eax, eax
jne 0x41c846
mov eax, dword [ebp - 0x2c]
push eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov ecx, dword [ebp - 0x34]
push ecx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x41c91d
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [ebp - 0x3c], eax
mov edx, dword [ebp - 0x14]
mov dword [ebp - 0x38], edx
cmp dword [ebp - 0x24], 2
jne 0x41c8e4
mov eax, dword [ebp - 0x10]
xor edx, edx
mov ecx, 0xa
div ecx
mov dword [ebp - 0x30], eax
cmp dword [ebp - 0x30], 0x3e8
jae 0x41c880
mov dword [ebp - 0x30], 0x3e8
jmp 0x41c890
cmp dword [ebp - 0x30], 0x2710
jbe 0x41c890
mov dword [ebp - 0x30], 0x2710
mov edx, dword [ebp - 0x30]
push edx
call dword [sym.imp.KERNEL32.dll_Sleep]
lea eax, [ebp - 0x40]
push eax
push 0x24
lea ecx, [ebp - 0x28]
push ecx
push 0
mov edx, dword [ebp - 0x2c]
push edx
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
test eax, eax
jne 0x41c8b6
jmp 0x41c8e4
mov eax, dword [ebp - 0x14]
cmp eax, dword [ebp - 0x38]
jbe 0x41c8cf
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [ebp - 0x3c], eax
mov ecx, dword [ebp - 0x14]
mov dword [ebp - 0x38], ecx
jmp 0x41c8df
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [ebp - 0x3c]
cmp eax, dword [ebp - 0x10]
jbe 0x41c8df
jmp 0x41c8e4
jmp 0x41c855
cmp dword [ebp - 0x24], 4
jne 0x41c904
mov edx, dword [ebp - 0x2c]
push edx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, dword [ebp - 0x34]
push eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
xor eax, eax
jmp 0x41c91d
mov ecx, dword [ebp - 0x2c]
push ecx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov edx, dword [ebp - 0x34]
push edx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, 1
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0042a2fe
mov esp, ebp
pop ebp
ret