Function at 0x140002ef0
Capabilities:
Delete service
Query service status
Stop service

Disassembly:
push rdi
sub rsp, 0x60
mov qword [rsp + 0x20], 0xfffffffffffffffe
mov qword [rsp + 0x70], rbx
mov rax, qword [0x14002e0b0]
xor rax, rsp
mov qword [rsp + 0x50], rax
mov qword [rsp + 0x48], 7
mov qword [rsp + 0x40], 0
mov word [rsp + 0x30], 0
xor r8d, r8d
lea edx, [r8 + 0xe]
lea rcx, [rsp + 0x28]
call fcn.1400053f0
lea rcx, [rsp + 0x30]
mov rdx, qword [rsp + 0x48]
cmp rdx, 8
cmovae rcx, qword [rsp + 0x30]
add rdx, rdx
mov r9d, 0x1c
lea r8, str._RemoveService
call fcn.1400100b0
mov qword [rsp + 0x40], 0xe
lea rax, [rsp + 0x30]
cmp qword [rsp + 0x48], 8
cmovae rax, qword [rsp + 0x30]
mov word [rax + 0x1c], 0
lea r9, [rsp + 0x30]
cmp qword [rsp + 0x48], 8
cmovae r9, qword [rsp + 0x30]
lea r8, str._s__entering
mov edx, 0x65
lea rcx, [0x14002f750]
call fcn.14000bba0
nop
xor edx, edx
xor ecx, ecx
mov r8d, 0xf003f
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov rdi, rax
test rax, rax
je 0x14000315f
mov r8d, 0xf01ff
lea rdx, str.EpsonScanSvc
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov rbx, rax
test rax, rax
je 0x140003133
lea r8, [0x1400308f8]
mov edx, 1
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
je 0x1400030d9
lea r9, str.Epson_Scanner_Service
lea r8, str.Stopping__s_n
mov edx, 2
lea rcx, [0x14002f750]
call fcn.14000bba0
mov ecx, 0x3e8
call qword [sym.imp.KERNEL32.dll_Sleep]
lea rdx, [0x1400308f8]
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
je 0x140003090
nop
nop
mov eax, dword [0x1400308fc]
cmp eax, 3
jne 0x140003096
lea r8, [0x140026444]
lea edx, [rax - 1]
lea rcx, [0x14002f750]
call fcn.14000bba0
mov ecx, 0x3e8
call qword [sym.imp.KERNEL32.dll_Sleep]
lea rdx, [0x1400308f8]
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
jne 0x140003050
mov eax, dword [0x1400308fc]
cmp eax, 1
jne 0x1400030ba
lea r9, str.Epson_Scanner_Service
lea r8, [0x140026448]
lea edx, [rax + 1]
lea rcx, [0x14002f750]
call fcn.14000bba0
jmp 0x1400030d9
lea r9, str.Epson_Scanner_Service
lea r8, str._s_failed_to_stop_n
mov edx, 5
lea rcx, [0x14002f750]
call fcn.14000bba0
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_DeleteService]
test eax, eax
je 0x140003107
lea r9, str.Epson_Scanner_Service
lea r8, str._s_removed_n
mov edx, 2
lea rcx, [0x14002f750]
call fcn.14000bba0
jmp 0x140003128
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r9d, eax
lea r8, str.DeleteService_failed:__x_n
mov edx, 5
lea rcx, [0x14002f750]
call fcn.14000bba0
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x140003154
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r9d, eax
lea r8, str.OpenService_failed:__x_n
mov edx, 5
lea rcx, [0x14002f750]
call fcn.14000bba0
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x140003181
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r9d, eax
lea r8, str.OpenSCManager_failed:__x_n
mov edx, 5
lea rcx, [0x14002f750]
call fcn.14000bba0
nop
lea r9, [rsp + 0x30]
cmp qword [rsp + 0x48], 8
cmovae r9, qword [rsp + 0x30]
lea r8, str._s__leaving
mov edx, 0x65
lea rcx, [0x14002f750]
call fcn.14000bba0
nop
cmp qword [rsp + 0x48], 8
jb 0x1400031bd
mov rcx, qword [rsp + 0x30]
call fcn.14000eef0
mov rcx, qword [rsp + 0x50]
xor rcx, rsp
call fcn.14000f470
mov rbx, qword [rsp + 0x70]
add rsp, 0x60
pop rdi
ret