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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
mov eax, dword [ebp + 8]
cmp dword [eax], 0x3000000
mov dword [ebp - 0xc], 0
je 0x4081de
xor eax, eax
mov esp, ebp
pop ebp
ret
cmp dword [eax + 0x58], 0
push esi
lea esi, [eax + 0x58]
mov dword [ebp - 8], esi
jne 0x408432
mov ecx, dword [esi + 4]
test ecx, ecx
je 0x408432
cmp ecx, 0xffffffff
je 0x408432
push ebx
mov ebx, dword [ebp + 0xc]
push edi
mov eax, ebx
mov edi, 1
sub eax, edi
je case.0x40825a.160
sub eax, edi
je case.0x40825a.192
sub eax, edi
jne 0x40823b
mov dword [ebp - 4], 2
mov dword [ebp + 8], 4
jmp 0x40826b
mov dword [ebp - 4], 6
mov dword [ebp + 8], 7
jmp 0x40826b
lea eax, [ebx - 0x80]
cmp eax, 0x5f
ja case.0x40825a.129
mov edx, ebx
and edx, 0xe0
lea eax, [edx - 0x80]
cmp eax, 0x50
ja case.0x40825a.129
movzx eax, byte [eax + 0x40844c]
jmp dword [eax*4 + 0x40843c]
mov dword [ebp - 4], 3
mov dword [ebp + 8], edi
lea edx, [ebp - 0x30]
push edx
push ecx
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
jne 0x40829a
push eax
push 0x1aa
push str......_src_service.c
push edi
push 3
push eax
call fcn.00404a50
add esp, 0x18
pop edi
pop ebx
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret
mov edi, dword [ebp + 0x14]
test edi, edi
je 0x4082b4
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 0x10]
mov edx, dword [ebp + 0x18]
push eax
push 1
push ecx
push edx
call edi
add esp, 0x10
cmp ebx, 3
jne 0x4082cf
cmp dword [ebp - 0x2c], 7
je 0x4082e6
mov eax, dword [esi + 4]
push 0
push 0
push eax
call dword [sym.imp.ADVAPI32.dll_StartServiceW]
jmp 0x4082f5
cmp ebx, 1
jne 0x4082e6
push esi
call fcn.00407f60
mov esi, eax
add esp, 4
test esi, esi
je 0x4082f7
mov esi, dword [ebp - 8]
mov edx, dword [esi + 4]
lea ecx, [ebp - 0x30]
push ecx
push ebx
push edx
call dword [sym.imp.ADVAPI32.dll_ControlService]
mov esi, eax
mov ebx, dword [sym.imp.KERNEL32.dll_GetTickCount]
call ebx
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x10], eax
test esi, esi
je 0x4083ca
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
mov edx, dword [ebp - 8]
mov eax, dword [edx + 4]
lea ecx, [ebp - 0x30]
push ecx
push eax
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
je 0x4083ca
mov ecx, dword [ebp - 4]
cmp dword [ebp - 0x2c], ecx
jne 0x4083ca
mov eax, 0xcccccccd
mul dword [ebp - 0x18]
mov esi, edx
shr esi, 3
cmp esi, 0x3e8
jae 0x408359
mov esi, 0x3e8
jmp 0x408366
cmp esi, 0x2710
jbe 0x408366
mov esi, 0x2710
test edi, edi
je 0x40838b
mov ebx, dword [ebp - 0xc]
mov edx, dword [ebp + 0x10]
mov eax, dword [ebp + 0x18]
push ebx
push 2
push edx
push eax
call edi
inc ebx
add esp, 0x10
mov dword [ebp - 0xc], ebx
test eax, eax
je 0x4083ca
mov ebx, dword [sym.imp.KERNEL32.dll_GetTickCount]
push esi
call dword [sym.imp.KERNEL32.dll_Sleep]
mov ecx, dword [ebp - 0x10]
cmp dword [ebp - 0x1c], ecx
jbe 0x4083a7
call ebx
mov edx, dword [ebp - 0x1c]
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x10], edx
jmp 0x4083b1
call ebx
sub eax, dword [ebp - 0x14]
cmp eax, dword [ebp - 0x18]
ja 0x4083ca
mov ecx, dword [ebp - 8]
mov edx, dword [ecx + 4]
lea eax, [ebp - 0x30]
push eax
push edx
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
jne 0x408331
test edi, edi
je 0x4083df
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebp + 0x18]
push 0
push 3
push eax
push ecx
call edi
add esp, 0x10
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, dword [ebp - 8]
mov ecx, dword [eax + 4]
lea edx, [ebp - 0x30]
push edx
push ecx
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
je case.0x40825a.129
test edi, edi
je 0x40841a
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebp + 0x18]
lea edx, [ebp - 0x30]
push edx
push 4
push eax
push ecx
call edi
add esp, 0x10
mov edx, dword [ebp + 8]
cmp dword [ebp - 0x2c], edx
jne case.0x40825a.129
pop edi
pop ebx
mov eax, 1
pop esi
mov esp, ebp
pop ebp
ret
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret