Function at 0x1004aecc0
Capabilities:
Write file on windows

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rbx
sub rsp, 0x28
mov rax, qword [sym.bash.exe_cur_term]
mov r12, qword [rax]
mov r14d, edx
mov rbx, r8
mov esi, r9d
test rcx, rcx
je 0x1004aeeb0
call sub.msys_2.0.dll_strdup
mov rcx, rax
mov r13, rax
call sub.msys_2.0.dll_strlen
cmp rax, 0x200
ja 0x1004aee80
cmp r14d, 1
je 0x1004af090
test esi, esi
je 0x1004aed28
test r12, r12
je 0x1004aed28
movsx eax, word [r12 + 0x48]
cmp eax, r14d
je 0x1004aef60
mov edx, 0xf8
mov ecx, 1
call sub.msys_2.0.dll_calloc
mov r12, rax
test rax, rax
je 0x1004af148
mov ecx, 0x44
call sub.msys_2.0.dll_sysconf
mov r8, rax
mov eax, 0x800
cmp r8, 0x800
jg 0x1004af020
mov rdx, qword [sym.bash.exe__nc_globals]
cmp dword [rdx + 0x58], eax
jl 0x1004aeef0
lea r15, [r12 + 0xb0]
mov rcx, r13
mov rdx, r15
call sym.bash.exe__nc_setup_tinfo
mov esi, eax
cmp eax, 1
jne 0x1004aefc0
mov rdx, r15
mov rcx, r12
call sym.bash.exe__nc_export_termtype2
mov rdx, qword [r12 + 0xb0]
test rdx, rdx
je 0x1004aedc1
mov r8d, 0xff
lea rcx, [sym.bash.exe_ttytype]
call sub.msys_2.0.dll_strncpy
mov byte [0x1006039ff], 0
mov word [r12 + 0x48], r14w
mov rcx, r13
call sub.msys_2.0.dll_strdup
mov rcx, r12
mov qword [r12 + 0xa8], rax
call sym.bash.exe_set_curterm
mov rax, qword [r12 + 0xd0]
mov rax, qword [rax + 0x48]
test rax, rax
je 0x1004aedfb
movzx edx, byte [rax]
mov rcx, r12
call sym.bash.exe__nc_tinfo_cmdch
mov ecx, r14d
call sub.msys_2.0.dll_isatty
test eax, eax
jne 0x1004aefa8
mov rax, qword [sym.bash.exe_SP]
lea r8, [sym.bash.exe_COLS]
lea rdx, [sym.bash.exe_LINES]
mov rcx, qword [rax]
call sym.bash.exe__nc_get_screensize
test rbx, rbx
je 0x1004aee33
mov dword [rbx], 1
mov rax, qword [r12 + 0xc0]
cmp byte [rax + 6], 0
jne 0x1004aef00
cmp byte [rax + 7], 0
je 0x1004af0c8
test rbx, rbx
je 0x1004af1bd
mov dword [rbx], 1
mov rcx, r13
call fcn.1004d2c80
mov eax, 0xffffffff
add rsp, 0x28
pop rbx
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
test rbx, rbx
je 0x1004af11b
mov dword [rbx], 0xffffffff
mov rcx, r13
call fcn.1004d2c80
mov eax, 0xffffffff
add rsp, 0x28
pop rbx
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
lea rcx, str.TERM
call sym.bash.exe_getenv
mov rcx, rax
test rax, rax
je 0x1004aeecd
cmp byte [rax], 0
jne 0x1004aecea
test rbx, rbx
je 0x1004af169
mov eax, 0xffffffff
mov dword [rbx], 0xffffffff
add rsp, 0x28
pop rbx
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
mov dword [rdx + 0x58], eax
jmp 0x1004aed72
mov rdx, qword [r12 + 0xd0]
mov rax, qword [rdx + 0x50]
sub rax, 1
cmp rax, 0xfffffffffffffffd
jbe 0x1004af042
mov rax, qword [rdx + 0x58]
sub rax, 1
cmp rax, 0xfffffffffffffffd
jbe 0x1004af030
mov rcx, r12
call sym.bash.exe_del_curterm
test rbx, rbx
je 0x1004af1d5
mov dword [rbx], 0
mov rcx, r13
call fcn.1004d2c80
mov eax, 0xffffffff
add rsp, 0x28
pop rbx
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
mov rcx, qword [r12 + 0xa8]
test rcx, rcx
je 0x1004aed28
mov rdx, r13
call sub.msys_2.0.dll_strcmp
test eax, eax
jne 0x1004aed28
mov rcx, qword [r12 + 0xb0]
lea r8, [0x1004fc844]
mov rdx, r13
call sym.bash.exe__nc_name_match
test eax, eax
jne 0x1004aee0b
jmp 0x1004aed28
xor ecx, ecx
call sym.bash.exe_def_shell_mode_sp
xor ecx, ecx
call sym.bash.exe_def_prog_mode_sp
call sym.bash.exe_baudrate
jmp 0x1004aee0b
mov rcx, r13
call sym.bash.exe__nc_fallback2
mov rdx, rax
test rax, rax
je 0x1004aefe0
mov rcx, r15
call sym.bash.exe__nc_copy_termtype2
jmp 0x1004aed90
mov rcx, r12
call sym.bash.exe_del_curterm
cmp esi, 0xffffffff
je 0x1004af0e0
test esi, esi
jne 0x1004af0b0
test rbx, rbx
jne 0x1004aef3d
call sub.msys_2.0.dll___getreent
mov r8, r13
lea rdx, str._s:_unknown_terminal_type._n
mov rcx, qword [rax + 0x18]
jmp 0x1004af070
mov ecx, 0x44
call sub.msys_2.0.dll_sysconf
jmp 0x1004aed62
mov rax, qword [rdx + 0x60]
sub rax, 1
cmp rax, 0xfffffffffffffffd
ja 0x1004aef2c
mov rax, qword [rdx + 0x28]
sub rax, 1
cmp rax, 0xfffffffffffffffd
ja 0x1004aef2c
test rbx, rbx
jne 0x1004aee58
call sub.msys_2.0.dll___getreent
mov r8, r13
lea rdx, str._s:_terminal_is_not_really_generic._n
mov rcx, qword [rax + 0x18]
call sub.msys_2.0.dll_fprintf
mov rcx, r13
call fcn.1004d2c80
mov ecx, 1
call sym.bash.exe_exit_terminfo
nop word [rax + rax]
mov ecx, 1
call sub.msys_2.0.dll_isatty
test eax, eax
mov eax, 2
cmove r14d, eax
jmp 0x1004aed10
test rbx, rbx
je 0x1004af193
mov dword [rbx], esi
mov eax, 0xffffffff
jmp 0x1004aee9c
mov rcx, r13
call fcn.1004d2c80
xor eax, eax
jmp 0x1004aee9c
mov rcx, r13
call fcn.1004d2c80
test rbx, rbx
jne 0x1004aeed6
call sub.msys_2.0.dll___getreent
mov r8d, 0x23
mov edx, 1
lea rcx, str.terminals_database_is_inaccessible_n
mov r9, qword [rax + 0x18]
call sub.msys_2.0.dll_fwrite
mov ecx, 1
call sym.bash.exe_exit_terminfo
call sub.msys_2.0.dll___getreent
mov r8d, 0x200
lea rdx, str.TERM_environment_must_be____d_characters._n
mov rcx, qword [rax + 0x18]
call sub.msys_2.0.dll_fprintf
mov rcx, r13
call fcn.1004d2c80
mov ecx, 1
call sym.bash.exe_exit_terminfo
test rbx, rbx
jne 0x1004aee89
call sub.msys_2.0.dll___getreent
mov r8, r13
lea rdx, str._s:_Not_enough_memory_to_create_terminal_structure._n
mov rcx, qword [rax + 0x18]
jmp 0x1004af070
call sub.msys_2.0.dll___getreent
mov r8d, 0x23
mov edx, 1
lea rcx, str.TERM_environment_variable_not_set._n
mov r9, qword [rax + 0x18]
call sub.msys_2.0.dll_fwrite
mov ecx, 1
call sym.bash.exe_exit_terminfo
call sub.msys_2.0.dll___getreent
mov r8d, 0x17
mov edx, 1
lea rcx, str.unexpected_return_code_n
mov r9, qword [rax + 0x18]
call sub.msys_2.0.dll_fwrite
mov ecx, 1
call sym.bash.exe_exit_terminfo
call sub.msys_2.0.dll___getreent
mov r8, r13
lea rdx, str._s:_I_cant_handle_hardcopy_terminals._n
mov rcx, qword [rax + 0x18]
jmp 0x1004af070
call sub.msys_2.0.dll___getreent
mov r8, r13
lea rdx, str._s:_I_need_something_more_specific._n
mov rcx, qword [rax + 0x18]
jmp 0x1004af070