Function at 0x461470
Capabilities:
Query service status
Stop service
Terminate process

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5912e5
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x54
push ebx
push esi
push edi
xor edi, edi
mov esi, ecx
mov dword [ebp - 0x10], edi
push SysReAllocString
push edi
push edi
mov dword [ebp - 4], edi
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov ebx, eax
mov dword [ebp - 0x14], ebx
test ebx, ebx
jne 0x4614f7
call dword [sym.imp.KERNEL32.dll_GetLastError]
and dword [ebp - 0x5c], 0xff0fffff
mov byte [ebp - 0x59], bl
and dword [ebp - 0x5c], 0xfff00000
xor ecx, ecx
push eax
mov dword [ebp - 0x60], ebx
lea eax, [ebp - 0x60]
mov dword [ebp - 0x58], ecx
mov dword [ebp - 0x54], ecx
mov dword [ebp - 0x50], ecx
mov dword [ebp - 0x4c], ecx
mov dword [ebp - 0x48], ecx
mov dword [ebp - 0x44], 3
mov dword [ebp - 0x40], ecx
mov dword [ebp - 0x3c], ecx
mov dword [ebp - 0x38], ecx
push str.Failed_to_open_service_control_manager__GLE__u_
jmp 0x461693
lea ecx, [esi + 4]
mov dword [ebp - 0x20], 0
test ecx, ecx
mov dword [ebp - 0x1c], 0
mov eax, 0x593554
mov dword [ebp - 0x18], 0x4000000
cmovne eax, ecx
mov dword [ebp - 0x24], eax
lea ecx, [ebp - 0x24]
mov byte [ebp - 4], 1
call fcn.004599c0
push 0x80000030
push eax
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
cmp byte [ebp - 0x18], 0
mov edi, eax
mov dword [ebp - 0x10], edi
mov byte [ebp - 4], 0
je 0x46154f
push dword [ebp - 0x24]
call fcn.0056be44
add esp, 4
cmp byte [ebp - 0x17], 0
je 0x461560
push dword [ebp - 0x20]
call fcn.0056be44
add esp, 4
cmp byte [ebp - 0x16], 0
je 0x461571
push dword [ebp - 0x1c]
call fcn.0056be44
add esp, 4
test edi, edi
jne 0x4615bf
call dword [sym.imp.KERNEL32.dll_GetLastError]
and dword [ebp - 0x5c], 0xff0fffff
mov byte [ebp - 0x59], 0
and dword [ebp - 0x5c], 0xfff00000
xor ecx, ecx
push eax
mov dword [ebp - 0x60], edi
lea eax, [ebp - 0x60]
mov dword [ebp - 0x58], ecx
mov dword [ebp - 0x54], ecx
mov dword [ebp - 0x50], ecx
mov dword [ebp - 0x4c], ecx
mov dword [ebp - 0x48], ecx
mov dword [ebp - 0x44], 3
mov dword [ebp - 0x40], ecx
mov dword [ebp - 0x3c], ecx
mov dword [ebp - 0x38], ecx
push str.Failed_to_open_service__GLE__u_
jmp 0x461693
lea eax, [ebp - 0x30]
push eax
push edi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
je 0x4615d8
cmp dword [ebp - 0x2c], 1
je 0x4616ac
lea eax, [ebp - 0x30]
push eax
push 1
push edi
call dword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
setne bl
cmp byte [ebp + 8], 0
je 0x461679
mov ebx, dword [sym.imp.KERNEL32.dll_Sleep]
mov esi, 0x32
nop
xor eax, eax
dec esi
mov dword [ebp - 0x54], eax
mov dword [ebp - 0x50], eax
mov dword [ebp - 0x4c], eax
mov dword [ebp - 0x48], eax
mov dword [ebp - 0x44], eax
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x34], eax
mov dword [ebp + 8], eax
lea eax, [ebp + 8]
push eax
push 0x24
lea eax, [ebp - 0x54]
push eax
push 0
push edi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
cmp dword [ebp - 0x50], 1
je 0x4616ac
push 0x64
call ebx
test esi, esi
jg 0x461600
cmp byte [ebp + 0xc], 0
je 0x46167d
test byte [ebp - 0x34], 1
jne 0x46167d
push dword [ebp - 0x38]
push 0
push 1
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov esi, eax
test esi, esi
je 0x46167d
push 0xf00d
push esi
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
test eax, eax
push esi
setne bl
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test bl, bl
jne 0x4616ac
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [ebp - 0x60]
mov esi, eax
call fcn.0045ac90
push esi
push str.Failed_to_stop_service__GLE__u_
push eax
push 1
push 1
push 1
push 4
push 0
push 0
call fcn.0045e650
add esp, 0x24
xor bl, bl
jmp 0x4616ae
mov bl, 1
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
test edi, edi
je 0x4616bb
push edi
call esi
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x4616c5
push eax
call esi
mov ecx, dword [ebp - 0xc]
mov al, bl
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret 8