Function at 0x180132170
Capabilities:
Check if file exists
Get file attributes

Disassembly:
mov qword [rsp + 0x20], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x80
mov rax, qword [0x18018f008]
xor rax, rsp
mov qword [rsp + 0x78], rax
mov rsi, rdx
mov ebx, r9d
mov rdi, rcx
mov dword [rsp + 0x48], ebx
mov rcx, rsi
lea rdx, str.native
mov r13d, r8d
xor ebp, ebp
call sym.tcl86t.dll_hcl_FSGetInternalRep
mov r15, rax
test rax, rax
jne 0x1801321fe
test rdi, rdi
je 0x18013259a
mov rax, qword [rsi + 8]
test rax, rax
jne 0x1801321d9
mov rcx, rsi
call sym.tcl86t.dll_hcl_GetString
lea r9, str._:_filename_is_invalid_on_this_platform
mov qword [rsp + 0x20], rbp
mov r8, rax
lea rdx, str.couldnt_open__
mov rcx, rdi
call sym.tcl86t.dll_hcl_AppendResult
xor eax, eax
jmp 0x180132611
mov ecx, r13d
mov edx, 4
mov dword [rsp + 0x40], edx
and ecx, 3
je 0x180132238
sub ecx, 1
je 0x18013222b
cmp ecx, 1
jne 0x180132639
mov dword [rsp + 0x44], 0xc0000000
lea r12d, [rdx + 2]
jmp 0x180132246
mov dword [rsp + 0x44], 0x40000000
mov r12d, edx
jmp 0x180132246
mov dword [rsp + 0x44], 0x80000000
mov r12d, 2
mov eax, r13d
mov ecx, 1
and eax, 0x700
cmp eax, 0x500
ja 0x18013227b
je 0x180132293
cmp eax, 0x100
je 0x1801322a1
cmp eax, 0x200
je 0x180132299
cmp eax, 0x300
jne 0x180132289
mov dword [rsp + 0x40], 2
jmp 0x1801322a1
cmp eax, 0x600
je 0x180132299
cmp eax, 0x700
je 0x180132293
mov dword [rsp + 0x40], 3
jmp 0x1801322a1
mov dword [rsp + 0x40], ecx
jmp 0x1801322a1
mov dword [rsp + 0x40], 5
mov r14, 0xffffffffffffffff
nop dword [rax + rax]
inc r14
cmp word [r15 + r14*2], bp
jne 0x1801322b0
cmp r14d, edx
jne 0x1801322f2
mov r8d, 3
lea rdx, [0x180172c18]
mov rcx, r15
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsnicmp]
test eax, eax
jne 0x1801323f3
movzx eax, word [r15 + 6]
sub ax, 0x31
cmp ax, 8
ja 0x1801323f3
jmp 0x18013234b
cmp r14d, 8
jl 0x1801323f8
mov ebx, 7
lea rdx, [0x180172c20]
mov r8d, ebx
mov rcx, r15
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsnicmp]
test eax, eax
jne 0x1801323ef
movsxd rcx, r14d
cmp rcx, rbx
jle 0x18013234b
nop dword [rax]
nop dword [rax + rax]
movzx eax, word [r15 + rbx*2]
sub ax, 0x30
cmp ax, 9
ja 0x1801323ef
inc rbx
cmp rbx, rcx
jl 0x180132330
call fcn.18013f800
mov edx, dword [rsp + 0x44]
xor r9d, r9d
mov qword [rsp + 0x30], rbp
xor r8d, r8d
mov dword [rsp + 0x28], 0x40000000
mov rcx, r15
mov dword [rsp + 0x20], 3
call qword [sym.imp.KERNEL32.dll_CreateFileW]
cmp rax, 0xffffffffffffffff
jne 0x1801323da
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
call sym.tcl86t.dll_hclWinConvertError
test rdi, rdi
je 0x18013259a
mov rbx, qword [rsi + 8]
test rbx, rbx
jne 0x1801323a8
mov rcx, rsi
call sym.tcl86t.dll_hcl_GetString
mov rbx, rax
mov rcx, rdi
call sym.tcl86t.dll_hcl_PosixError
lea r9, [0x18016a548]
mov qword [rsp + 0x28], rbp
mov r8, rbx
mov qword [rsp + 0x20], rax
lea rdx, str.couldnt_open_serial__
mov rcx, rdi
call sym.tcl86t.dll_hcl_AppendResult
xor eax, eax
jmp 0x180132611
mov r8d, r12d
lea rdx, [rsp + 0x50]
mov rcx, rax
call fcn.180140810
jmp 0x180132611
mov ebx, dword [rsp + 0x48]
mov ecx, 1
mov r14d, r13d
and r14d, 0x100
je 0x180132411
test bl, 0x80
mov eax, 0x80
cmove eax, ecx
jmp 0x180132420
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
cmove eax, ebp
mov edx, dword [rsp + 0x44]
xor r9d, r9d
mov qword [rsp + 0x30], rbp
mov rcx, r15
mov dword [rsp + 0x28], eax
mov eax, dword [rsp + 0x40]
lea r8d, [r9 + 3]
mov dword [rsp + 0x20], eax
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rbx, rax
cmp rax, 0xffffffffffffffff
jne 0x1801324a2
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
cmp ax, 0x6e
jne 0x18013246c
test r14d, r14d
mov ecx, 2
mov eax, 0x50
cmovne ecx, eax
call sym.tcl86t.dll_hclWinConvertError
test rdi, rdi
je 0x18013259a
mov rbx, qword [rsi + 8]
test rbx, rbx
jne 0x18013248e
mov rcx, rsi
call sym.tcl86t.dll_hcl_GetString
mov rbx, rax
mov rcx, rdi
call sym.tcl86t.dll_hcl_PosixError
lea rcx, str.couldnt_open___s_:__s
jmp 0x180132584
mov rcx, rbx
call fcn.180132b10
cmp eax, 2
jbe 0x1801325f1
cmp eax, 3
je 0x1801325b0
cmp eax, 4
je 0x180132539
cmp eax, 5
jne 0x1801324db
mov r8d, r12d
lea rdx, [rsp + 0x50]
mov rcx, rbx
call fcn.180133ae0
jmp 0x18013260b
mov rax, qword [rsi + 8]
test rax, rax
jne 0x1801324ec
mov rcx, rsi
call sym.tcl86t.dll_hcl_GetString
mov rdx, rax
lea rcx, str.couldnt_open___s_:_bad_file_type
call sym.tcl86t.dll_hcl_ObjPrintf
mov rdx, rax
mov rcx, rdi
call sym.tcl86t.dll_hcl_SetObjResult
lea rax, str.BAD_TYPE
mov qword [rsp + 0x28], rbp
lea r9, str.CHANNEL
mov qword [rsp + 0x20], rax
lea r8, str.VALUE
mov rcx, rdi
lea rdx, [0x180160820]
call sym.tcl86t.dll_hcl_SetErrorCode
jmp 0x18013260e
mov r8d, dword [rsp + 0x44]
mov rdx, r15
mov rcx, rbx
call fcn.180140780
cmp rax, 0xffffffffffffffff
jne 0x18013259e
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
call sym.tcl86t.dll_hclWinConvertError
test rdi, rdi
je 0x18013259a
mov rbx, qword [rsi + 8]
test rbx, rbx
jne 0x180132575
mov rcx, rsi
call sym.tcl86t.dll_hcl_GetString
mov rbx, rax
mov rcx, rdi
call sym.tcl86t.dll_hcl_PosixError
lea rcx, str.couldnt_reopen_serial___s_:__s
mov r8, rax
mov rdx, rbx
call sym.tcl86t.dll_hcl_ObjPrintf
mov rdx, rax
mov rcx, rdi
call sym.tcl86t.dll_hcl_SetObjResult
xor eax, eax
jmp 0x180132611
mov r8d, r12d
lea rdx, [rsp + 0x50]
mov rcx, rax
call fcn.180140810
jmp 0x18013260b
test r12b, 2
je 0x1801325c3
mov rcx, rbx
call fcn.18013bae0
mov rdi, rax
jmp 0x1801325c6
mov rdi, rbp
test r12b, 4
je 0x1801325d6
mov rcx, rbx
call fcn.18013bae0
jmp 0x1801325d9
mov rax, rbp
xor r9d, r9d
mov qword [rsp + 0x20], rbp
xor r8d, r8d
mov rdx, rax
mov rcx, rdi
call sym.tcl86t.dll_hclpCreateCommandChannel
jmp 0x18013260b
shr r13d, 1
lea rdx, [rsp + 0x50]
and r13d, 4
mov r8d, r12d
mov r9d, r13d
mov rcx, rbx
call fcn.1801328d0
mov rbp, rax
mov rax, rbp
mov rcx, qword [rsp + 0x78]
xor rcx, rsp
call fcn.180146240
mov rbx, qword [rsp + 0xd8]
add rsp, 0x80
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
lea rcx, str.TclpOpenFileChannel:_invalid_mode_value
call sym.tcl86t.dll_hcl_Panic
int3