Function at 0x1004de5e0
Capabilities:
Get file attributes

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x58
mov rbp, qword [sym.bash.exe__nc_globals]
cmp qword [rbp + 0x128], 0
mov dword [rcx], 0
mov dword [rdx], 0
je 0x1004de655
call fcn.1004de420
test al, al
jne 0x1004de627
add rsp, 0x58
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov rcx, qword [rbp + 0x128]
call sub.msys_2.0.dll_free
mov rcx, qword [rbp + 0x130]
mov qword [rbp + 0x128], 0
call sub.msys_2.0.dll_free
mov qword [rbp + 0x130], 0
mov rax, qword [rbp + 0x28]
mov edx, 1
lea rdi, [rsp + 0x20]
xor esi, esi
lea rcx, str.TERMINFO
movddup xmm0, qword [0x100546520]
movaps xmmword [rsp + 0x40], xmm0
mov rbx, rdi
mov qword [rsp + 0x20], rax
lea r12, [rsp + 0x50]
lea r13, [0x1005464fd]
call fcn.1004de350
mov rax, qword [rbp + 0x160]
mov qword [rsp + 0x28], rax
call sym.bash.exe__nc_home_terminfo
mov edx, 2
lea rcx, [0x1005464fe]
mov qword [rsp + 0x30], rax
call fcn.1004de350
mov edx, 3
lea rcx, str.TERMINFO_DIRS
call fcn.1004de350
mov rax, qword [rbp + 0x180]
mov qword [rsp + 0x38], rax
nop word cs:[rax + rax]
mov rcx, qword [rbx]
test rcx, rcx
cmove rcx, r13
add rbx, 8
mov qword [rbx - 8], rcx
call sub.msys_2.0.dll_strlen
lea rsi, [rsi + rax + 2]
cmp rbx, r12
jne 0x1004de6e0
mov rcx, rsi
call sub.msys_2.0.dll_malloc
mov qword [rbp + 0x128], rax
mov rsi, rax
test rax, rax
je 0x1004de616
mov byte [rax], 0
nop
mov rbx, qword [rdi]
cmp byte [rbx], 0
je 0x1004de751
mov rcx, rsi
call sub.msys_2.0.dll_strlen
add rax, rsi
cmp rax, rsi
je 0x1004de73f
mov byte [rax], 0x3a
lea rsi, [rax + 1]
mov rcx, rsi
mov rdx, rbx
call fcn.100514770
mov rsi, qword [rbp + 0x128]
add rdi, 8
cmp r12, rdi
jne 0x1004de720
movzx eax, byte [rsi]
test al, al
je 0x1004deb30
lea rdx, [rsi + 1]
mov edi, 2
nop
cmp al, 0x3a
sete al
add rdx, 1
movzx eax, al
add rdi, rax
movzx eax, byte [rdx - 1]
test al, al
jne 0x1004de770
mov edx, 8
mov rcx, rdi
call sub.msys_2.0.dll_calloc
mov edx, pe_nt_image_headers64
mov rcx, rdi
mov qword [rbp + 0x130], rax
mov rbx, rax
call sub.msys_2.0.dll_calloc
mov r13, rax
test rbx, rbx
je 0x1004deb3a
test rax, rax
je 0x1004deb3a
mov qword [rbx], rsi
movzx eax, byte [rsi]
test al, al
je 0x1004de87c
mov edi, 1
mov r15d, 1
jmp 0x1004de7f5
mov rsi, qword [rbp + 0x128]
add rsi, rdi
add rdi, 1
movzx eax, byte [rsi]
test al, al
je 0x1004de870
cmp al, 0x3a
jne 0x1004de7e0
movsxd r14, r15d
mov rax, rsi
mov r12, qword [rbx + r14*8 - 8]
sub rax, r12
cmp rax, 3
je 0x1004de830
mov byte [rsi], 0
mov rax, qword [rbp + 0x128]
add r15d, 1
mov rbx, qword [rbp + 0x130]
add rax, rdi
mov qword [rbx + r14*8], rax
jmp 0x1004de7e0
mov r8d, 4
lea rdx, str.b64:
mov rcx, r12
call sub.msys_2.0.dll_strncmp
test eax, eax
je 0x1004de7e0
mov r8d, 4
lea rdx, str.hex:
mov rcx, r12
call sub.msys_2.0.dll_strncmp
test eax, eax
je 0x1004de7e0
jmp 0x1004de80d
mov rsi, qword [rbx]
test rsi, rsi
je 0x1004deb29
xor r12d, r12d
xor edi, edi
nop dword [rax]
cmp byte [rsi], 0
je 0x1004dea90
mov rax, qword [rbx]
movzx edx, byte [rax]
lea rcx, [rax + 1]
test dl, dl
jne 0x1004de8c3
jmp 0x1004de8eb
lea r8d, [rdx - 9]
cmp r8b, 1
jbe 0x1004de8e0
mov byte [rax], dl
movzx edx, byte [rcx]
add rax, 1
add rcx, 1
test dl, dl
je 0x1004de8eb
cmp dl, 0x5c
jne 0x1004de8a8
cmp byte [rcx], 0xa
jne 0x1004de8b2
mov edx, 0xa
add rcx, 1
lea r8d, [rdx - 9]
cmp r8b, 1
ja 0x1004de8b2
movzx edx, byte [rcx]
add rcx, 1
test dl, dl
jne 0x1004de8c3
mov byte [rax], 0
mov r15, qword [rbp + 0x130]
test r12d, r12d
jle 0x1004deb09
mov rsi, qword [r15 + rdi]
movsxd rdi, r12d
mov r14, r15
shl rdi, 3
lea rbx, [rdi + r15]
jmp 0x1004de925
add r14, 8
cmp rbx, r14
je 0x1004dea70
mov rdx, qword [r14]
mov rcx, rsi
call sub.msys_2.0.dll_strcmp
test eax, eax
jne 0x1004de918
mov rax, qword [r15 + rdi + 8]
mov qword [rbx], rax
test rax, rax
je 0x1004de964
mov rax, rbx
nop dword [rax]
mov rdx, qword [rax + 0x10]
add rax, 8
mov qword [rax], rdx
test rdx, rdx
jne 0x1004de948
mov rsi, qword [rbx]
test rsi, rsi
jne 0x1004de888
mov r12, qword [r15]
test r12, r12
je 0x1004deb29
xor ebx, ebx
xor ecx, ecx
lea rsi, str.b64:
lea rdi, str.hex:
nop word [rax + rax]
shl rcx, 7
mov r8d, 4
mov rdx, rsi
lea r14, [r13 + rcx]
mov rcx, r12
call sub.msys_2.0.dll_strncmp
test eax, eax
je 0x1004de9bf
mov r8d, 4
mov rdx, rdi
mov rcx, r12
call sub.msys_2.0.dll_strncmp
test eax, eax
jne 0x1004deac0
mov r9, qword [rbp + 0x130]
test ebx, ebx
jle 0x1004deab0
movsxd rcx, ebx
mov r8d, dword [r14]
mov rax, r13
mov rdx, rcx
shl rdx, 7
add rdx, r13
jmp 0x1004de9f5
sub rax, 0xffffffffffffff80
cmp rdx, rax
je 0x1004deab0
cmp r8d, dword [rax]
jne 0x1004de9e8
mov r10, qword [rax + 8]
cmp qword [r14 + 8], r10
jne 0x1004de9e8
mov rax, qword [rbp + 0x130]
lea r8, [rax + rcx*8]
mov rax, qword [rax + rcx*8 + 8]
mov qword [r8], rax
test rax, rax
je 0x1004dea3c
mov rax, r8
nop
mov rdx, qword [rax + 0x10]
add rax, 8
mov qword [rax], rdx
test rdx, rdx
jne 0x1004dea20
mov r12, qword [r8]
test r12, r12
jne 0x1004de988
xor ecx, ecx
mov dword [rbp + 0x138], ebx
call sub.msys_2.0.dll_time
mov qword [rbp + 0x140], rax
mov rcx, r13
add rsp, 0x58
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
jmp sub.msys_2.0.dll_free
add rdi, 8
add r12d, 1
lea rbx, [rdi + r15]
mov rsi, qword [rbx]
test rsi, rsi
jne 0x1004de888
jmp 0x1004de964
lea rcx, str._usr_share_terminfo
call sub.msys_2.0.dll_strdup
test rax, rax
je 0x1004de891
mov qword [rbx], rax
jmp 0x1004de894
add ebx, 1
movsxd rcx, ebx
mov r12, qword [r9 + rcx*8]
jmp 0x1004dea33
mov rdx, r14
mov rcx, r12
call sub.msys_2.0.dll_stat
test eax, eax
jne 0x1004deb01
mov eax, dword [r14 + 0x10]
and eax, 0xf000
cmp eax, 0x4000
je 0x1004de9bf
movsxd rcx, ebx
cmp eax, 0x8000
jne 0x1004dea04
cmp qword [r14 + 0x28], 0
je 0x1004dea04
jmp 0x1004de9bf
movsxd rcx, ebx
jmp 0x1004dea04
add r12d, 1
movsxd rdi, r12d
shl rdi, 3
lea rbx, [rdi + r15]
mov rsi, qword [rbx]
test rsi, rsi
jne 0x1004de888
jmp 0x1004de964
xor ebx, ebx
jmp 0x1004dea3c
mov edi, 2
jmp 0x1004de787
mov rcx, rsi
call sub.msys_2.0.dll_free
xor eax, eax
mov qword [rbp + 0x128], rax
jmp 0x1004dea50