Function at 0x1004a9500
Capabilities:
Get file attributes
Write file on windows

Disassembly:
push rbp
push r14
push r13
push r12
push rdi
push rsi
push rbx
sub rsp, 0x130
lea rbp, [rsp + 0x80]
mov rbx, qword [sym.bash.exe_rl_filename_stat_hook]
cmp qword [rbx], 0
mov qword [rbp - 0x58], 0
mov r13, rcx
je 0x1004a9558
call sub.msys_2.0.dll_strlen
lea rcx, [rax + 1]
call sym.bash.exe_xmalloc
mov rdx, r13
mov rcx, rax
call fcn.1004d3420
lea rcx, [rbp - 0x58]
mov qword [rbp - 0x58], rax
call qword [rbx]
mov r13, qword [rbp - 0x58]
lea rdx, [rbp - 0x50]
mov rcx, r13
call sub.msys_2.0.dll_lstat
test eax, eax
je 0x1004a9620
mov r12, qword [sym.bash.exe__rl_color_indicator]
mov r14, qword [rbp - 0x58]
cmp qword [r12 + 0xc8], 0
je 0x1004a96e0
mov rcx, r14
mov ebx, 0xc0
call fcn.1004d2c80
add rbx, r12
cmp qword [rbx + 8], 0
mov eax, 1
je 0x1004a960b
mov ecx, 4
call fcn.1004a9310
mov r12, qword [sym.bash.exe__rl_color_indicator]
mov r13, qword [sym.bash.exe_rl_outstream]
mov rdx, qword [r12]
mov r9, qword [r13]
mov rcx, qword [r12 + 8]
test al, al
jne 0x1004a96a8
mov r8d, 1
call sub.msys_2.0.dll_fwrite
mov rcx, qword [rbx + 8]
mov r9, qword [r13]
mov r8d, 1
mov rdx, qword [rbx]
call sub.msys_2.0.dll_fwrite
mov rdx, qword [r12 + 0x10]
mov rcx, qword [r12 + 0x18]
mov r8d, 1
mov r9, qword [r13]
call sub.msys_2.0.dll_fwrite
xor eax, eax
add rsp, 0x130
pop rbx
pop rsi
pop rdi
pop r12
pop r13
pop r14
pop rbp
ret
mov r9d, dword [rbp - 0x40]
mov r14, qword [rbp - 0x58]
mov eax, r9d
and eax, 0xf000
cmp eax, 0xa000
je 0x1004a97e0
cmp eax, 0x8000
je 0x1004a9748
cmp eax, 0x4000
je 0x1004a98c0
cmp eax, 0xa000
je 0x1004a9a18
mov rcx, r14
cmp eax, 0x1000
je 0x1004a98a8
cmp eax, 0xc000
je 0x1004a99c0
cmp eax, 0x6000
je 0x1004a99d6
cmp eax, 0x2000
je 0x1004a9a02
call fcn.1004d2c80
mov ebx, 0xd0
mov r12, qword [sym.bash.exe__rl_color_indicator]
jmp 0x1004a9593
mov r8d, 1
call sub.msys_2.0.dll_fwrite
mov rdx, qword [r12 + 0x10]
mov rcx, qword [r12 + 0x18]
mov r8d, 1
mov r9, qword [r13]
call sub.msys_2.0.dll_fwrite
mov r9, qword [r13]
mov rdx, qword [r12]
mov rcx, qword [r12 + 8]
jmp 0x1004a95cf
mov rcx, r13
call sub.msys_2.0.dll_strlen
mov rbx, qword [sym.bash.exe__rl_color_ext_list]
mov r12, rax
test rbx, rbx
je 0x1004a972b
nop word [rax + rax]
mov r8, qword [rbx]
cmp r8, r12
ja 0x1004a9722
mov rcx, r12
mov rdx, qword [rbx + 8]
sub rcx, r8
add rcx, r13
call sub.msys_2.0.dll_strncmp
test eax, eax
je 0x1004a97c8
mov rbx, qword [rbx + 0x20]
test rbx, rbx
jne 0x1004a9700
mov rcx, r14
mov ebx, 0x50
call fcn.1004d2c80
mov r12, qword [sym.bash.exe__rl_color_indicator]
jmp 0x1004a9593
test r9d, 0x800
je 0x1004a9780
mov ecx, 0x10
call fcn.1004a9310
test al, al
je 0x1004a9780
mov rcx, r14
mov ebx, 0x100
call fcn.1004d2c80
mov r12, qword [sym.bash.exe__rl_color_indicator]
jmp 0x1004a9593
test r9d, 0x400
jne 0x1004a9860
and r9d, 0x49
je 0x1004a9900
mov ecx, 0xe
call fcn.1004a9310
test al, al
je 0x1004a9900
mov rcx, r14
mov ebx, 0xe0
call fcn.1004d2c80
mov r12, qword [sym.bash.exe__rl_color_indicator]
jmp 0x1004a9593
mov rcx, r14
add rbx, 0x10
call fcn.1004d2c80
jmp 0x1004a9596
lea rdx, [rbp + 0x30]
mov rcx, r13
call sub.msys_2.0.dll_stat
test eax, eax
jne 0x1004a9838
mov r12, qword [sym.bash.exe__rl_color_indicator]
mov ecx, 6
lea rdi, str.target
mov rsi, qword [r12 + 0x78]
repe cmpsb byte [rsi], byte [rdi]
seta al
sbb al, 0
test al, al
je 0x1004a9890
mov r14, qword [rbp - 0x58]
nop word [rax + rax]
mov rcx, r14
mov ebx, 0x70
call fcn.1004d2c80
jmp 0x1004a9593
mov r12, qword [sym.bash.exe__rl_color_indicator]
mov r14, qword [rbp - 0x58]
cmp qword [r12 + 0xd8], 0
je 0x1004a9820
mov rcx, r14
mov ebx, 0xd0
call fcn.1004d2c80
jmp 0x1004a9593
mov ecx, 0x11
call fcn.1004a9310
test al, al
je 0x1004a978d
mov rcx, r14
mov ebx, 0x110
call fcn.1004d2c80
mov r12, qword [sym.bash.exe__rl_color_indicator]
jmp 0x1004a9593
mov r9d, dword [rbp + 0x40]
mov r14, qword [rbp - 0x58]
mov eax, r9d
and eax, 0xf000
jmp 0x1004a963b
call fcn.1004d2c80
mov ebx, pe_nt_image_headers64
mov r12, qword [sym.bash.exe__rl_color_indicator]
jmp 0x1004a9593
mov eax, r9d
and eax, 0x202
cmp eax, 0x202
je 0x1004a9968
test r9b, 2
je 0x1004a9940
mov ecx, 0x13
call fcn.1004a9310
test al, al
je 0x1004a9940
mov rcx, r14
mov ebx, 0x130
call fcn.1004d2c80
mov r12, qword [sym.bash.exe__rl_color_indicator]
jmp 0x1004a9593
cmp word [rbp - 0x3c], 1
jbe 0x1004a96e0
mov ecx, 0x16
call fcn.1004a9310
test al, al
je 0x1004a96e0
mov rcx, r14
mov ebx, 0x160
call fcn.1004d2c80
mov r12, qword [sym.bash.exe__rl_color_indicator]
jmp 0x1004a9593
and r9d, 0x200
jne 0x1004a9998
mov rcx, r14
mov ebx, 0x60
call fcn.1004d2c80
mov r12, qword [sym.bash.exe__rl_color_indicator]
jmp 0x1004a9593
mov ecx, 0x14
call fcn.1004a9310
test al, al
je 0x1004a98d3
mov rcx, r14
mov ebx, 0x140
call fcn.1004d2c80
mov r12, qword [sym.bash.exe__rl_color_indicator]
jmp 0x1004a9593
mov ecx, 0x12
call fcn.1004a9310
mov rcx, r14
test al, al
je 0x1004a99ec
call fcn.1004d2c80
mov ebx, 0x120
mov r12, qword [sym.bash.exe__rl_color_indicator]
jmp 0x1004a9593
call fcn.1004d2c80
mov ebx, 0x90
mov r12, qword [sym.bash.exe__rl_color_indicator]
jmp 0x1004a9593
call fcn.1004d2c80
mov ebx, 0xa0
mov r12, qword [sym.bash.exe__rl_color_indicator]
jmp 0x1004a9593
call fcn.1004d2c80
mov ebx, 0x60
mov r12, qword [sym.bash.exe__rl_color_indicator]
jmp 0x1004a9593
call fcn.1004d2c80
mov ebx, 0xb0
mov r12, qword [sym.bash.exe__rl_color_indicator]
jmp 0x1004a9593
mov r12, qword [sym.bash.exe__rl_color_indicator]
jmp 0x1004a9820