Function at 0x140002a30
Capabilities:
Check for time delay via gettickcount
Query service status
Start service

Disassembly:
mov r11, rsp
push r12
sub rsp, 0xa0
mov qword [rsp + 0x60], 0xfffffffffffffffe
mov qword [r11 + 8], rbx
mov qword [r11 + 0x10], rbp
mov qword [r11 + 0x18], rsi
mov qword [r11 + 0x20], rdi
mov rax, qword [0x14002e0b0]
xor rax, rsp
mov qword [rsp + 0x90], rax
mov qword [r11 - 0x20], 7
mov qword [r11 - 0x28], 0
mov word [rsp + 0x70], 0
xor r8d, r8d
lea edx, [r8 + 0xd]
lea rcx, [r11 - 0x40]
call fcn.1400053f0
lea rcx, [rsp + 0x70]
mov rdx, qword [rsp + 0x88]
cmp rdx, 8
cmovae rcx, qword [rsp + 0x70]
add rdx, rdx
mov r9d, 0x1a
lea r8, str._StartService
call fcn.1400100b0
mov qword [rsp + 0x80], 0xd
lea rax, [rsp + 0x70]
cmp qword [rsp + 0x88], 8
cmovae rax, qword [rsp + 0x70]
mov word [rax + 0x1a], 0
lea r9, [rsp + 0x70]
cmp qword [rsp + 0x88], 8
cmovae r9, qword [rsp + 0x70]
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 rbp, rax
test rax, rax
je 0x140002dde
mov r8d, 0xf01ff
lea rdx, str.EpsonScanSvc
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov rdi, rax
test rax, rax
je 0x140002db2
xor r8d, r8d
xor edx, edx
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_StartServiceW]
test eax, eax
jne 0x140002b80
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r9d, eax
lea r8, str.StartService_failed__0x_x_n
mov edx, 5
lea rcx, [0x14002f750]
call fcn.14000bba0
jmp 0x140002bdd
lea r8, str.Service_start_pending_n
mov edx, 2
lea rcx, [0x14002f750]
call fcn.14000bba0
lea r11, [rsp + 0x30]
mov qword [rsp + 0x20], r11
mov r9d, 0x24
lea r8, [rsp + 0x38]
xor edx, edx
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
test eax, eax
jne 0x140002beb
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r9d, eax
lea r8, str.QueryServiceStatusEx_failed__0x_x_n
mov edx, 5
lea rcx, [0x14002f750]
call fcn.14000bba0
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x140002d5d
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov esi, eax
mov ebx, dword [rsp + 0x4c]
cmp dword [rsp + 0x3c], 2
jne 0x140002c87
mov r12d, 0x2710
nop
nop
mov eax, 0xcccccccd
mul dword [rsp + 0x50]
shr edx, 3
cmp edx, 0x3e8
jae 0x140002c2b
mov edx, 0x3e8
jmp 0x140002c32
cmp edx, r12d
cmova edx, r12d
mov ecx, edx
call qword [sym.imp.KERNEL32.dll_Sleep]
lea r11, [rsp + 0x30]
mov qword [rsp + 0x20], r11
mov r9d, 0x24
lea r8, [rsp + 0x38]
xor edx, edx
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
test eax, eax
je 0x140002c87
cmp dword [rsp + 0x4c], ebx
jbe 0x140002c72
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov esi, eax
mov ebx, dword [rsp + 0x4c]
jmp 0x140002c80
call qword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, esi
cmp eax, dword [rsp + 0x50]
ja 0x140002c87
cmp dword [rsp + 0x3c], 2
je 0x140002c10
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
cmp dword [rsp + 0x3c], 4
jne 0x140002cb4
lea r8, str.StartService_SUCCESS_n
mov edx, 2
lea rcx, [0x14002f750]
call fcn.14000bba0
jmp 0x140002dd3
lea r8, str.Service_not_started_n
mov edx, 5
lea rcx, [0x14002f750]
call fcn.14000bba0
mov r9d, dword [rsp + 0x3c]
lea r8, str.__Current_State:__d_n
mov edx, 2
lea rcx, [0x14002f750]
call fcn.14000bba0
mov r9d, dword [rsp + 0x44]
lea r8, str.__Exit_Code:__d_n
mov edx, 2
lea rcx, [0x14002f750]
call fcn.14000bba0
mov r9d, dword [rsp + 0x48]
lea r8, str.__Service_Specific_Exit_Code:__d_n
mov edx, 2
lea rcx, [0x14002f750]
call fcn.14000bba0
mov r9d, dword [rsp + 0x4c]
lea r8, str.__Check_Point:__d_n
mov edx, 2
lea rcx, [0x14002f750]
call fcn.14000bba0
mov r9d, dword [rsp + 0x50]
lea r8, str.__Wait_Hint:__d_n
mov edx, 2
lea rcx, [0x14002f750]
call fcn.14000bba0
mov rcx, rbp
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
nop
lea r9, [rsp + 0x70]
cmp qword [rsp + 0x88], 8
cmovae r9, qword [rsp + 0x70]
lea r8, str._s__leaving
mov edx, 0x65
lea rcx, [0x14002f750]
call fcn.14000bba0
nop
cmp qword [rsp + 0x88], 8
jb 0x140002e42
mov rcx, qword [rsp + 0x70]
call fcn.14000eef0
jmp 0x140002e42
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, rbp
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x140002e00
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 + 0x70]
cmp qword [rsp + 0x88], 8
cmovae r9, qword [rsp + 0x70]
lea r8, str._s__leaving
mov edx, 0x65
lea rcx, [0x14002f750]
call fcn.14000bba0
nop
cmp qword [rsp + 0x88], 8
jb 0x140002e42
mov rcx, qword [rsp + 0x70]
call fcn.14000eef0
mov rcx, qword [rsp + 0x90]
xor rcx, rsp
call fcn.14000f470
lea r11, [rsp + 0xa0]
mov rbx, qword [r11 + 0x10]
mov rbp, qword [r11 + 0x18]
mov rsi, qword [r11 + 0x20]
mov rdi, qword [r11 + 0x28]
mov rsp, r11
pop r12
ret