Function at 0x404640
Capabilities:
Continue service
Query service status
Start service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x38
mov dword [ebp - 0x38], ecx
mov dword [ebp - 4], 0
mov ecx, dword [ebp - 0x38]
call fcn.00403650
test eax, eax
je 0x404670
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebp - 0x38]
call fcn.00404cf0
mov dword [ebp - 4], eax
jmp 0x404858
mov dword [ebp - 0xc], 0
mov dword [ebp - 8], 0
mov dword [ebp - 0x10], 0
push SysReAllocString
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
je 0x404858
push 0xf01ff
push 0x4ea7dc
mov ecx, dword [ebp - 0xc]
push ecx
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
je 0x40483a
lea edx, [ebp - 0x2c]
push edx
mov eax, dword [ebp - 8]
push eax
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
mov ecx, dword [ebp - 0x28]
push ecx
push 0x4ea800
call fcn.00405640
add esp, 8
cmp dword [ebp - 0x28], 7
jne 0x404791
lea edx, [ebp - 0x2c]
push edx
push 3
mov eax, dword [ebp - 8]
push eax
call dword [sym.imp.ADVAPI32.dll_ControlService]
lea ecx, [ebp - 0x2c]
push ecx
mov edx, dword [ebp - 8]
push edx
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
mov eax, dword [ebp - 0x28]
push eax
push 0x4ea830
call fcn.00405640
add esp, 8
mov dword [ebp - 0x30], 0
jmp 0x40472c
mov ecx, dword [ebp - 0x30]
add ecx, 1
mov dword [ebp - 0x30], ecx
cmp dword [ebp - 0x30], 5
jge 0x404785
cmp dword [ebp - 0x28], 4
jne 0x40473a
jmp 0x404785
mov eax, dword [ebp - 0x14]
xor edx, edx
mov ecx, 0xa
div ecx
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0x3e8
jae 0x40475b
mov dword [ebp - 0x10], 0x3e8
jmp 0x40476b
cmp dword [ebp - 0x10], 0x1388
jbe 0x40476b
mov dword [ebp - 0x10], 0x1388
mov edx, dword [ebp - 0x10]
push edx
call dword [sym.imp.KERNEL32.dll_Sleep]
lea eax, [ebp - 0x2c]
push eax
mov ecx, dword [ebp - 8]
push ecx
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
jmp 0x404723
mov dword [ebp - 4], 1
jmp 0x404827
push 0
push 0
mov edx, dword [ebp - 8]
push edx
call dword [sym.imp.ADVAPI32.dll_StartServiceW]
test eax, eax
je 0x404827
lea eax, [ebp - 0x2c]
push eax
mov ecx, dword [ebp - 8]
push ecx
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
mov dword [ebp - 0x34], 0
jmp 0x4047c7
mov edx, dword [ebp - 0x34]
add edx, 1
mov dword [ebp - 0x34], edx
cmp dword [ebp - 0x34], 5
jge 0x404820
cmp dword [ebp - 0x28], 4
jne 0x4047d5
jmp 0x404820
mov eax, dword [ebp - 0x14]
xor edx, edx
mov ecx, 0xa
div ecx
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0x3e8
jae 0x4047f6
mov dword [ebp - 0x10], 0x3e8
jmp 0x404806
cmp dword [ebp - 0x10], 0x1388
jbe 0x404806
mov dword [ebp - 0x10], 0x1388
mov edx, dword [ebp - 0x10]
push edx
call dword [sym.imp.KERNEL32.dll_Sleep]
lea eax, [ebp - 0x2c]
push eax
mov ecx, dword [ebp - 8]
push ecx
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
jmp 0x4047be
mov dword [ebp - 4], 1
mov edx, dword [ebp - 8]
push edx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov dword [ebp - 8], 0
jmp 0x404847
push 0x4ea860
call fcn.00405640
add esp, 4
mov eax, dword [ebp - 0xc]
push eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov dword [ebp - 0xc], 0
mov eax, dword [ebp - 4]
mov esp, ebp
pop ebp
ret 4