Function at 0x100489000
Capabilities:
Write file on windows

Disassembly:
push rbp
push r15
push r14
push r13
push r12
push rdi
push rsi
push rbx
sub rsp, 0x48
lea rbp, [rsp + 0x80]
mov rdi, rcx
mov ebx, edx
mov qword [rbp + 0x20], r8
call sub.msys_2.0.dll_strlen
mov qword [rbp - 0x48], 0
mov r12d, dword [sym.bash.exe__rl_colored_stats]
movsxd rdx, eax
lea rsi, [rdi + rdx + 1]
mov edx, dword [sym.bash.exe__rl_completion_prefix_display_length]
mov qword [rbp - 0x58], rsi
cmp ebx, eax
jl 0x100489053
test edx, edx
jg 0x100489230
test r12d, r12d
je 0x100489088
test ebx, ebx
je 0x100489239
mov ecx, dword [sym.bash.exe__rl_colored_completion_prefix]
test ecx, ecx
jle 0x1004893c0
test edx, edx
jg 0x100489098
call sym.bash.exe__rl_set_normal_color
mov r15, rdi
xor r12d, r12d
call sym.bash.exe__rl_print_prefix_color
jmp 0x1004890e2
test ebx, ebx
je 0x1004893d9
test edx, edx
jle 0x100489254
movsxd r10, ebx
mov ecx, 0x2e
mov r12d, 0x5f
mov rbx, qword [sym.bash.exe_rl_outstream]
lea r15, [rdi + r10]
cmp byte [r15], 0x2e
mov rdx, qword [rbx]
cmovne r12d, ecx
mov ecx, r12d
call sub.msys_2.0.dll_putc
mov rdx, qword [rbx]
mov ecx, r12d
call sub.msys_2.0.dll_putc
mov rdx, qword [rbx]
mov ecx, r12d
xor ebx, ebx
mov r12d, 3
call sub.msys_2.0.dll_putc
movzx eax, byte [r15]
test al, al
je 0x100489330
mov rdx, qword [sym.bash.exe__rl_color_indicator]
lea rsi, [rbp - 0x48]
add rdx, 0x170
mov qword [rbp - 0x60], rdx
jmp 0x1004891ca
cmp al, 0x7f
je 0x1004892b0
mov r8, qword [rbp - 0x58]
lea rcx, [rbp - 0x4a]
mov r9, rsi
mov rdx, r15
sub r8, r15
call sub.msys_2.0.dll_mbrtowc
mov r14, rax
cmp rax, 0xfffffffffffffffd
ja 0x100489370
test rax, rax
je 0x100489330
movzx ecx, word [rbp - 0x4a]
cmp cx, 0x5f
ja 0x100489290
cmp cx, 0x40
ja 0x100489285
cmp cx, 0x23
ja 0x100489278
mov r13d, 1
cmp cx, 0x1f
ja 0x100489188
call sub.msys_2.0.dll_wcwidth
mov r13d, eax
test eax, eax
mov eax, 1
cmovs r13d, eax
nop dword [rax]
mov rax, qword [sym.bash.exe_rl_outstream]
mov rcx, r15
mov r8, r14
add r15, r14
mov edx, 1
add r12d, r13d
mov r9, qword [rax]
call sub.msys_2.0.dll_fwrite
test ebx, ebx
jle 0x1004891be
mov rdx, r15
movsxd rax, ebx
sub rdx, rdi
cmp rdx, rax
jge 0x1004892f0
movzx eax, byte [r15]
test al, al
je 0x100489330
cmp al, 0x1f
ja 0x100489110
mov r13, qword [sym.bash.exe_rl_outstream]
mov ecx, 0x5e
mov rdx, qword [r13]
call sub.msys_2.0.dll_putc
mov r14, qword [r13]
call sub.msys_2.0.dll___locale_ctype_ptr
movzx r13d, byte [r15]
or r13d, 0x40
movzx ecx, r13b
movzx eax, byte [rcx + rax + 1]
movsx ecx, r13b
and eax, 3
cmp al, 2
je 0x100489390
mov rdx, r14
add r12d, 2
add r15, 1
call sub.msys_2.0.dll_putc
mov qword [rsi], 0
jmp 0x1004891a8
test r12d, r12d
je 0x1004893a8
call sym.bash.exe__rl_set_normal_color
mov rcx, qword [rbp + 0x20]
mov r15, rdi
xor ebx, ebx
xor r12d, r12d
call sym.bash.exe__rl_print_color_indicator
jmp 0x1004890e2
mov edx, dword [sym.bash.exe__rl_colored_completion_prefix]
test edx, edx
jg 0x100489072
movsxd r10, ebx
xor r12d, r12d
xor ebx, ebx
lea r15, [rdi + r10]
jmp 0x1004890e2
lea eax, [rcx - 0x25]
cmp ax, 0x1a
ja 0x100489172
mov r13d, 1
jmp 0x100489188
lea eax, [rcx - 0x61]
mov r13d, 1
cmp ax, 0x1d
jbe 0x100489188
jmp 0x100489172
mov r13, qword [sym.bash.exe_rl_outstream]
mov ecx, 0x5e
add r12d, 2
add r15, 1
mov rdx, qword [r13]
call sub.msys_2.0.dll_putc
mov rdx, qword [r13]
mov ecx, 0x3f
call sub.msys_2.0.dll_putc
mov qword [rsi], 0
jmp 0x1004891a8
call sym.bash.exe__rl_prep_non_filename_text
mov rcx, qword [rbp - 0x60]
call sym.bash.exe__rl_put_indicator
mov ebx, dword [sym.bash.exe__rl_colored_stats]
test ebx, ebx
je 0x1004891be
call sym.bash.exe__rl_set_normal_color
mov rcx, qword [rbp + 0x20]
xor ebx, ebx
call sym.bash.exe__rl_print_color_indicator
movzx eax, byte [r15]
test al, al
jne 0x1004891ca
nop dword [rax + rax]
mov eax, dword [sym.bash.exe__rl_colored_stats]
test eax, eax
je 0x100489352
call sym.bash.exe__rl_prep_non_filename_text
mov rax, qword [sym.bash.exe__rl_color_indicator]
lea rcx, [rax + 0x170]
call sym.bash.exe__rl_put_indicator
mov eax, r12d
add rsp, 0x48
pop rbx
pop rsi
pop rdi
pop r12
pop r13
pop r14
pop r15
pop rbp
ret
mov qword [rsi], 0
mov r13d, 1
mov r14d, 1
jmp 0x100489188
call sub.msys_2.0.dll___locale_ctype_ptr
movzx ecx, r13b
call fcn.1004d35f0
mov ecx, eax
jmp 0x100489210
movzx eax, byte [rdi]
mov r15, rdi
xor ebx, ebx
test al, al
jne 0x1004890ee
jmp 0x100489352
call sym.bash.exe__rl_set_normal_color
mov rcx, qword [rbp + 0x20]
call sym.bash.exe__rl_print_color_indicator
mov edx, dword [sym.bash.exe__rl_completion_prefix_display_length]
jmp 0x100489090
movzx eax, byte [rdi]
mov r15, rdi
test al, al
jne 0x1004890ee
jmp 0x100489352