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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3c
mov eax, dword [0x42a004]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push edi
push 0xf003f
xor edi, edi
push edi
push edi
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov ebx, eax
mov dword [ebp - 0x3c], ebx
test ebx, ebx
jne 0x4034ca
or eax, 0xffffffff
jmp 0x403669
push esi
push 0xf01ff
push 0x5357b8
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov esi, eax
test esi, esi
jne 0x4034f1
push ebx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
or eax, 0xffffffff
jmp 0x403668
lea eax, [ebp - 8]
push eax
push 0x24
lea eax, [ebp - 0x2c]
push eax
push edi
push esi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
test eax, eax
jne 0x40350f
or edi, 0xffffffff
jmp 0x40365a
xor edi, edi
inc edi
cmp dword [ebp - 0x28], edi
je 0x403521
cmp dword [ebp - 0x28], 3
jne 0x40365a
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, dword [ebp - 0x18]
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x38], ecx
mov dword [ebp - 0x34], 0xa
jmp 0x4035a1
mov eax, dword [ebp - 0x14]
xor edx, edx
div dword [ebp - 0x34]
cmp eax, 0x3e8
jae 0x40354f
mov eax, 0x3e8
jmp 0x403554
cmp eax, ecx
cmova eax, ecx
push eax
call dword [sym.imp.KERNEL32.dll_Sleep]
lea eax, [ebp - 8]
push eax
push 0x24
lea eax, [ebp - 0x2c]
push eax
push 0
push esi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
test eax, eax
je 0x40365a
mov eax, dword [ebp - 0x38]
cmp dword [ebp - 0x18], eax
jbe 0x40358f
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [ebp - 0x30], eax
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x38], eax
jmp 0x4035a1
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [ebp - 0x30]
cmp eax, dword [ebp - 0x14]
ja 0x40365a
cmp dword [ebp - 0x28], 3
mov ecx, 0x2710
je 0x403539
push 0
push 0
push esi
call dword [sym.imp.ADVAPI32.dll_StartServiceW]
test eax, eax
je 0x40365a
lea eax, [ebp - 8]
push eax
push 0x24
lea eax, [ebp - 0x2c]
push eax
push 0
push esi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
test eax, eax
je 0x40365a
call dword [sym.imp.KERNEL32.dll_GetTickCount]
cmp dword [ebp - 0x28], 2
mov ecx, dword [ebp - 0x18]
mov dword [ebp - 0x30], eax
jne 0x40365a
mov ebx, ecx
mov edi, eax
mov eax, dword [ebp - 0x14]
xor edx, edx
push 0xa
pop ecx
div ecx
mov ecx, 0x3e8
cmp eax, ecx
jae 0x403607
mov eax, ecx
jmp 0x403611
mov ecx, 0x2710
cmp eax, ecx
cmova eax, ecx
push eax
call dword [sym.imp.KERNEL32.dll_Sleep]
lea eax, [ebp - 8]
push eax
push 0x24
lea eax, [ebp - 0x2c]
push eax
push 0
push esi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
test eax, eax
je 0x403654
cmp dword [ebp - 0x18], ebx
jbe 0x403641
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ebx, dword [ebp - 0x18]
mov edi, eax
jmp 0x40364e
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, edi
cmp eax, dword [ebp - 0x14]
ja 0x403654
cmp dword [ebp - 0x28], 2
je 0x4035f0
mov ebx, dword [ebp - 0x3c]
xor edi, edi
inc edi
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
push ebx
call esi
mov eax, edi
pop esi
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop ebx
call fcn.004044ac
mov esp, ebp
pop ebp
ret