Function at 0x140019b20
Capabilities:
Create thread

Disassembly:
mov qword [rsp + 0x10], rbx
push rsi
sub rsp, 0x880
mov rax, qword [0x1400ae088]
xor rax, rsp
mov qword [rsp + 0x870], rax
mov rbx, rcx
lea rcx, str._API_RTK_Start_Watch_UsbErr
call fcn.140018760
lea r9, [0x1400af290]
mov r8d, 0x19d
lea rdx, str.RTKStartWatchUsbErrInternal
lea rcx, str.__hs_____d_:_____s
call fcn.140018f50
xor edx, edx
lea rcx, [rsp + 0x70]
mov r8d, 0x800
call fcn.140026290
mov r8, qword [str..BtFilter]
lea rcx, [rsp + 0x70]
mov edx, 0x800
call fcn.14001a070
mov edx, 0x400
lea rax, [rsp + 0x70]
mov ecx, edx
cmp word [rax], 0
je 0x140019bb2
add rax, 2
sub rcx, 1
jne 0x140019ba2
xor esi, esi
mov rax, rdx
sub rax, rcx
mov r8d, esi
test rcx, rcx
cmovne r8, rax
je 0x140019c17
lea rcx, [rsp + 0x70]
lea rcx, [rcx + r8*2]
sub rdx, r8
je 0x140019c09
lea rax, [r8 + 0x7ffffbfe]
add rax, rdx
lea r9, str.USBERROR
sub r9, rcx
test rax, rax
je 0x140019c09
movzx r8d, word [r9 + rcx]
test r8w, r8w
je 0x140019c09
mov word [rcx], r8w
dec rax
add rcx, 2
sub rdx, 1
jne 0x140019be8
test rdx, rdx
lea rax, [rcx - 2]
cmovne rax, rcx
mov word [rax], si
cmp qword [0x1400ae050], 0xffffffffffffffff
jne 0x140019cd2
xor r9d, r9d
mov qword [rsp + 0x30], rsi
mov dword [rsp + 0x28], 0x40000000
lea rcx, [rsp + 0x70]
mov edx, 0xc0000000
mov dword [rsp + 0x20], 3
lea r8d, [r9 + 3]
call qword [sym.imp.api_ms_win_core_file_l1_1_0.dll_CreateFileW]
mov qword [0x1400ae050], rax
cmp rax, 0xffffffffffffffff
jne 0x140019cd2
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov edx, eax
lea rcx, str.InternalOpenDevice_failed_0x_x
call fcn.140018760
lea r9, [0x1400af290]
mov r8d, 0x4c
lea rdx, str.InternalOpenDevice
lea rcx, str.__hs_____d_:_____s
call fcn.140018f50
cmp qword [0x1400ae050], 0xffffffffffffffff
jne 0x140019cd2
lea rcx, str.___API_RTKStartWatchUsbErr_Fail_1
call fcn.140018760
lea r9, [0x1400af290]
mov r8d, 0x1a2
lea rdx, str.RTKStartWatchUsbErrInternal
lea rcx, str.__hs_____d_:_____s
call fcn.140018f50
mov eax, 0xffffff9c
jmp 0x140019e05
test rbx, rbx
jne 0x140019d0b
lea rcx, str.___API_RTKStartWatchUsbErr_Fail_2
call fcn.140018760
lea r9, [0x1400af290]
mov r8d, 0x1a8
lea rdx, str.RTKStartWatchUsbErrInternal
lea rcx, str.__hs_____d_:_____s
call fcn.140018f50
lea eax, [rbx - 0x65]
jmp 0x140019e05
mov r9d, 1
mov dword [rsp + 0x28], 1
lea rax, [rsp + 0x40]
mov qword [0x1400b0290], rbx
lea r8, [rsp + 0x41]
mov byte [0x1400b0298], 1
lea rcx, [rsp + 0x48]
mov byte [rsp + 0x41], 1
lea edx, [r9 + 0x29]
mov byte [rsp + 0x40], sil
mov qword [rsp + 0x20], rax
call fcn.1400198b0
test eax, eax
jne 0x140019d88
lea rcx, str.___API_RTK_Start_Watch_UsbErr_Fail_3
call fcn.140018760
lea r9, [0x1400af290]
mov r8d, 0x1b2
lea rdx, str.RTKStartWatchUsbErrInternal
lea rcx, str.__hs_____d_:_____s
call fcn.140018f50
mov eax, 0xffffff9a
jmp 0x140019e05
mov qword [rsp + 0x890], rdi
lea rbx, [rsp + 0x48]
mov edi, 4
nop word [rax + rax]
mov qword [rsp + 0x28], rsi
lea r8, [0x14001a150]
xor r9d, r9d
mov dword [rsp + 0x20], esi
xor edx, edx
xor ecx, ecx
call fcn.14004a360
mov rcx, rax
call qword [sym.imp.api_ms_win_core_handle_l1_1_0.dll_CloseHandle]
lea rbx, [rbx + 8]
sub rdi, 1
jne 0x140019da0
lea rcx, str.___API_RTK_Start_Watch_UsbErr
call fcn.140018760
lea r9, [0x1400af290]
mov r8d, 0x1c4
lea rdx, str.RTKStartWatchUsbErrInternal
lea rcx, str.__hs_____d_:_____s
call fcn.140018f50
mov rdi, qword [rsp + 0x890]
xor eax, eax
mov rcx, qword [rsp + 0x870]
xor rcx, rsp
call fcn.140023950
mov rbx, qword [rsp + 0x898]
add rsp, 0x880
pop rsi
ret