Function at 0x1400124e0
Capabilities:
Create thread

Disassembly:
mov qword [rsp + 0x10], rbx
push rsi
sub rsp, 0x880
mov rax, qword [0x14008f088]
xor rax, rsp
mov qword [rsp + 0x870], rax
mov rbx, rcx
lea rcx, str._API_RTK_Start_Watch_UsbErr
call fcn.140010f80
lea r9, [0x140090270]
mov r8d, 0x19d
lea rdx, str.RTKStartWatchUsbErrInternal
lea rcx, str.__hs_____d_:_____s
call fcn.140011770
xor edx, edx
lea rcx, [rsp + 0x70]
mov r8d, 0x800
call fcn.14001ead0
mov r8, qword [str..BtFilter]
lea rcx, [rsp + 0x70]
mov edx, 0x800
call fcn.140012a30
mov edx, 0x400
lea rax, [rsp + 0x70]
mov ecx, edx
cmp word [rax], 0
je 0x140012572
add rax, 2
sub rcx, 1
jne 0x140012562
xor esi, esi
mov rax, rdx
sub rax, rcx
mov r8d, esi
test rcx, rcx
cmovne r8, rax
je 0x1400125d7
lea rcx, [rsp + 0x70]
lea rcx, [rcx + r8*2]
sub rdx, r8
je 0x1400125c9
lea rax, [r8 + 0x7ffffbfe]
add rax, rdx
lea r9, str.USBERROR
sub r9, rcx
test rax, rax
je 0x1400125c9
movzx r8d, word [r9 + rcx]
test r8w, r8w
je 0x1400125c9
mov word [rcx], r8w
dec rax
add rcx, 2
sub rdx, 1
jne 0x1400125a8
test rdx, rdx
lea rax, [rcx - 2]
cmovne rax, rcx
mov word [rax], si
cmp qword [0x14008f050], 0xffffffffffffffff
jne 0x140012692
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 [0x14008f050], rax
cmp rax, 0xffffffffffffffff
jne 0x140012692
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.140010f80
lea r9, [0x140090270]
mov r8d, 0x4c
lea rdx, str.InternalOpenDevice
lea rcx, str.__hs_____d_:_____s
call fcn.140011770
cmp qword [0x14008f050], 0xffffffffffffffff
jne 0x140012692
lea rcx, str.___API_RTKStartWatchUsbErr_Fail_1
call fcn.140010f80
lea r9, [0x140090270]
mov r8d, 0x1a2
lea rdx, str.RTKStartWatchUsbErrInternal
lea rcx, str.__hs_____d_:_____s
call fcn.140011770
mov eax, 0xffffff9c
jmp 0x1400127c5
test rbx, rbx
jne 0x1400126cb
lea rcx, str.___API_RTKStartWatchUsbErr_Fail_2
call fcn.140010f80
lea r9, [0x140090270]
mov r8d, 0x1a8
lea rdx, str.RTKStartWatchUsbErrInternal
lea rcx, str.__hs_____d_:_____s
call fcn.140011770
lea eax, [rbx - 0x65]
jmp 0x1400127c5
mov r9d, 1
mov dword [rsp + 0x28], 1
lea rax, [rsp + 0x40]
mov qword [0x140091270], rbx
lea r8, [rsp + 0x41]
mov byte [0x140091278], 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.140012270
test eax, eax
jne 0x140012748
lea rcx, str.___API_RTK_Start_Watch_UsbErr_Fail_3
call fcn.140010f80
lea r9, [0x140090270]
mov r8d, 0x1b2
lea rdx, str.RTKStartWatchUsbErrInternal
lea rcx, str.__hs_____d_:_____s
call fcn.140011770
mov eax, 0xffffff9a
jmp 0x1400127c5
mov qword [rsp + 0x890], rdi
lea rbx, [rsp + 0x48]
mov edi, 4
nop word [rax + rax]
mov qword [rsp + 0x28], rsi
lea r8, [0x140012b10]
xor r9d, r9d
mov dword [rsp + 0x20], esi
xor edx, edx
xor ecx, ecx
call fcn.140042ba0
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 0x140012760
lea rcx, str.___API_RTK_Start_Watch_UsbErr
call fcn.140010f80
lea r9, [0x140090270]
mov r8d, 0x1c4
lea rdx, str.RTKStartWatchUsbErrInternal
lea rcx, str.__hs_____d_:_____s
call fcn.140011770
mov rdi, qword [rsp + 0x890]
xor eax, eax
mov rcx, qword [rsp + 0x870]
xor rcx, rsp
call fcn.14001c180
mov rbx, qword [rsp + 0x898]
add rsp, 0x880
pop rsi
ret