Function at 0x404230
Capabilities:
Query service status
Start service

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x450570
mov eax, dword fs:[0]
push eax
sub esp, 0x3c
mov eax, dword [0x45e024]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
push 4
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov ebx, eax
test ebx, ebx
je 0x404459
cmp dword [esi + 0x14], 0x10
jb 0x40427b
mov esi, dword [esi]
push 0xf01ff
push esi
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov edi, eax
test edi, edi
jne 0x40429a
push ebx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x404459
lea eax, [ebp - 0x44]
push eax
push edi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
je 0x40444d
cmp dword [ebp - 0x40], 4
jne 0x40432a
push 0xa
push str.__started.
lea ecx, [ebp - 0x28]
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0xf
mov byte [ebp - 0x28], 0
call fcn.00409910
lea ecx, [ebp - 0x28]
mov dword [ebp - 4], 0
call fcn.00401ca0
mov edx, dword [ebp - 0x14]
cmp edx, 0x10
jb 0x404317
mov ecx, dword [ebp - 0x28]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x40430d
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4044de
push edx
push ecx
call fcn.004120fb
add esp, 8
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push edi
call esi
push ebx
call esi
mov al, 1
jmp 0x40445b
push 0
push 0
push edi
call dword [sym.imp.ADVAPI32.dll_StartServiceA]
test eax, eax
je 0x40444d
push 0x1e
push str.__waiting_for_the_state_change
lea ecx, [ebp - 0x28]
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0xf
mov byte [ebp - 0x28], 0
call fcn.00409910
lea ecx, [ebp - 0x28]
mov dword [ebp - 4], 1
call fcn.00401ca0
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp - 0x14]
cmp edx, 0x10
jb 0x4043a8
mov ecx, dword [ebp - 0x28]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x40439e
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4044e3
push edx
push ecx
call fcn.004120fb
add esp, 8
xor esi, esi
nop word [eax + eax]
lea eax, [ebp - 0x44]
push eax
push edi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
je 0x40444d
cmp dword [ebp - 0x40], 4
je 0x404477
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
push 3
push 0x459d84
lea ecx, [ebp - 0x28]
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0xf
mov byte [ebp - 0x28], 0
call fcn.00409910
lea ecx, [ebp - 0x28]
mov dword [ebp - 4], 3
call fcn.00401ca0
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp - 0x14]
cmp edx, 0x10
jb 0x404443
mov ecx, dword [ebp - 0x28]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x404439
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4044de
push edx
push ecx
call fcn.004120fb
add esp, 8
inc esi
cmp esi, 0x1e
jl 0x4043b0
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push edi
call esi
push ebx
call esi
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00411cb8
mov esp, ebp
pop ebp
ret
push 0xa
push str.__started.
lea ecx, [ebp - 0x28]
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0xf
mov byte [ebp - 0x28], 0
call fcn.00409910
lea ecx, [ebp - 0x28]
mov dword [ebp - 4], 2
call fcn.00401ca0
mov edx, dword [ebp - 0x14]
cmp edx, 0x10
jb 0x404317
mov ecx, dword [ebp - 0x28]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x40430d
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x40430d
call fcn.0041c6cd
call fcn.0041c6cd
call fcn.0041c6cd
int3