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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x591f55
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x4c
push ebx
push esi
push edi
xor edi, edi
mov esi, ecx
mov dword [ebp - 0x10], edi
push closesocket
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 0x46171c
call dword [sym.imp.KERNEL32.dll_GetLastError]
and dword [ebp - 0x54], 0xff0fffff
push eax
push str.Failed_to_open_service_control_manager__GLE__u_
lea eax, [ebp - 0x38]
mov byte [ebp - 0x51], bl
and dword [ebp - 0x54], 0xfff00000
xor ecx, ecx
push eax
lea eax, [ebp - 0x50]
mov dword [ebp - 0x58], ebx
push eax
mov dword [ebp - 0x50], ecx
lea eax, [ebp - 0x58]
mov dword [ebp - 0x4c], ecx
mov dword [ebp - 0x48], ecx
mov dword [ebp - 0x44], ecx
mov dword [ebp - 0x40], ecx
mov dword [ebp - 0x3c], 3
mov dword [ebp - 0x38], ecx
mov dword [ebp - 0x34], ecx
jmp 0x4618cf
lea ecx, [esi + 4]
mov dword [ebp - 0x20], 0
test ecx, ecx
mov dword [ebp - 0x1c], 0
mov eax, 0x59934c
mov dword [ebp - 0x18], 0x4000000
cmovne eax, ecx
mov dword [ebp - 0x24], eax
push 0x80000030
lea ecx, [ebp - 0x24]
mov byte [ebp - 4], 1
call fcn.00459d10
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 0x461774
push dword [ebp - 0x24]
call fcn.0056b4c4
add esp, 4
cmp byte [ebp - 0x17], 0
je 0x461785
push dword [ebp - 0x20]
call fcn.0056b4c4
add esp, 4
cmp byte [ebp - 0x16], 0
je 0x461796
push dword [ebp - 0x1c]
call fcn.0056b4c4
add esp, 4
test edi, edi
jne 0x4617e9
call dword [sym.imp.KERNEL32.dll_GetLastError]
and dword [ebp - 0x54], 0xff0fffff
push eax
push str.Failed_to_open_service__GLE__u_
lea eax, [ebp - 0x38]
mov byte [ebp - 0x51], 0
and dword [ebp - 0x54], 0xfff00000
xor ecx, ecx
push eax
lea eax, [ebp - 0x50]
mov dword [ebp - 0x58], edi
push eax
mov dword [ebp - 0x50], ecx
lea eax, [ebp - 0x58]
mov dword [ebp - 0x4c], ecx
mov dword [ebp - 0x48], ecx
mov dword [ebp - 0x44], ecx
mov dword [ebp - 0x40], ecx
mov dword [ebp - 0x3c], 3
mov dword [ebp - 0x38], ecx
mov dword [ebp - 0x34], ecx
jmp 0x4618cf
lea eax, [ebp - 0x30]
push eax
push edi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
je 0x461802
cmp dword [ebp - 0x2c], 1
je 0x4618e8
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 0x4618a9
mov ebx, dword [sym.imp.KERNEL32.dll_Sleep]
mov esi, 0x32
lea esp, [esp]
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 0x4618e8
push 0x64
call ebx
test esi, esi
jg 0x461830
cmp byte [ebp + 0xc], 0
je 0x4618ad
test byte [ebp - 0x34], 1
jne 0x4618ad
push dword [ebp - 0x38]
push 0
push 1
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov esi, eax
test esi, esi
je 0x4618ad
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 0x4618e8
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0
push 0
lea ecx, [ebp - 0x58]
mov esi, eax
call fcn.0045ae70
push esi
push str.Failed_to_stop_service__GLE__u_
lea ecx, [eax + 0x20]
push ecx
lea ecx, [eax + 8]
push ecx
push eax
push 1
push 1
push 1
push 4
push 0
push 0
call fcn.0045eca0
add esp, 0x2c
xor bl, bl
jmp 0x4618ea
mov bl, 1
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
test edi, edi
je 0x4618f7
push edi
call esi
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x461901
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