Function at 0x407460
Capabilities:
Stop service
Terminate process

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x431ce6
push eax
mov al, byte [0x4442fc]
mov dword fs:[0], esp
sub esp, 0x434
test al, al
push esi
push edi
je 0x40758e
push 1
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov edi, eax
mov dword [esp + 8], edi
test edi, edi
mov dword [esp + 0x444], 0
jne 0x4074d5
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.unable_to_open_Service_Control_Manager
lea ecx, [esp + 0x23c]
call fcn.004080dc
push 0x43cf90
lea eax, [esp + 0x238]
push eax
call fcn.0042409a
mov ecx, dword [esp + 0x44c]
push 0x20
push ecx
push edi
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov esi, eax
mov dword [esp + 0xc], esi
test esi, esi
mov byte [esp + 0x444], 1
jne 0x407522
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.unable_to_open_the_service
lea ecx, [esp + 0x23c]
call fcn.004080dc
push 0x43cf90
lea edx, [esp + 0x238]
push edx
call fcn.0042409a
lea eax, [esp + 0x10]
push eax
push 1
push esi
call dword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
jne 0x40755e
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.unable_to_stop_the_service
lea ecx, [esp + 0x23c]
call fcn.004080dc
push 0x43cf90
lea ecx, [esp + 0x238]
push ecx
call fcn.0042409a
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
push edi
call esi
push 0x1f4
call dword [sym.imp.KERNEL32.dll_Sleep]
mov ecx, dword [esp + 0x43c]
pop edi
mov al, 1
pop esi
mov dword fs:[0], ecx
add esp, 0x440
ret
mov edx, dword [esp + 0x44c]
push edx
call fcn.00407110
mov esi, eax
add esp, 4
test esi, esi
jne 0x4075ce
push str.rfb::Exception
push str.unable_to_locate_running_service
lea ecx, [esp + 0x34]
call fcn.00401120
push 0x43da10
lea eax, [esp + 0x30]
push eax
mov dword [esp + 0x34], 0x4367fc
call fcn.0042409a
push str.sending_service_stop_request
push 0x444204
call fcn.00402670
add esp, 8
push 0
push 0
push 0x400
push esi
call dword [sym.imp.USER32.dll_SendMessageA]
test eax, eax
jne 0x40761e
push str.rfb::Exception
push str.unable_to_stop_service
lea ecx, [esp + 0x34]
call fcn.00401120
push 0x43da10
lea ecx, [esp + 0x30]
push ecx
mov dword [esp + 0x34], 0x4367fc
call fcn.0042409a
lea edx, [esp + 8]
push edx
push esi
mov dword [esp + 0x10], 0
call dword [sym.imp.USER32.dll_GetWindowThreadProcessId]
test eax, eax
jne 0x40765a
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.unable_to_verify_service_has_quit
lea ecx, [esp + 0x34]
call fcn.004080dc
push 0x43cf90
lea eax, [esp + 0x30]
push eax
call fcn.0042409a
mov ecx, dword [esp + 8]
push ecx
push 0
push 0x100001
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov esi, eax
test esi, esi
jne 0x407696
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.unable_to_obtain_service_handle
lea ecx, [esp + 0x34]
call fcn.004080dc
push 0x43cf90
lea edx, [esp + 0x30]
push edx
call fcn.0042409a
push ebp
push str.checking_status
push 0x444204
mov ebp, 5
call fcn.00402670
mov edi, dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
add esp, 8
mov eax, ebp
dec ebp
test eax, eax
je 0x4076c7
push 0x3e8
push esi
call edi
test eax, eax
jne 0x4076b4
test ebp, ebp
pop ebp
jne 0x40756a
push str.failed_to_quit___terminating
push 0x444204
call fcn.00402670
add esp, 8
push 1
push esi
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
test eax, eax
jne 0x407713
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.unable_to_terminate_process_
lea ecx, [esp + 0x34]
call fcn.004080dc
push 0x43cf90
lea ecx, [esp + 0x30]
push ecx
call fcn.0042409a
push str.rfb::Exception
push str.service_failed_to_quit___called_TerminateProcess
lea ecx, [esp + 0x23c]
call fcn.004056ef
push 0x43da10
lea edx, [esp + 0x238]
push edx
call fcn.0042409a
int3