Function at 0x100404310
Capabilities:
Get file attributes

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0xe8
mov rbx, rdx
mov edx, 0x2f
mov rdi, rcx
mov esi, r8d
mov qword [rsp + 0x148], r9
call sub.cygwin1.dll_strchr
test rax, rax
je 0x100404390
and esi, 2
mov dword [rbx + 8], 0xffffffff
jne 0x100404370
mov dword [rbx], 0
add rsp, 0xe8
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
lea rdx, [rsp + 0x60]
mov rcx, rdi
call sub.cygwin1.dll_stat
test eax, eax
jns 0x10040434f
mov dword [rbx], 0xffffffff
jmp 0x100404355
mov rax, qword [0x100417150]
mov rcx, qword [rsp + 0x148]
xor r12d, r12d
mov rax, qword [rax + 0x70]
add rax, 5
cmp rax, rcx
sete r12b
je 0x1004043cd
lea rdx, str._builtin
call sub.cygwin1.dll_strstr
mov edx, esi
or esi, 0x28
or edx, 8
test rax, rax
cmove esi, edx
xor edx, edx
mov rcx, rdi
call fcn.100403e70
test rax, rax
mov r15, rax
je 0x100404563
movsx eax, word [rax + 0x10]
mov edx, 4
cmp ax, 1
je 0x100404403
cmp ax, 2
mov ecx, 8
mov edx, 0x20
cmovne edx, ecx
test esi, edx
jne 0x100404560
cmp byte [r15 + 0x12], 0
je 0x100404548
mov rax, qword [0x100417030]
mov rdx, qword [0x100416dc0]
lea rcx, [rsp + 0x58]
mov r9d, 0x18
mov r8d, 0x27
mov qword [rsp + 0x58], rdi
mov qword [rsp + 0x20], rax
call sub.cygwin1.dll_bsearch
test rax, rax
mov rbp, rax
jne 0x1004045a0
cmp byte [r15 + 0x12], 0
mov dword [rsp + 0x3c], 0xffffffff
je 0x100404473
cmp word [r15 + 0x10], 2
je 0x100404672
mov eax, dword [r15 + 8]
mov dword [rsp + 0x3c], eax
lea rax, [rsp + 0x148]
mov dword [rsp + 0x48], 2
mov r14d, 0xffffffff
mov qword [rsp + 0x30], rax
mov eax, esi
and eax, 4
mov dword [rsp + 0x4c], eax
lea rax, [rsp + 0x60]
mov qword [rsp + 0x40], rax
mov rcx, qword [rsp + 0x30]
mov rdx, rdi
call fcn.100404070
test rax, rax
mov r13, rax
je 0x100404707
mov rcx, r13
add r14d, 1
call fcn.100409bd0
mov rcx, qword [0x10041b940]
test rcx, rcx
je 0x100404610
lea rdx, str.builtin
call fcn.10040a880
test rax, rax
je 0x1004045e0
test rbp, rbp
je 0x1004044a1
test r12d, r12d
jne 0x100404504
mov dword [rbx], 2
mov qword [rbx + 8], rbp
jmp 0x100404355
mov rsi, qword [0x100417120]
add dword [rsi], 1
mov edx, 1
mov rcx, rdi
call fcn.100403e70
mov r15, rax
mov eax, 2
mov word [r15 + 0x10], ax
mov qword [r15 + 8], rbp
sub dword [rsi], 1
jne 0x100404543
mov rax, qword [0x100416ee0]
mov eax, dword [rax]
test eax, eax
je 0x100404543
call fcn.1004025f0
movsx eax, word [r15 + 0x10]
mov byte [r15 + 0x12], 0
mov dword [rbx], eax
mov rax, qword [r15 + 8]
mov qword [rbx + 8], rax
jmp 0x100404355
xor r12d, r12d
mov rax, qword [0x100417030]
mov rdx, qword [0x100416dc0]
lea rcx, [rsp + 0x58]
mov r9d, 0x18
mov r8d, 0x27
mov qword [rsp + 0x58], rdi
xor r15d, r15d
mov qword [rsp + 0x20], rax
call sub.cygwin1.dll_bsearch
test rax, rax
mov rbp, rax
je 0x100404662
test byte [rbp + 0x10], 2
jne 0x1004044f0
test sil, 8
jne 0x1004045d4
mov ecx, dword [0x100413030]
test ecx, ecx
jle 0x1004044f0
test r15, r15
jne 0x100404450
mov dword [rsp + 0x3c], 0xffffffff
jmp 0x100404473
test sil, 0x20
je 0x1004044f0
jmp 0x1004045be
mov edx, dword [rsp + 0x4c]
test edx, edx
jne 0x1004044a1
mov rcx, qword [0x10041b940]
lea rdx, str.func
call fcn.10040a880
test rax, rax
je 0x1004044a1
nop dword [rax + rax]
cmp byte [r13], 0x2f
jne 0x100404630
cmp dword [rsp + 0x3c], r14d
jl 0x100404630
cmp dword [rsp + 0x3c], r14d
jg 0x1004044a1
jmp 0x100404543
mov rdx, qword [rsp + 0x40]
mov rcx, r13
call sub.cygwin1.dll_stat
test eax, eax
js 0x1004046db
mov eax, dword [rsp + 0x70]
and eax, 0xf000
cmp eax, 0x8000
je 0x100404681
mov dword [rsp + 0x48], 0xd
jmp 0x1004044a1
mov r15, rax
mov dword [rsp + 0x3c], 0xffffffff
jmp 0x100404473
mov eax, dword [0x100413030]
mov dword [rsp + 0x3c], eax
jmp 0x100404473
cmp qword [0x10041b940], 0
je 0x100404744
mov rcx, r13
call sub.cygwin1.dll_strlen
lea rcx, [rax + 1]
call fcn.100409af0
mov rcx, r13
call fcn.100409930
xor edx, edx
mov rcx, rdi
call fcn.100403e70
test rax, rax
mov r15, rax
je 0x100404781
cmp word [rax + 0x10], 1
jne 0x100404781
mov rcx, r13
call fcn.100409bd0
movsx eax, word [r15 + 0x10]
jmp 0x100404548
call sub.cygwin1.dll___errno
cmp dword [rax], 2
je 0x1004044a1
call sub.cygwin1.dll___errno
cmp dword [rax], 0x14
je 0x1004044a1
call sub.cygwin1.dll___errno
mov eax, dword [rax]
mov dword [rsp + 0x48], eax
jmp 0x1004044a1
test r15, r15
je 0x100404716
test r12d, r12d
je 0x100404716
call fcn.100404000
and esi, 1
je 0x100404381
mov ecx, dword [rsp + 0x48]
mov edx, 4
call fcn.100402700
lea rcx, [0x1004144c8]
mov r8, rax
mov rdx, rdi
call fcn.1004026d0
jmp 0x100404381
test r12d, r12d
jne 0x100404758
mov dword [rbx], 0
mov dword [rbx + 8], r14d
jmp 0x100404355
mov rsi, qword [0x100417120]
add dword [rsi], 1
mov edx, 1
mov rcx, rdi
call fcn.100403e70
mov r15, rax
mov word [rax + 0x10], 0
mov dword [rax + 8], r14d
jmp 0x10040452c
lea rcx, str._s_not_defined_in__s
mov r8, r13
mov rdx, rdi
call fcn.100402660
nop
nop
nop word cs:[rax + rax]
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x38
lea rcx, [0x1004144fc]
call fcn.10040b600
test eax, eax
mov esi, eax
jne 0x100404873
mov rdi, qword [0x100416d40]
mov r12, qword [0x100417150]
lea rbp, [rsp + 0x20]
mov rax, qword [rdi]
mov rbx, qword [rax]
test rbx, rbx
jne 0x100404830
jmp 0x10040487e
cmp ax, 2
je 0x10040484f
mov r9, qword [r12 + 0x70]
mov rdx, rbp
mov rcx, rbx
mov r8d, 1
add r9, 5
call fcn.100404310
mov rdx, qword [rdi]
cmp dword [rsp + 0x20], 0xffffffff
mov eax, 1
mov rbx, qword [rdx + 8]
cmove esi, eax
lea rax, [rdx + 8]
test rbx, rbx
mov qword [rdi], rax
je 0x100404860
xor edx, edx
mov rcx, rbx
call fcn.100403e70
test rax, rax
je 0x1004047f6
movzx eax, word [rax + 0x10]
test ax, ax
jne 0x1004047f0
call fcn.100404000
jmp 0x1004047f6
mov eax, dword [0x100413030]
test eax, eax
js 0x1004047f6
call fcn.100404000
jmp 0x1004047f6
mov eax, esi
add rsp, 0x38
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
xor ecx, ecx
call fcn.100403f50
xor eax, eax
jmp 0x100404862
mov r14, qword [0x100417150]
mov r13, qword [0x100416fb0]
lea r12, [0x10041b020]
lea rbp, [rsp + 0x20]
nop dword [rax + rax]
mov rsi, qword [r12]
test rsi, rsi
jne 0x1004048b8
jmp 0x100404921
mov rsi, qword [rsi]
test rsi, rsi
je 0x100404921
cmp word [rsi + 0x10], 0
jne 0x1004048b0
mov rax, qword [r14 + 0x70]
lea rdi, [rsi + 0x13]
mov ebx, dword [rsi + 8]
add rax, 5
mov qword [rsp + 0x20], rax
mov rdx, rdi
mov rcx, rbp
call fcn.100404070
mov rcx, rax
mov r15, rax
call fcn.100409bd0
sub ebx, 1
jns 0x1004048d3
mov rdx, qword [r13]
mov rcx, r15
call fcn.10040ea40
cmp byte [rsi + 0x12], 0
lea rdx, [0x1004144fa]
mov rcx, qword [0x1004170b0]
cmove rdx, qword [0x100416f60]
call fcn.10040eb40
mov rsi, qword [rsi]
test rsi, rsi
jne 0x1004048b8
lea rax, [0x10041b118]
add r12, 8
cmp r12, rax
jne 0x1004048a0
xor eax, eax
jmp 0x100404862