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

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x138
mov rbx, qword [sym.bash.exe_rl_filename_stat_hook]
cmp qword [rbx], 0
mov qword [rsp + 0x28], 0
mov rsi, rcx
je 0x1004b9d1e
call sub.msys_2.0.dll_strlen
lea rcx, [rax + 1]
call sym.bash.exe_xmalloc
mov rdx, rsi
mov rcx, rax
call fcn.100514770
lea rcx, [rsp + 0x28]
mov qword [rsp + 0x28], rax
call qword [rbx]
mov rsi, qword [rsp + 0x28]
lea rdx, [rsp + 0x30]
mov rcx, rsi
call sub.msys_2.0.dll_lstat
test eax, eax
je 0x1004b9de0
mov rdi, qword [sym.bash.exe__rl_color_indicator]
mov rbp, qword [rsp + 0x28]
cmp qword [rdi + 0xc8], 0
je 0x1004b9ea0
mov rcx, rbp
mov ebx, 0xc0
call sub.msys_2.0.dll_free
add rbx, rdi
cmp qword [rbx + 8], 0
mov eax, 1
je 0x1004b9dcb
mov ecx, 4
call fcn.1004b9aa0
test al, al
jne 0x1004b9e58
mov rdi, qword [sym.bash.exe__rl_color_indicator]
mov rsi, qword [sym.bash.exe_rl_outstream]
mov rdx, qword [rdi]
mov rcx, qword [rdi + 8]
mov r8d, 1
mov r9, qword [rsi]
call sub.msys_2.0.dll_fwrite
mov rdx, qword [rbx]
mov rcx, qword [rbx + 8]
mov r8d, 1
mov r9, qword [rsi]
call sub.msys_2.0.dll_fwrite
mov rdx, qword [rdi + 0x10]
mov rcx, qword [rdi + 0x18]
mov r8d, 1
mov r9, qword [rsi]
call sub.msys_2.0.dll_fwrite
xor eax, eax
add rsp, 0x138
pop rbx
pop rsi
pop rdi
pop rbp
ret
mov r8d, dword [rsp + 0x40]
mov eax, r8d
and eax, 0xf000
cmp eax, 0xa000
je 0x1004b9fa0
mov rbp, qword [rsp + 0x28]
cmp eax, 0x8000
je 0x1004b9f08
mov rdi, qword [sym.bash.exe__rl_color_indicator]
cmp eax, 0x4000
je 0x1004ba0a0
mov rcx, rbp
cmp eax, 0x1000
je 0x1004ba090
cmp eax, 0xc000
je 0x1004ba190
cmp eax, 0x6000
je 0x1004ba19f
cmp eax, 0x2000
je 0x1004ba1ae
call sub.msys_2.0.dll_free
jmp 0x1004b9fd2
mov rdi, qword [sym.bash.exe__rl_color_indicator]
mov rsi, qword [sym.bash.exe_rl_outstream]
mov r8d, 1
mov rdx, qword [rdi]
mov rcx, qword [rdi + 8]
mov r9, qword [rsi]
call sub.msys_2.0.dll_fwrite
mov rdx, qword [rdi + 0x10]
mov rcx, qword [rdi + 0x18]
mov r8d, 1
mov r9, qword [rsi]
call sub.msys_2.0.dll_fwrite
jmp 0x1004b9d89
mov rcx, rsi
call sub.msys_2.0.dll_strlen
mov rbx, qword [sym.bash.exe__rl_color_ext_list]
mov rdi, rax
test rbx, rbx
je 0x1004b9eeb
nop word [rax + rax]
mov r8, qword [rbx]
cmp rdi, r8
jb 0x1004b9ee2
mov rcx, rdi
mov rdx, qword [rbx + 8]
sub rcx, r8
add rcx, rsi
call sub.msys_2.0.dll_strncmp
test eax, eax
je 0x1004b9f88
mov rbx, qword [rbx + 0x20]
test rbx, rbx
jne 0x1004b9ec0
mov rcx, rbp
mov ebx, 0x50
call sub.msys_2.0.dll_free
mov rdi, qword [sym.bash.exe__rl_color_indicator]
jmp 0x1004b9d5a
test r8d, 0x800
je 0x1004b9f40
mov ecx, 0x10
call fcn.1004b9aa0
test al, al
je 0x1004b9f40
mov rcx, rbp
mov ebx, 0x100
call sub.msys_2.0.dll_free
mov rdi, qword [sym.bash.exe__rl_color_indicator]
jmp 0x1004b9d5a
test r8d, 0x400
jne 0x1004ba050
and r8d, 0x49
je 0x1004ba0e0
mov ecx, 0xe
call fcn.1004b9aa0
test al, al
je 0x1004ba0e0
mov rcx, rbp
mov ebx, 0xe0
call sub.msys_2.0.dll_free
mov rdi, qword [sym.bash.exe__rl_color_indicator]
jmp 0x1004b9d5a
mov rcx, rbp
add rbx, 0x10
call sub.msys_2.0.dll_free
jmp 0x1004b9d5d
lea rdx, [rsp + 0xb0]
mov rcx, rsi
call sub.msys_2.0.dll_stat
test eax, eax
je 0x1004b9fe0
mov rdi, qword [sym.bash.exe__rl_color_indicator]
mov rbp, qword [rsp + 0x28]
cmp qword [rdi + 0xd8], 0
je 0x1004ba038
mov rcx, rbp
call sub.msys_2.0.dll_free
mov ebx, 0xd0
jmp 0x1004b9d5a
mov rdi, qword [sym.bash.exe__rl_color_indicator]
mov r8d, 6
lea rdx, str.target
mov rcx, qword [rdi + 0x78]
call sub.msys_2.0.dll_strncmp
test eax, eax
jne 0x1004ba080
mov r8d, dword [rsp + 0xc0]
mov rbp, qword [rsp + 0x28]
mov eax, r8d
and eax, 0xf000
cmp eax, 0x8000
je 0x1004b9f08
cmp eax, 0x4000
je 0x1004ba0a0
cmp eax, 0xa000
jne 0x1004b9e1a
nop dword [rax + rax]
mov rcx, rbp
mov ebx, 0x70
call sub.msys_2.0.dll_free
jmp 0x1004b9d5a
mov ecx, 0x11
call fcn.1004b9aa0
test al, al
je 0x1004b9f4d
mov rcx, rbp
mov ebx, 0x110
call sub.msys_2.0.dll_free
mov rdi, qword [sym.bash.exe__rl_color_indicator]
jmp 0x1004b9d5a
mov rbp, qword [rsp + 0x28]
jmp 0x1004ba038
call sub.msys_2.0.dll_free
mov ebx, pe_nt_image_headers64
jmp 0x1004b9d5a
mov eax, r8d
not eax
test eax, 0x202
je 0x1004ba168
test r8b, 2
je 0x1004ba120
mov ecx, 0x13
call fcn.1004b9aa0
test al, al
je 0x1004ba120
mov rcx, rbp
mov ebx, 0x130
call sub.msys_2.0.dll_free
jmp 0x1004b9d5a
cmp word [rsp + 0x44], 1
jbe 0x1004b9ea0
mov ecx, 0x16
call fcn.1004b9aa0
test al, al
je 0x1004b9ea0
mov rcx, rbp
mov ebx, 0x160
call sub.msys_2.0.dll_free
mov rdi, qword [sym.bash.exe__rl_color_indicator]
jmp 0x1004b9d5a
and r8d, 0x200
je 0x1004ba150
mov ecx, 0x12
call fcn.1004b9aa0
test al, al
je 0x1004ba150
mov rcx, rbp
mov ebx, 0x120
call sub.msys_2.0.dll_free
jmp 0x1004b9d5a
mov rcx, rbp
mov ebx, 0x60
call sub.msys_2.0.dll_free
jmp 0x1004b9d5a
mov ecx, 0x14
call fcn.1004b9aa0
test al, al
je 0x1004ba0b0
mov rcx, rbp
mov ebx, 0x140
call sub.msys_2.0.dll_free
jmp 0x1004b9d5a
call sub.msys_2.0.dll_free
mov ebx, 0x90
jmp 0x1004b9d5a
call sub.msys_2.0.dll_free
mov ebx, 0xa0
jmp 0x1004b9d5a
call sub.msys_2.0.dll_free
mov ebx, 0xb0
jmp 0x1004b9d5a