Function at 0x2100c0f50
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push r15
mov eax, 0x15e8
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
call fcn.21021b550
sub rsp, rax
mov rbx, rcx
mov rsi, rdx
test rdx, rdx
je 0x2100c13f8
cmp word [rdx], 0
lea rdi, [rsp + 0x60]
lea rbp, str.TERM_236s
jne 0x2100c0fa7
jmp 0x2100c14b7
mov rcx, rsi
call sym.msys_2.0.dll_wcslen
lea rsi, [rsi + rax*2 + 2]
cmp word [rsi], 0
je 0x2100c14b7
mov r8, rdi
mov rdx, rbp
mov rcx, rsi
call sym.swscanf_1
cmp eax, 1
jne 0x2100c0f90
mov r9, rdi
movsx r8d, byte [r9]
lea rdi, [rsp + 0x170]
lea rdx, str._usr_share_terminfo__02x__s
mov rcx, rdi
lea r14, [rsp + 0x280]
lea r15, [rsp + 0x3d0]
call sym.__small_sprintf
xor r9d, r9d
mov rdx, rdi
mov rcx, r14
mov r8d, 0x21
mov dword [rsp + 0x280], 0xffffffff
mov qword [rsp + 0x288], 0
mov qword [rsp + 0x290], 0
mov dword [rsp + 0x298], 0
mov dword [rsp + 0x29c], 0
mov byte [rsp + 0x2a0], 0
mov qword [rsp + 0x2f0], 0
mov qword [rsp + 0x310], 0
mov qword [rsp + 0x318], 0
mov qword [rsp + 0x320], 0
mov qword [rsp + 0x328], 0
mov qword [rsp + 0x330], 0
mov dword [rsp + 0x3a0], 0
mov qword [rsp + 0x3a8], 0
mov qword [rsp + 0x3b0], 0
mov qword [rsp + 0x3b8], 0
mov qword [rsp + 0x3c0], 0
mov qword [rsp + 0x3c8], 0
call method.path_conv.check_char_const__unsigned_int__suffix_info_const_
mov rdx, r15
mov rcx, r14
call method.path_conv.get_wide_win32_path_wchar_t_
xor r9d, r9d
mov edx, 0x80000000
mov rcx, r15
mov qword [rsp + 0x30], 0
mov r8d, 1
mov dword [rsp + 0x28], 0
mov dword [rsp + 0x20], 3
call sym.CreateFileW
mov r12, rax
test rax, rax
je 0x2100c13c8
lea rsi, [rsp + 0x5e0]
lea r9, [rsp + 0x5c]
mov r8d, 0x1000
mov rcx, rax
mov qword [rsp + 0x20], 0
mov rdx, rsi
mov qword [rsp + 0x40], rsi
call sym.ReadFile
mov rcx, r12
call sym.CloseHandle
xor edx, edx
movsx r8, word [rsp + 0x5e8]
cmp word [rsp + 0x5e0], 0x21e
sete dl
movsx ecx, word [rsp + 0x5e4]
movsx r10d, word [rsp + 0x5e2]
movsx eax, word [rsp + 0x5e6]
lea edx, [rdx + rdx + 2]
movsx r9, word [rsp + 0x5ea]
cmp r8w, 0xc
jle 0x2100c13c8
imul eax, edx
lea ecx, [r10 + rcx + 0xc]
mov r10d, dword [rsp + 0x5c]
add eax, ecx
and ecx, 1
cmp ecx, 1
sbb eax, 0xffffffff
add r10, rsi
cdqe
add rax, rsi
lea rdx, [rax + 0x18]
cmp r10, rdx
jbe 0x2100c13c8
movsx rdx, word [rax + 0x18]
cmp dx, 0xffff
je 0x2100c13c8
lea rax, [rax + r8*2]
lea rcx, [rax + rdx]
add rax, r9
cmp rcx, rax
jae 0x2100c13c8
cmp r10, rcx
jbe 0x2100c13c8
lea rdx, [0x210295441]
call sym.msys_2.0.dll_strcmp
mov esi, eax
test eax, eax
jne 0x2100c13c8
mov rcx, r14
call method.path_conv.path_conv__
mov rcx, qword [rbx + 0x1f0]
mov edx, 0xffffffff
call sym.WaitForSingleObject
mov edx, dword [0x21024fa70]
mov rcx, qword [rbx + 0x1e8]
call sym.WaitForSingleObject
mov rax, qword [rbx + 0x1d8]
mov r9d, 0x101
lea rdx, [method.fhandler_termios.get_output_handle__]
mov word [rax + 0xc8], r9w
mov rax, qword [rbx]
mov rax, qword [rax + 0x290]
cmp rax, rdx
jne 0x2100c14f0
lea rax, [rbx + 0x1d0]
mov r9, rdi
mov r8d, 4
mov qword [rsp + 0x20], 0
mov rcx, qword [rax]
lea rdx, str.e_6n
mov r12d, 0x3ff
lea rbp, [method.fhandler_pty_slave.get_handle_nat__]
call sym.WriteFile
mov rcx, qword [rbx + 0x1e8]
call sym.ReleaseMutex
lea rax, [rsp + 0x60]
mov r13, qword [rsp + 0x40]
mov qword [rsp + 0x48], rax
nop dword [rax + rax]
mov rax, qword [rbx]
mov rax, qword [rax + 0x288]
cmp rax, rbp
jne 0x2100c1418
mov rdx, qword [rbx + 0x210]
mov rcx, rdi
call sym.bytes_available_unsigned_int__void_
test al, al
je 0x2100c1430
mov r8d, dword [rsp + 0x170]
test r8d, r8d
je 0x2100c1430
mov rax, qword [rbx]
mov rax, qword [rax + 0x288]
cmp rax, rbp
jne 0x2100c14d0
mov rcx, qword [rbx + 0x210]
mov r9, rdi
mov r8d, r12d
mov rdx, r13
mov qword [rsp + 0x20], 0
call sym.ReadFile
mov eax, dword [rsp + 0x170]
mov edx, 0x1b
sub r12d, dword [rsp + 0x170]
add r13, rax
mov byte [r13], 0
mov rcx, qword [rsp + 0x40]
call sym.msys_2.0.dll_strrchr
mov rcx, rax
test rax, rax
je 0x2100c1450
mov rax, qword [rsp + 0x48]
mov r9, r14
mov r8, r15
lea rdx, str.e__d__d_c
mov qword [rsp + 0x20], rax
call sym.sscanf_1
cmp eax, 3
jne 0x2100c1450
cmp byte [rsp + 0x60], 0x52
jne 0x2100c1450
mov rax, qword [rbx + 0x1d8]
mov rcx, qword [rbx + 0x1f0]
mov byte [rax + 0xc8], 0
mov dword [rax + 0xd4], 0
call sym.ReleaseMutex
test r12d, r12d
je 0x2100c147d
mov rax, qword [rbx + 0x1d8]
mov ecx, 0x101
mov word [rax + 0x110], cx
mov eax, 1
jmp 0x2100c13e0
mov rcx, r14
call method.path_conv.path_conv__
mov rax, qword [rbx + 0x1d8]
mov byte [rax + 0x110], 1
xor eax, eax
add rsp, 0x15e8
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
lea rcx, [0x210295420]
call sym.msys_2.0.dll_getenv
mov r9, rax
test rax, rax
jne 0x2100c0fbd
jmp 0x2100c14b7
mov rcx, rbx
call rax
mov rcx, rdi
mov rdx, qword [rax]
call sym.bytes_available_unsigned_int__void_
test al, al
jne 0x2100c12da
add esi, 1
cmp esi, 0x64
jg 0x2100c147d
mov ecx, 1
call sym.Sleep
jmp 0x2100c12b0
test r12d, r12d
jne 0x2100c12b0
mov rax, qword [rbx + 0x1d8]
mov rcx, qword [rbx + 0x1f0]
mov byte [rax + 0xc8], 0
mov dword [rax + 0xd4], 0
call sym.ReleaseMutex
mov rcx, qword [rbx + 0x1e8]
mov edx, dword [0x21024fa70]
call sym.WaitForSingleObject
mov rax, qword [rbx + 0x1d8]
xor edx, edx
mov rcx, qword [rbx + 0x1e8]
mov word [rax + 0xc8], dx
call sym.ReleaseMutex
mov rcx, qword [rbx + 0x1f0]
call sym.ReleaseMutex
mov rax, qword [rbx + 0x1d8]
mov byte [rax + 0x110], 1
xor eax, eax
jmp 0x2100c13e0
mov rcx, rbx
call rax
mov r9, rdi
mov r8d, r12d
mov rdx, r13
mov qword [rsp + 0x20], 0
mov rcx, qword [rax]
jmp 0x2100c1317
mov rcx, rbx
call rax
jmp 0x2100c125f