Function at 0x407ed0
Capabilities:
Enumerate services
Stop service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x38
push ebx
push 5
push 0
push 0
mov dword [ebp - 0xc], 0
mov dword [ebp - 8], 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov ebx, eax
mov dword [ebp - 0x1c], ebx
test ebx, ebx
jne 0x407f13
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.____call_OpenSCManagerA___failed__code__d_n
call fcn.00406130
add esp, 8
pop ebx
mov esp, ebp
pop ebp
ret
push esi
push edi
mov edi, dword [sym.imp.ADVAPI32.dll_EnumServicesStatusA]
lea eax, [ebp - 8]
push 0
push eax
lea eax, [ebp - 0xc]
push eax
push 0
push 0
push 1
push 0x30
push ebx
call edi
mov esi, dword [ebp - 0xc]
add esi, 0x10
push esi
call fcn.00406370
add esp, 4
mov dword [ebp - 0x14], eax
lea ecx, [ebp - 8]
push 0
push ecx
lea ecx, [ebp - 0xc]
push ecx
push esi
push eax
push 1
push 0x30
push ebx
call edi
test eax, eax
jne 0x407f83
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.____call_EnumServicesStatusA___failed__code__d_n
call fcn.00406130
push dword [ebp - 0x14]
call fcn.004063c0
add esp, 0xc
push ebx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ebx, dword [ebp + 8]
xor eax, eax
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
xorps xmm0, xmm0
mov dword [ebp - 0x38], 0
movq qword [ebp - 0x24], xmm0
mov dword [ebp - 0x18], eax
movups xmmword [ebp - 0x34], xmm0
test eax, eax
je 0x407fbc
push str.____Repeat_cycle_second_time..._n
call fcn.00406130
add esp, 4
mov dword [ebp - 0x18], 1
xor eax, eax
mov dword [ebp - 0x10], eax
mov dword [ebp - 4], eax
cmp dword [ebp - 8], eax
jbe 0x40801c
mov edi, dword [ebp - 0x14]
nop dword [eax]
test byte [edi + 0xc], 6
je 0x408009
xor esi, esi
cmp dword [ebx + 0x3c4], esi
jle 0x408003
mov eax, dword [ebx + 0x3c8]
push dword [eax + esi*4]
push dword [edi]
call fcn.004080d0
add esp, 8
test eax, eax
jne 0x408033
inc esi
cmp esi, dword [ebx + 0x3c4]
jl 0x407fe0
mov eax, dword [ebp - 4]
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
inc eax
add edi, 0x24
mov dword [ebp - 4], eax
cmp eax, dword [ebp - 8]
jb 0x407fd0
mov eax, dword [ebp - 0x10]
test eax, eax
jne 0x407fa8
push dword [ebp - 0x14]
call fcn.004063c0
add esp, 4
push dword [ebp - 0x1c]
call esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0x20
push dword [edi]
push dword [ebp - 0x1c]
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov esi, eax
test esi, esi
jne 0x408061
mov dword [edi + 0xc], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push dword [edi]
push str.____call_OpenServiceA__s__failed__error__d_n
call fcn.00406130
add esp, 0xc
jmp 0x408000
push dword [edi]
push str.____Send_SERVICE_CONTROL_STOP_to_Svc___s__n
call fcn.00406130
add esp, 8
lea eax, [ebp - 0x38]
push eax
push 1
push esi
call dword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
jne 0x4080b0
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x41b
jne 0x4080a0
mov ecx, dword [ebp - 0x10]
mov edx, 1
cmp dword [ebp - 0x18], 0
cmove ecx, edx
mov dword [ebp - 0x10], ecx
push eax
push dword [edi]
push str.____call_ControlService__s__failed__error__d_n
call fcn.00406130
add esp, 0xc
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
mov eax, dword [ebp - 4]
jmp 0x408009