Function at 0x4157e0
Capabilities:
Query service status
Start service
Stop service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [0x4c63ac]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x24], eax
call fcn.00414d10
test eax, eax
je 0x41581b
call dword [sym.imp.KERNEL32.dll_GetLastError]
shl eax, 0x10
or eax, 8
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0046dc6a
mov esp, ebp
pop ebp
ret 8
push ebx
push esi
push edi
push 5
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov edi, eax
test edi, edi
je 0x41599a
cmp edi, 0xffffffff
je 0x41599a
push 0x34
push 0x49f5d0
push edi
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov esi, eax
test esi, esi
je 0x415978
cmp esi, 0xffffffff
je 0x415978
xor eax, eax
mov ebx, 0x12c
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x10], eax
mov dword [ebp - 0xc], eax
mov dword [ebp - 8], eax
lea eax, [ebp - 0x20]
push eax
push esi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
je 0x4158e6
lea esp, [esp]
test ebx, ebx
jle 0x4158e6
mov eax, dword [ebp - 0x1c]
dec eax
cmp eax, 6
ja case.0x4158a4.3
movzx eax, byte [eax + 0x4159dc]
jmp dword [eax*4 + 0x4159d0]
lea eax, [ebp - 0x20]
push eax
push 1
push esi
call dword [sym.imp.ADVAPI32.dll_ControlService]
jmp case.0x4158a4.3
push dword [ebp - 0x24]
push dword [ebp + 8]
push esi
call dword [sym.imp.ADVAPI32.dll_StartServiceW]
test eax, eax
jne 0x415902
push 0xc8
dec ebx
call dword [sym.imp.KERNEL32.dll_Sleep]
lea eax, [ebp - 0x20]
push eax
push esi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
jne 0x415890
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
shl ebx, 0x10
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
or ebx, 6
call esi
jmp 0x4159b7
xor eax, eax
mov dword [ebp - 0x24], 0x12c
mov dword [ebp - 0x20], eax
mov ebx, 0x17
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x10], eax
mov dword [ebp - 0xc], eax
mov dword [ebp - 8], eax
lea eax, [ebp - 0x20]
push eax
push esi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
je 0x41598f
mov eax, dword [ebp - 0x24]
test eax, eax
jle 0x41598f
cmp dword [ebp - 0x1c], 1
je 0x41596a
dec eax
push 0xc8
mov dword [ebp - 0x24], eax
call dword [sym.imp.KERNEL32.dll_Sleep]
lea eax, [ebp - 0x20]
push eax
push esi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
jne 0x415934
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
jmp 0x4159b7
mov ebx, dword [ebp - 0x14]
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
jmp 0x4159b7
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
shl ebx, 0x10
or ebx, 8
test esi, esi
je 0x4159b1
cmp esi, 0xffffffff
je 0x4159b1
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
jmp 0x4159b7
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
shl ebx, 0x10
or ebx, 8
test edi, edi
je 0x4159ba
cmp edi, 0xffffffff
je 0x4159ba
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push edi
call esi
mov ecx, dword [ebp - 4]
mov eax, ebx
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0046dc6a
mov esp, ebp
pop ebp
ret 8