Function at 0x407560
Capabilities:
Start service

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x14
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, dword [ebp + 0x10]
mov byte [esp + 9], 1
mov byte [esp + 0xa], 0
push edi
test esi, esi
je 0x407956
lea eax, ds:[esp + 0x18]
mov dword [esp + 0x18], 0x1c
push eax
mov dword [esp + 0x20], str.EnableWarnings
call sym.SystemInformer.exe_PhGetIntegerStringRefSetting
test eax, eax
je 0x4075d4
push 0
push str.Starting_a_service_might_prevent_the_system_from_functioning_properly.
mov ecx, str.the_selected_service
cmp esi, 1
mov eax, str.the_selected_services
cmove eax, ecx
push eax
push str.start
push ebx
call sym.SystemInformer.exe_PhShowConfirmMessage
test al, al
je 0x407956
xor edi, edi
mov dword [esp + 0x10], edi
test esi, esi
je 0x407949
jmp 0x4075f0
mov eax, dword [ebp + 0xc]
mov eax, dword [eax + edi*4]
mov eax, dword [eax + 8]
test eax, eax
je 0x407602
mov eax, dword [eax + 4]
jmp 0x407604
xor eax, eax
push eax
push 0x10
lea eax, [esp + 0x1c]
push eax
call sym.SystemInformer.exe_PhOpenService
mov esi, eax
test esi, esi
js 0x40764a
mov edi, dword [esp + 0x14]
push 0
push 0
push edi
call dword [sym.imp.ADVAPI32.dll_StartServiceW]
test eax, eax
jne 0x40766c
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call sym.SystemInformer.exe_PhDosErrorToNtStatus
mov esi, eax
test esi, esi
jns 0x40766c
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov edi, dword [esp + 0x10]
cmp byte [esp + 0xe], 0
mov byte [esp + 0xd], 0
jne 0x407816
mov eax, dword [ebp + 0xc]
mov eax, dword [eax + edi*4]
mov eax, dword [eax + 8]
test eax, eax
je 0x40767d
mov eax, dword [eax + 4]
jmp 0x40767f
push edi
mov byte [esp + 0x11], 1
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x40792f
xor eax, eax
push eax
push str.Unable_to_start
call sym.SystemInformer.exe_PhConcatStrings2
push eax
call sym.SystemInformer.exe_PhAutoDereferenceObject
lea ecx, ds:[esp + 0xf]
push ecx
push esi
mov edx, dword [eax + 4]
mov ecx, ebx
call fcn.00401940
test al, al
je 0x407816
cmp byte [esp + 0xf], 0
je 0x40780c
mov eax, dword [ebp + 0xc]
mov eax, dword [eax + edi*4]
mov eax, dword [eax + 8]
test eax, eax
je 0x4076ca
mov ecx, dword [eax + 4]
jmp 0x4076cc
xor ecx, ecx
mov edx, 1
call fcn.0047d1a0
mov esi, eax
test esi, esi
js 0x4076eb
mov byte [esp + 0xd], 1
call sym.SystemInformer.exe__PhUiDisconnectFromPhSvc_0
jmp 0x407933
mov eax, dword [ebp + 0xc]
mov eax, dword [eax + edi*4]
mov eax, dword [eax + 8]
push dword [eax + 4]
push str.start
push str.Unable_to__s__s.
call fcn.004017e0
add esp, 0xc
mov edi, dword [eax + 4]
cmp esi, 0xc0000022
je 0x407742
cmp esi, 0xc0000005
je 0x407742
mov eax, esi
and eax, 0xfff0000
cmp eax, 0x70000
jne 0x40772f
movzx eax, si
jmp 0x40774c
mov eax, esi
and eax, 0xfff0000
cmp eax, 0xb0000
jne 0x407750
mov eax, esi
jmp 0x40774c
push esi
lfence
call dword [sym.imp.ntdll.dll_RtlNtStatusToDosErrorNoTeb]
test eax, eax
jne 0x40775b
push esi
lfence
call sym.SystemInformer.exe_PhGetNtMessage
jmp 0x407765
push eax
lfence
call sym.SystemInformer.exe_PhGetWin32Message
mov esi, eax
test edi, edi
je 0x407783
test esi, esi
je 0x407776
mov ecx, 0x21
jmp 0x407791
push edi
push 0x5cd020
push 0x5c9adc
jmp 0x4077ee
test esi, esi
je 0x4077df
mov ecx, 9
mov edi, 0x5c9adc
mov eax, ebx
mov edx, esi
mov ebx, 4
lfence
push dword [ebx + edx]
push 0x5cd020
push edi
push 0xfffe
push ecx
push eax
call sym.SystemInformer.exe_PhShowMessage2
add esp, 0x18
lea ecx, [esi - 8]
lfence
or eax, 0xffffffff
lock xadd dword [ecx + 4], eax
dec eax
mov ebx, dword [ebp + 8]
jne 0x4077fe
lfence
call fcn.004fbfa0
mov edi, dword [esp + 0x10]
call sym.SystemInformer.exe__PhUiDisconnectFromPhSvc_0
jmp 0x407933
push 0x5c9adc
push 0x5cd020
push str.Unable_to_perform_the_operation.
push 0xfffe
push 9
push ebx
call sym.SystemInformer.exe_PhShowMessage2
add esp, 0x18
mov edi, dword [esp + 0x10]
call sym.SystemInformer.exe__PhUiDisconnectFromPhSvc_0
jmp 0x407933
mov byte [esp + 0xe], 1
jmp 0x407933
mov eax, dword [ebp + 0xc]
mov eax, dword [eax + edi*4]
mov eax, dword [eax + 8]
push dword [eax + 4]
push str.start
push str.Unable_to__s__s.
call fcn.004017e0
add esp, 0xc
mov eax, dword [eax + 4]
mov dword [esp + 0x18], eax
cmp esi, 0xc0000022
je 0x407875
cmp esi, 0xc0000005
je 0x407875
mov eax, esi
and eax, 0xfff0000
cmp eax, 0x70000
jne 0x407863
movzx eax, si
jmp 0x40787c
mov eax, esi
and eax, 0xfff0000
cmp eax, 0xb0000
jne 0x407884
mov eax, esi
jmp 0x40787c
push esi
call dword [sym.imp.ntdll.dll_RtlNtStatusToDosErrorNoTeb]
lea esp, [esp]
test eax, eax
jne 0x40788c
push esi
call sym.SystemInformer.exe_PhGetNtMessage
jmp 0x407892
push eax
call sym.SystemInformer.exe_PhGetWin32Message
mov edi, eax
mov eax, dword [esp + 0x18]
test eax, eax
je 0x4078b8
lea esp, [esp]
test edi, edi
je 0x4078ab
mov edx, 0x21
jmp 0x4078c6
push eax
push 0x5cd020
push 0x5c9adc
jmp 0x407916
test edi, edi
je 0x407907
mov edx, 9
mov eax, 0x5c9adc
mov ecx, ebx
mov esi, edi
mov ebx, 4
push dword [ebx + esi]
push 0x5cd020
push eax
push 0xfffe
push edx
push ecx
call sym.SystemInformer.exe_PhShowMessage2
mov esi, eax
lea ecx, [edi - 8]
add esp, 0x18
or eax, 0xffffffff
lock xadd dword [ecx + 4], eax
dec eax
mov ebx, dword [ebp + 8]
jne 0x40792a
jmp 0x407900
call fcn.004fbfa0
jmp 0x40792a
push 0x5c9adc
push 0x5cd020
push str.Unable_to_perform_the_operation.
push 0xfffe
push 9
push ebx
call sym.SystemInformer.exe_PhShowMessage2
mov esi, eax
add esp, 0x18
cmp esi, 1
jne 0x407949
mov edi, dword [esp + 0x10]
inc edi
mov dword [esp + 0x10], edi
cmp edi, dword [ebp + 0x10]
jb 0x4075f0
mov al, byte [esp + 0xd]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
pop edi
pop esi
xor al, al
pop ebx
mov esp, ebp
pop ebp
ret 0xc