Function at 0x1400060c0
Capabilities:
Create service
Modify service
Persist via windows service
Start service

Disassembly:
mov rax, rsp
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rax - 0x238]
sub rsp, 0x310
mov qword [rbp - 0x30], 0xfffffffffffffffe
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rsi
mov qword [rax + 0x18], rdi
mov rax, qword [0x1400ae088]
xor rax, rsp
mov qword [rbp + 0x200], rax
xor r13d, r13d
mov dword [rsp + 0x70], r13d
lea rcx, str.Install_service_entry
call fcn.140018760
lea r9, [0x1400af290]
lea r8d, [r13 + 0x72]
lea rdx, str.InstallService
lea rcx, str.__hs_____d_:_____s
call fcn.140018f50
xor edx, edx
xor ecx, ecx
lea r8d, [r13 + 2]
call qword [sym.imp.api_ms_win_service_management_l1_1_0.dll_OpenSCManagerW]
mov qword [rbp - 0x70], rax
test rax, rax
je 0x1400065ad
xor edx, edx
mov r8d, 0x20a
lea rcx, [rbp - 0x10]
call fcn.140026290
mov r8d, 0x105
lea rdx, [rbp - 0x10]
xor ecx, ecx
call qword [sym.imp.api_ms_win_core_libraryloader_l1_2_0.dll_GetModuleFileNameW]
test eax, eax
je 0x14000659e
call fcn.1400030f0
mov rcx, rax
test rax, rax
je 0x14000661c
mov rax, qword [rax]
call qword [rax + 0x18]
add rax, 0x18
mov qword [rsp + 0x78], rax
lea rax, [rbp - 0x10]
lea r15, [r13 - 1]
cmp rax, 0x10000
jae 0x1400061ba
lea rax, [rbp - 0x10]
movzx edx, ax
lea rcx, [rsp + 0x78]
call fcn.140003290
jmp 0x1400061dd
lea rcx, [rbp - 0x10]
mov rax, r15
inc rax
cmp word [rcx + rax*2], 0
jne 0x1400061c1
mov r8d, eax
lea rdx, [rbp - 0x10]
lea rcx, [rsp + 0x78]
call fcn.140005a50
nop
mov rdi, qword [rsp + 0x78]
lea rax, [rdi - 0x18]
mov qword [rbp - 0x68], rax
mov rcx, qword [rdi - 0x18]
test rcx, rcx
je 0x140006201
mov rax, qword [rcx]
call qword [rax + 0x20]
mov rcx, rax
test rax, rax
jne 0x140006212
call fcn.1400030f0
mov rdx, qword [rax]
mov rcx, rax
call qword [rdx + 0x20]
mov rcx, rax
test rcx, rcx
je 0x140006627
mov rax, qword [rcx]
call qword [rax + 0x18]
lea rbx, [rax + 0x18]
mov qword [rbp - 0x78], rbx
mov dword [rsp + 0x70], 1
movsxd r12, dword [rdi - 0x10]
lea rdx, [0x140089ad0]
mov rsi, r15
nop
inc rsi
cmp word [rdx + rsi*2], 0
jne 0x140006240
lea r14d, [rsi + r12]
test r14d, r14d
js 0x140006632
mov ecx, 1
sub ecx, dword [rbx - 8]
mov eax, dword [rbx - 0xc]
sub eax, r14d
or eax, ecx
jge 0x140006280
mov edx, r14d
lea rcx, [rbp - 0x78]
call fcn.140004030
mov rbx, qword [rbp - 0x78]
lea rdx, [0x140089ad0]
movsxd rax, esi
lea rsi, [rax + rax]
test rsi, rsi
je 0x1400062ae
test rbx, rbx
jne 0x1400062a3
call fcn.140031b70
mov dword [rax], 0x16
call fcn.1400319c4
jmp 0x1400062ae
mov r8, rsi
mov rcx, rbx
call fcn.140025e20
mov rdx, r12
add rdx, rdx
lea rcx, [rsi + rbx]
mov r9, rdx
mov r8, rdi
call fcn.140007e20
cmp r14d, dword [rbx - 0xc]
jg 0x140006611
mov dword [rbx - 0x10], r14d
movsxd rax, r14d
mov word [rbx + rax*2], r13w
mov rcx, qword [rbx - 0x18]
test rcx, rcx
je 0x1400062f0
mov rax, qword [rcx]
call qword [rax + 0x20]
mov rcx, rax
test rax, rax
jne 0x140006301
call fcn.1400030f0
mov rdx, qword [rax]
mov rcx, rax
call qword [rdx + 0x20]
mov rcx, rax
test rcx, rcx
je 0x14000663d
mov rax, qword [rcx]
call qword [rax + 0x18]
lea rdi, [rax + 0x18]
mov qword [rbp - 0x80], rdi
mov dword [rsp + 0x70], 3
mov r14, r15
lea rax, [0x140089ad0]
nop word [rax + rax]
inc r14
cmp word [rax + r14*2], 0
jne 0x140006330
movsxd rsi, dword [rbx - 0x10]
lea r12d, [rsi + r14]
test r12d, r12d
js 0x140006648
mov ecx, 1
sub ecx, dword [rdi - 8]
mov eax, dword [rdi - 0xc]
sub eax, r12d
or eax, ecx
jge 0x14000636e
mov edx, r12d
lea rcx, [rbp - 0x80]
call fcn.140004030
mov rdi, qword [rbp - 0x80]
add rsi, rsi
mov r9, rsi
mov r8, rbx
mov rdx, rsi
mov rcx, rdi
call fcn.140007e20
lea rcx, [rsi + rdi]
movsxd r8, r14d
add r8, r8
je 0x1400063b1
test rcx, rcx
jne 0x1400063a5
call fcn.140031b70
mov dword [rax], 0x16
call fcn.1400319c4
jmp 0x1400063b1
lea rdx, [0x140089ad0]
call fcn.140025e20
cmp r12d, dword [rdi - 0xc]
jg 0x140006653
mov dword [rdi - 0x10], r12d
movsxd rax, r12d
xor r14d, r14d
mov word [rdi + rax*2], r14w
mov dword [rsp + 0x70], 2
mov eax, r15d
lock xadd dword [rbx - 8], eax
sub eax, 1
jg 0x1400063ee
mov rcx, qword [rbx - 0x18]
mov rax, qword [rcx]
lea rdx, [rbx - 0x18]
call qword [rax + 8]
nop
mov eax, r15d
mov rdx, qword [rbp - 0x68]
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x140006408
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + 8]
mov qword [rsp + 0x60], r14
mov qword [rsp + 0x58], r14
mov qword [rsp + 0x50], r14
mov qword [rsp + 0x48], r14
mov qword [rsp + 0x40], r14
mov rbx, qword [rbp - 0x80]
mov qword [rsp + 0x38], rbx
mov dword [rsp + 0x30], 1
mov dword [rsp + 0x28], 2
mov dword [rsp + 0x20], 0x10
mov r9d, 0xf01ff
mov r8, qword [str.Bluetooth_Device_Manager_Service]
mov rdx, qword [str.RtkBtManServ]
mov rsi, qword [rbp - 0x70]
mov rcx, rsi
call qword [sym.imp.api_ms_win_service_management_l1_1_0.dll_CreateServiceW]
mov rdi, rax
test rax, rax
je 0x140006545
mov rcx, qword [str.Handles_installation_and_removal_of_Bluetooth_devices._n]
mov qword [rbp - 0x60], rcx
lea r8, [rbp - 0x60]
mov edx, 1
mov rcx, rax
call qword [sym.imp.api_ms_win_service_management_l2_1_0.dll_ChangeServiceConfig2W]
mov qword [rbp - 0x58], r14
mov qword [rbp - 0x40], 3
mov dword [rbp - 0x28], 1
mov dword [rbp - 0x24], 0x1388
mov dword [rbp - 0x20], 1
mov qword [rbp - 0x1c], 0x1388
mov dword [rbp - 0x14], 0x1388
mov qword [rbp - 0x50], r14
lea rax, [rbp - 0x28]
mov qword [rbp - 0x38], rax
mov qword [rbp - 0x48], r14
lea r8, [rbp - 0x58]
mov edx, 2
mov rcx, rdi
call qword [sym.imp.api_ms_win_service_management_l2_1_0.dll_ChangeServiceConfig2W]
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov edx, eax
lea rcx, str.ChangeServiceConfig2_ret:__d
call fcn.140018760
lea r9, [0x1400af290]
mov r8d, 0x9c
lea rdx, str.InstallService
lea rcx, str.__hs_____d_:_____s
call fcn.140018f50
xor r8d, r8d
xor edx, edx
mov rcx, rdi
call qword [sym.imp.api_ms_win_service_management_l1_1_0.dll_StartServiceW]
mov rcx, rdi
call qword [sym.imp.api_ms_win_service_management_l1_1_0.dll_CloseServiceHandle]
call qword [sym.imp.api_ms_win_core_processthreads_l1_1_0.dll_GetCurrentProcessId]
mov edx, eax
lea rcx, str.CurrentProcessID_from_InstallService_is__d
call fcn.140018760
mov r8d, 0xa2
jmp 0x14000655f
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov edx, eax
lea rcx, str.create_service_failed:_GetLastError__0x_x
call fcn.140018760
mov r8d, 0xa7
lea r9, [0x1400af290]
lea rdx, str.InstallService
lea rcx, str.__hs_____d_:_____s
call fcn.140018f50
nop
lea rdx, [rbx - 0x18]
lock xadd dword [rdx + 0x10], r15d
sub r15d, 1
jg 0x1400065a2
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + 8]
mov rcx, rsi
call qword [sym.imp.api_ms_win_service_management_l1_1_0.dll_CloseServiceHandle]
jmp 0x1400065e1
mov rsi, qword [rbp - 0x70]
mov rcx, rsi
call qword [sym.imp.api_ms_win_service_management_l1_1_0.dll_CloseServiceHandle]
jmp 0x1400065e1
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov edx, eax
lea rcx, str.OpenSCManager_failed:_GetLastError__0x_x
call fcn.140018760
lea r9, [0x1400af290]
mov r8d, 0xaf
lea rdx, str.InstallService
lea rcx, str.__hs_____d_:_____s
call fcn.140018f50
mov rcx, qword [rbp + 0x200]
xor rcx, rsp
call fcn.140023950
lea r11, [rsp + 0x310]
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x38]
mov rdi, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret
mov ecx, 0x80070057
call fcn.140002850
nop
mov ecx, 0x80004005
call fcn.140002850
nop
mov ecx, 0x80004005
call fcn.140002850
int3
mov ecx, 0x80070057
call fcn.140002850
nop
mov ecx, 0x80004005
call fcn.140002850
int3
mov ecx, 0x80070057
call fcn.140002850
int3
mov ecx, 0x80070057
call fcn.140002850
int3