Function at 0x4034c0
Capabilities:
Enumerate services
Query service status
Start service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4ec
mov eax, dword [0x451430]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [ebp + 8]
xor ebx, ebx
push esi
push str.StartService__S_n
mov byte [ebp - 0x4b5], 0
mov dword [ebp - 0x4d0], ebx
mov dword [ebp - 0x4cc], ebx
mov dword [ebp - 0x4c8], ebx
call fcn.0040c2f0
add esp, 8
cmp byte [0x452516], bl
je 0x40352b
push esi
push str.Service___S__has_been_configured_not_to_start_after_install_n
call fcn.0040c2f0
add esp, 8
pop esi
mov al, 1
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0042d845
mov esp, ebp
pop ebp
ret 4
push edi
push esi
call fcn.00402d40
mov edi, eax
cmp edi, ebx
je 0x4035b4
lea eax, [ebp - 0x4b6]
push eax
push str.DeleteFlag
push edi
mov byte [ebp - 0x4b6], bl
call fcn.004244a0
add esp, 0xc
cmp byte [ebp - 0x4b6], bl
je 0x403575
push esi
push str.Skipping_start_of_deleted_service__S_n
call fcn.0040c2f0
add esp, 8
mov byte [ebp - 0x4b5], 1
jmp 0x4038e9
call fcn.00401000
mov ebx, eax
push ebx
call fcn.00401070
lea ecx, [ebp - 0x4c8]
push ecx
push str.LockDownEnabled
push edi
call fcn.00424450
push 0
push str.LockDownEnabled
push edi
call fcn.00424390
add esp, 0x18
test ebx, ebx
je 0x4035b4
cmp ebx, 0xffffffff
je 0x4035b4
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
call fcn.004176a0
test edi, edi
je 0x403612
cmp dword [ebp - 0x4c8], 0
je 0x4035f9
call fcn.00401000
mov ebx, eax
push ebx
call fcn.00401070
mov edx, dword [ebp - 0x4c8]
push edx
push str.LockDownEnabled
push edi
call fcn.00424390
add esp, 0xc
test ebx, ebx
je 0x4035f9
cmp ebx, 0xffffffff
je 0x4035f9
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
call fcn.00422c60
mov dword [ebp - 0x4bc], 0
mov edi, dword [ebp - 0x4bc]
add esp, 4
push 0xa0000000
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
test eax, eax
mov dword [ebp - 0x4d0], eax
jne 0x403644
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.StartService:_Unable_to_open_SCM___d__n
call fcn.0040c2f0
add esp, 8
jmp 0x4038e9
push 0x1c
push esi
push eax
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov ebx, eax
test ebx, ebx
mov dword [ebp - 0x4cc], ebx
jne 0x40367e
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x424
je 0x403569
push eax
push str.StartService:_Unable_to_open_service_via_SCM___d__n
call fcn.0040c2f0
add esp, 8
jmp 0x4038e9
push 0
push 0
push ebx
call dword [sym.imp.ADVAPI32.dll_StartServiceW]
test eax, eax
jne 0x4036b3
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x420
je 0x4036b3
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Start_service_failed__x_n
call fcn.0040c2f0
add esp, 8
jmp 0x4038e9
mov edi, dword [sym.imp.KERNEL32.dll_Sleep]
mov byte [ebp - 0x4b5], 1
lea eax, [ebp - 0x4ec]
push eax
push ebx
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
je 0x40372d
mov ecx, dword [ebp - 0x4e8]
mov eax, ecx
sub eax, 1
je 0x403718
sub eax, 3
je 0x40370b
sub eax, 3
je 0x4036fe
push ecx
push esi
push str.waiting_on__S_service_to_report_RUNNING_or_STOPPED__current_state__x__n
call fcn.0040c2f0
add esp, 0xc
push 0x64
call edi
jmp 0x4036c0
push esi
push str._S_service_reports_PAUSED_n
call fcn.0040c2f0
jmp 0x40372a
push esi
push str._S_service_reports_RUNNING_n
call fcn.0040c2f0
jmp 0x40372a
push esi
push str._S_service_reports_STOPPED_n
call fcn.0040c2f0
mov byte [ebp - 0x4b5], 0
add esp, 8
push esi
xor edi, edi
call fcn.00402d40
mov esi, eax
test esi, esi
mov dword [ebp - 0x4bc], esi
je 0x4037e6
push 0x12c
lea ecx, [ebp - 0x25c]
push ecx
push 0x12c
lea edx, [ebp - 0x4b4]
push edx
push edi
push esi
call fcn.004230c0
add esp, 0x18
test al, al
je 0x4037d3
jmp 0x403770
lea eax, [ebp - 0x4b4]
push str.ServicePostStartCommand.
push eax
add edi, 1
call fcn.00421cc0
add esp, 8
test eax, eax
jne 0x4037ad
lea ecx, [ebp - 0x25c]
push ecx
push str.Running_post_start_command__S_n
call fcn.0040c2f0
add esp, 8
push 1
lea edx, [ebp - 0x25c]
push edx
call fcn.00402e10
push 0x12c
lea eax, [ebp - 0x25c]
push eax
push 0x12c
lea ecx, [ebp - 0x4b4]
push ecx
push edi
push esi
call fcn.004230c0
add esp, 0x18
test al, al
jne 0x403770
push esi
call fcn.00422c60
add esp, 4
mov dword [ebp - 0x4bc], 0
xor edi, edi
push str.Attempting_to_start_dependent_services_n
mov dword [ebp - 0x4c0], edi
mov dword [ebp - 0x4c4], edi
call fcn.0040c2f0
mov esi, dword [sym.imp.ADVAPI32.dll_EnumDependentServicesW]
add esp, 4
lea edx, [ebp - 0x4c4]
push edx
lea eax, [ebp - 0x4c0]
push eax
push edi
push edi
push 2
push ebx
call esi
test eax, eax
jne 0x403876
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xea
jne 0x40392f
test edi, edi
je 0x40383e
push edi
call fcn.0042df6a
add esp, 4
mov ecx, dword [ebp - 0x4c0]
push ecx
call fcn.0042e047
mov edi, eax
add esp, 4
test edi, edi
je 0x403945
mov ecx, dword [ebp - 0x4c0]
lea edx, [ebp - 0x4c4]
push edx
lea eax, [ebp - 0x4c0]
push eax
push ecx
push edi
push 2
push ebx
call esi
test eax, eax
je 0x403820
mov eax, dword [ebp - 0x4c4]
test eax, eax
je 0x4038d6
push eax
push str.Found__u_dependent_services_to_start_n
call fcn.0040c2f0
mov ebx, dword [ebp - 0x4c4]
add esp, 8
test ebx, ebx
jbe 0x4038d6
lea edx, [ebx + ebx*8]
lea esi, [edi + edx*4 - 0x24]
nop
mov eax, dword [esi]
push eax
push str.Attempting_to_start_dependent_service__S_n
call fcn.0040c2f0
mov ecx, dword [esi]
add esp, 8
push ecx
call fcn.004034c0
test al, al
jne 0x4038cc
mov edx, dword [esi]
push edx
push str.Could_not_start_dependent_service__S_n
call fcn.0040c2f0
add esp, 8
sub ebx, 1
sub esi, 0x24
test ebx, ebx
ja 0x4038a0
test edi, edi
je 0x4038e3
push edi
call fcn.0042df6a
add esp, 4
mov edi, dword [ebp - 0x4bc]
test edi, edi
je 0x4038f6
push edi
call fcn.00422c60
add esp, 4
mov eax, dword [ebp - 0x4cc]
test eax, eax
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
pop edi
je 0x40390a
push eax
call esi
mov eax, dword [ebp - 0x4d0]
test eax, eax
je 0x403917
push eax
call esi
mov ecx, dword [ebp - 4]
mov al, byte [ebp - 0x4b5]
pop esi
xor ecx, ebp
pop ebx
call fcn.0042d845
mov esp, ebp
pop ebp
ret 4
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Start_service_may_have_failed_due_to_dependencies_that_could_not_be_enumerated:__x_n
call fcn.0040c2f0
add esp, 8
jmp 0x4038d6
push str.Start_service_may_have_failed_due_to_dependencies_that_could_not_be_enumerated__malloc_error__n
call fcn.0040c2f0
add esp, 4
jmp 0x4038d6