Function at 0x42f160
Capabilities:
Query service status
Start service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x34
push ebx
push esi
mov esi, dword [ebp + 0x10]
push edi
or edi, 0xffffffff
mov dword [ebp - 4], 0
mov dword [ebp - 8], 0
mov dword [ebp - 0xc], 0
test esi, esi
je 0x42f18e
mov dword [esi], 0
push dword [ebp + 0xc]
lea eax, [ebp - 4]
push eax
call fcn.0043ab20
mov eax, dword [ebp - 4]
add esp, 8
test eax, eax
je 0x42f1b1
push eax
lea eax, [ebp - 0xc]
push eax
call fcn.0043af60
add esp, 8
cmp dword [0x5fac2c], 0
mov ebx, dword [ebp + 8]
je 0x42f379
lea eax, [ebp + 4]
sub eax, 4
push ebx
push eax
call fcn.0041fa40
add esp, 8
push 0xf01ff
push dword [eax]
push dword [0x5fac2c]
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
push eax
call fcn.00539bc0
add esp, 4
mov dword [ebp + 0x10], eax
test eax, eax
je 0x42f379
mov ecx, dword [ebp - 0xc]
push ecx
push ecx
call fcn.0043af00
add esp, 4
push eax
push dword [ebp + 0x10]
call dword [sym.imp.ADVAPI32.dll_StartServiceW]
push eax
call fcn.00539b90
add esp, 4
test eax, eax
jne 0x42f2a5
mov eax, dword fs:[0x2c]
mov ecx, dword [eax]
mov dword [ebp - 0x10], ecx
mov eax, dword [ecx + 0x28f0]
test eax, eax
jne 0x42f23d
call fcn.0053fcd2
mov ecx, dword [ebp - 0x10]
cmp dword [eax], 0x420
jne 0x42f268
cmp dword [0x5fec54], 6
jl 0x42f261
push ebx
push str.service__s_already_running
push 0x550006
call fcn.00422d60
add esp, 0xc
xor edi, edi
jmp 0x42f34f
test esi, esi
je 0x42f27f
mov eax, dword [ecx + 0x28f0]
test eax, eax
jne 0x42f27b
call fcn.0053fcd2
mov eax, dword [eax]
mov dword [esi], eax
push dword [ebp - 4]
lea eax, [ebp - 8]
push eax
call fcn.0043aee0
push dword [eax]
push ebx
push str.failed_start_service__s__s:__m
push 0x550003
call fcn.00422d60
add esp, 0x18
jmp 0x42f34f
lea eax, [ebp - 0x10]
push eax
push 0x24
lea eax, [ebp - 0x34]
push eax
push 0
push dword [ebp + 0x10]
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
push eax
call fcn.00539b90
add esp, 4
test eax, eax
jne 0x42f2de
push ebx
push str.failed_query_service_status__s:__m
push 0x550003
call fcn.00422d60
add esp, 0xc
test eax, eax
jne 0x42f34f
mov eax, dword [ebp - 0x20]
xor esi, esi
mov dword [ebp - 0x10], eax
xor edi, edi
mov eax, dword [ebp - 0x30]
cmp eax, 4
je 0x42f261
cmp esi, 0xea60
jge 0x42f343
cmp edi, 0x1d4c0
jge 0x42f343
push ebx
lea eax, [ebp - 0x34]
push eax
push dword [ebp + 0x10]
call fcn.0042fbc0
add esp, 0xc
test eax, eax
jne 0x42f34c
mov eax, dword [ebp - 0x20]
cmp eax, dword [ebp - 0x10]
jbe 0x42f325
xor esi, esi
mov dword [ebp - 0x10], eax
push 0
push 0x64
call fcn.00424910
mov eax, dword [ebp - 0x30]
add esp, 8
add esi, 0x64
add edi, 0x64
cmp eax, 4
jne 0x42f2f4
xor edi, edi
jmp 0x42f34f
cmp eax, 4
jne 0x42f34c
xor edi, edi
jmp 0x42f34f
or edi, 0xffffffff
push dword [ebp + 0x10]
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push eax
call fcn.00539b90
add esp, 4
test eax, eax
jne 0x42f38c
push str.Failed_close_service_handle:__m
push 0x550003
call fcn.00422d60
add esp, 8
jmp 0x42f38c
push ebx
push str.service__s_doesnt_exist
push 0x550005
call fcn.00422d60
add esp, 0xc
lea eax, [ebp - 4]
push eax
call fcn.0043ac70
mov eax, dword [ebp - 8]
add esp, 4
test eax, eax
je 0x42f3af
push eax
call fcn.0053fcf0
add esp, 4
mov dword [ebp - 8], 0
lea eax, [ebp - 0xc]
push eax
call fcn.0043af20
add esp, 4
test edi, edi
je 0x42f3d2
push ebx
push str.error_starting_service__s
push 0x550003
call fcn.00422d60
add esp, 0xc
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret