Function at 0x1004a6af0
Capabilities:
Get file attributes

Disassembly:
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x100
cmp qword [0x1005078c8], 0
mov dword [rdx], 0
mov r14d, ecx
mov r12, rdx
je 0x1004a6d90
mov ecx, 2
lea rbp, [rsp + 0x80]
call fcn.1004a6060
mov rbx, rax
test rax, rax
je 0x1004a6c80
mov rdx, rbp
mov rcx, rbx
call fcn.1004bd2b0
test eax, eax
jne 0x1004a6c38
mov eax, dword [rsp + 0x90]
and eax, 0xf000
cmp eax, 0x4000
je 0x1004a6dd0
mov eax, dword [r12]
or eax, 4
mov dword [r12], eax
test r14d, r14d
je 0x1004a6c4d
cmp byte [0x1005078c0], 0
je 0x1004a6d50
mov rsi, qword [0x1005078c8]
or dword [r12], 0x20
test rsi, rsi
je 0x1004a6e2c
mov rcx, rsi
lea rdi, [rsp + 0x30]
call sub.msys_2.0.dll_strlen
mov rdx, rdi
mov r8, rsi
mov ecx, 2
mov r9, rax
call sub.msys_gcrypt_20.dll_gcry_md_hash_buffer
mov rcx, rdi
mov edx, 0x78
call fcn.1004aa320
mov rdi, rax
test rax, rax
je 0x1004a6c46
xor r9d, r9d
mov rcx, rbx
lea rdx, [0x1004f1eae]
mov r8, rax
call fcn.10049f290
mov rcx, rdi
mov rsi, rax
call sub.msys_gcrypt_20.dll_gcry_free
test rsi, rsi
je 0x1004a6c46
mov rdx, rbp
mov rcx, rsi
call fcn.1004bd2b0
test eax, eax
jne 0x1004a6e0f
mov eax, dword [rsp + 0x90]
and eax, 0xf000
cmp eax, 0x4000
je 0x1004a6e4a
or dword [r12], 8
test r14d, r14d
jne 0x1004a6c6b
mov rcx, rsi
call sub.msys_gcrypt_20.dll_gcry_free
mov eax, dword [r12]
jmp 0x1004a6c4d
call sub.msys_2.0.dll___errno
cmp dword [rax], 2
je 0x1004a6d70
mov eax, dword [r12]
or eax, 1
mov rcx, qword [0x1005078c8]
or al, 0x80
mov dword [r12], eax
test rcx, rcx
je 0x1004a6db0
call sub.msys_gcrypt_20.dll_gcry_xstrdup
mov rsi, rax
mov rax, rsi
add rsp, 0x100
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
ret
lea rdi, str._run
lea rsi, str._run
lea rbx, [rsp + 0x50]
lea r13, str._s_user__u
nop word [rax + rax]
call sub.msys_2.0.dll_getuid
mov edx, 0x2f
mov rcx, rbx
mov r9, rsi
mov dword [rsp + 0x20], eax
mov r8, r13
call sub.msys_gpg_error_0.dll_gpgrt_snprintf
mov rdx, rbp
mov rcx, rbx
call fcn.1004bd2b0
test eax, eax
jne 0x1004a6cde
mov eax, dword [rsp + 0x90]
and eax, 0xf000
cmp eax, 0x4000
je 0x1004a6d00
mov rsi, qword [rdi + 8]
add rdi, 8
test rsi, rsi
jne 0x1004a6ca0
mov eax, dword [r12]
or eax, 2
jmp 0x1004a6c4d
mov esi, dword [rsp + 0x98]
call sub.msys_2.0.dll_getuid
cmp esi, eax
je 0x1004a6d24
mov eax, dword [r12]
or eax, 4
mov dword [r12], eax
test r14d, r14d
je 0x1004a6c4d
mov rcx, rbx
call sub.msys_2.0.dll_strlen
lea rdx, [rax + 7]
cmp rdx, 0x2e
ja 0x1004a6c46
add rax, rbx
mov dword [rax], 0x756e672f
mov dword [rax + 3], 0x677075
jmp 0x1004a6b39
mov rcx, rbx
call sub.msys_gcrypt_20.dll_gcry_xstrdup
mov rsi, rax
test rax, rax
jne 0x1004a6c6b
mov eax, dword [r12]
jmp 0x1004a6c4d
lea rdx, str._rwx
mov rcx, rbx
call fcn.1004a55c0
test eax, eax
je 0x1004a6df7
mov eax, dword [r12]
or eax, 0x10
jmp 0x1004a6c4d
call fcn.1004a67a0
xor edx, edx
mov rcx, rax
call fcn.10049ebf0
mov qword [0x1005078c8], rax
jmp 0x1004a6b1b
call fcn.1004a67a0
xor edx, edx
mov rcx, rax
call fcn.10049ebf0
mov qword [0x1005078c8], rax
mov rcx, rax
jmp 0x1004a6c63
mov esi, dword [rsp + 0x98]
call sub.msys_2.0.dll_getuid
cmp esi, eax
jne 0x1004a6b63
test byte [rsp + 0x90], 0x3f
jne 0x1004a6b63
jmp 0x1004a6b77
mov rdx, rbp
mov rcx, rbx
call fcn.1004bd2b0
test eax, eax
je 0x1004a6b4c
jmp 0x1004a6c46
call sub.msys_2.0.dll___errno
cmp dword [rax], 2
je 0x1004a6e71
or dword [r12], 1
test r14d, r14d
jne 0x1004a6c6b
jmp 0x1004a6c27
call fcn.1004a67a0
xor edx, edx
mov rcx, rax
call fcn.10049ebf0
mov qword [0x1005078c8], rax
mov rsi, rax
jmp 0x1004a6b99
mov ebx, dword [rsp + 0x98]
call sub.msys_2.0.dll_getuid
cmp ebx, eax
jne 0x1004a6c1d
test byte [rsp + 0x90], 0x3f
jne 0x1004a6c1d
jmp 0x1004a6c6b
test r14d, r14d
je 0x1004a6e80
or dword [r12], 0x40
jmp 0x1004a6c6b
lea rdx, str._rwx
mov rcx, rsi
call fcn.1004a55c0
test eax, eax
je 0x1004a6e9d
or dword [r12], 0x10
jmp 0x1004a6c27
mov rdx, rbp
mov rcx, rbx
call fcn.1004bd2b0
test eax, eax
je 0x1004a6c6b
call sub.msys_2.0.dll___errno
cmp dword [rax], 2
je 0x1004a6ec4
or dword [r12], 1
jmp 0x1004a6c27
or dword [r12], 0x40
jmp 0x1004a6c27