Function at 0x140005740
Capabilities:
Create service
Delete service
Persist via windows service
Query service status
Stop service

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x18], rsi
mov qword [rsp + 0x20], rdi
push rbp
lea rbp, [rsp - 0x1c0]
sub rsp, 0x2c0
mov rax, qword [0x14002e010]
xor rax, rsp
mov qword [rbp + 0x1b0], rax
mov rbx, rdx
cmp ecx, 1
jle 0x140005a20
mov rdx, qword [rdx + 8]
movzx eax, word [rdx]
sub ax, 0x2d
mov ecx, 0xfffd
test cx, ax
jne 0x140005a20
add rdx, 2
lea rcx, str.install
call fcn.140011090
test eax, eax
jne 0x1400058ad
mov r8d, 0x104
lea rdx, [rbp - 0x60]
xor ecx, ecx
call qword [sym.imp.api_ms_win_core_libraryloader_l1_2_0.dll_GetModuleFileNameW]
test eax, eax
jne 0x1400057dc
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov edx, eax
lea rcx, str.GetModuleFileName_failed_w_err_0x_08lx_n
call fcn.140005c00
jmp 0x140005bb2
lea rdx, [rbp - 0x60]
lea rcx, str.szPath_s_n
call fcn.140005c00
xor edx, edx
xor ecx, ecx
lea r8d, [rdx + 3]
call qword [sym.imp.api_ms_win_service_management_l1_1_0.dll_OpenSCManagerW]
mov rsi, rax
test rax, rax
jne 0x14000581b
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov edx, eax
lea rcx, str.OpenSCManager_failed_w_err_0x_08lx_n
call fcn.140005c00
jmp 0x140005bb2
xor ebx, ebx
mov qword [rsp + 0x60], rbx
mov qword [rsp + 0x58], rbx
mov qword [rsp + 0x50], rbx
mov qword [rsp + 0x48], rbx
mov qword [rsp + 0x40], rbx
lea rax, [rbp - 0x60]
mov qword [rsp + 0x38], rax
mov dword [rsp + 0x30], 1
mov dword [rsp + 0x28], 2
mov dword [rsp + 0x20], 0x10
mov r9d, 0xf01ff
lea r8, str.AsusPTP
lea rdi, str.AsusPTPService
mov rdx, rdi
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_CreateServiceW]
mov rbx, rax
test rax, rax
jne 0x1400058a1
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov edx, eax
lea rcx, str.CreateService_failed_w_err_0x_08lx_n
call fcn.140005c00
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x140005bb2
lea rcx, str._s_is_installed._n
jmp 0x140005a01
mov rdx, qword [rbx + 8]
add rdx, 2
lea rcx, str.remove
call fcn.140011090
test eax, eax
jne 0x140005bb2
lea rcx, str.Service_stop_n
call fcn.140005c00
xorps xmm0, xmm0
xor eax, eax
movups xmmword [rsp + 0x78], xmm0
mov qword [rbp - 0x78], rax
mov dword [rbp - 0x70], eax
xor edx, edx
xor ecx, ecx
lea r8d, [rax + 1]
call qword [sym.imp.api_ms_win_service_management_l1_1_0.dll_OpenSCManagerW]
mov rsi, rax
test rax, rax
je 0x140005802
mov r8d, 0x10024
lea rdi, str.AsusPTPService
mov rdx, rdi
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov rbx, rax
test rax, rax
jne 0x140005943
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov edx, eax
lea rcx, str.OpenService_failed_w_err_0x_08lx_n
call fcn.140005c00
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x140005bb2
lea r8, [rsp + 0x78]
mov edx, 1
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
je 0x1400059d7
mov rdx, rdi
lea rcx, str.Stopping__s.
call fcn.140005c00
mov ecx, 0x3e8
call qword [sym.imp.api_ms_win_core_synch_l1_2_0.dll_Sleep]
lea rdx, [rsp + 0x78]
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
je 0x1400059b8
mov eax, dword [rsp + 0x7c]
cmp eax, 3
jne 0x1400059bc
lea rcx, [0x140028b24]
call fcn.140005c00
mov ecx, 0x3e8
call qword [sym.imp.api_ms_win_core_synch_l1_2_0.dll_Sleep]
lea rdx, [rsp + 0x78]
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
jne 0x140005986
mov eax, dword [rsp + 0x7c]
mov rdx, rdi
cmp eax, 1
lea rcx, [0x140028b28]
je 0x1400059d2
lea rcx, str._n_s_failed_to_stop._n
call fcn.140005c00
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_DeleteService]
test eax, eax
jne 0x1400059fa
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov edx, eax
lea rcx, str.DeleteService_failed_w_err_0x_08lx_n
call fcn.140005c00
jmp 0x140005a09
lea rcx, str._s_is_removed._n
mov rdx, rdi
call fcn.140005c00
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x140005bb2
lea rcx, str.Parameters:_n
call fcn.140005c00
lea rcx, str.__install__to_install_the_service._n
call fcn.140005c00
lea rcx, str.__remove___to_remove_the_service._n
call fcn.140005c00
xor edx, edx
mov r8d, 0x108
lea rcx, [rbp - 0x60]
call fcn.1400087b0
lea rdi, str.AsusPTPService
mov qword [rbp - 0x58], rdi
xorps xmm0, xmm0
movdqa xmmword [rbp - 0x30], xmm0
mov dword [rbp - 0x50], 0x10
mov dword [rbp - 0x4c], 2
mov qword [rbp - 0x48], CreateErrorInfo
xor ebx, ebx
mov qword [rbp - 0x40], rbx
mov dword [rbp - 0x38], ebx
lea rax, vtable.AsusPTPService.0
mov qword [rbp - 0x60], rax
mov qword [rbp + 0x58], rbx
movdqa xmmword [rbp + 0x60], xmm0
lea rax, [rbp - 0x60]
mov qword [0x140030650], rax
mov qword [rbp - 0x1c], rbx
mov qword [rbp - 0x10], rbx
mov qword [rbp - 8], rbx
mov qword [rbp + 8], rbx
movdqa xmmword [rbp + 0x10], xmm0
xorps xmm1, xmm1
movdqa xmmword [rbp + 0x20], xmm1
mov qword [rbp + 0x30], rbx
mov qword [rbp + 0x40], rbx
mov qword [rbp + 0x38], rbx
mov dword [rbp + 0x48], 1
mov dword [rbp + 0x50], 1
mov dword [rbp + 0x4c], 1
mov dword [rbp - 0x14], ebx
mov qword [rbp + 0x98], rbx
mov qword [rbp + 0xa0], rbx
mov dword [rsp + 0x74], ebx
lea rcx, str.kernel32
call qword [sym.imp.api_ms_win_core_libraryloader_l1_2_0.dll_GetModuleHandleW]
test rax, rax
je 0x140005b33
lea rdx, str.IsWow64Process
mov rcx, rax
call qword [sym.imp.api_ms_win_core_libraryloader_l1_2_0.dll_GetProcAddress]
mov rdi, rax
test rax, rax
je 0x140005b33
call qword [sym.imp.api_ms_win_core_processthreads_l1_1_0.dll_GetCurrentProcess]
mov rcx, rax
lea rdx, [rsp + 0x74]
call rdi
mov eax, dword [rsp + 0x74]
mov dword [rbp - 0x20], eax
lea rcx, [rbp + 0x70]
call qword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_InitializeCriticalSection]
xor r9d, r9d
xor r8d, r8d
lea edx, [r9 + 1]
xor ecx, ecx
call qword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_CreateEventW]
mov qword [rbp], rax
test rax, rax
je 0x140005bdc
lea rax, [rbp - 0x60]
mov qword [0x140030658], rax
mov rax, qword [rbp - 0x58]
mov qword [rsp + 0x78], rax
lea rax, [0x140005f80]
mov qword [rbp - 0x80], rax
mov qword [rbp - 0x78], rbx
mov qword [rbp - 0x70], rbx
lea rcx, [rsp + 0x78]
call qword [sym.imp.ADVAPI32.dll_StartServiceCtrlDispatcherW]
test eax, eax
jne 0x140005ba9
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov edx, eax
lea rcx, str.Service_failed_to_run_w_err_0x_08lx_n
call fcn.140005c00
lea rcx, [rbp - 0x60]
call fcn.1400012d0
xor eax, eax
mov rcx, qword [rbp + 0x1b0]
xor rcx, rsp
call fcn.140006750
lea r11, [rsp + 0x2c0]
mov rbx, qword [r11 + 0x10]
mov rsi, qword [r11 + 0x20]
mov rdi, qword [r11 + 0x28]
mov rsp, r11
pop rbp
ret
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
nop
mov dword [rsp + 0x70], eax
lea rdx, [0x14002bf18]
lea rcx, [rsp + 0x70]
call fcn.14000848c
int3