Function at 0x140001280
Capabilities:
Get file attributes
Read file on windows

Disassembly:
push r13
push r15
sub rsp, 0x308
mov rax, qword [0x14011f7a8]
xor rax, rsp
mov qword [rsp + 0x2d0], rax
mov r13, rcx
mov r8d, 0x104
lea rcx, [rsp + 0xc0]
mov r15, rdx
call fcn.1400cde20
lea rcx, [rsp + 0xc0]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
shr eax, 0xa
test al, 1
jne 0x14000177f
mov qword [rsp + 0x2f0], rdi
test r15, r15
je 0x14000179b
cmp byte [r15], 0
je 0x14000179b
mov ecx, 0x130
call fcn.1400d3454
mov rdi, rax
test rax, rax
je 0x140001355
mov r9, r15
mov qword [rsp + 0x20], 0x105
mov r8d, 0x105
lea rdx, [rsp + 0xc0]
lea rcx, [rsp + 0x30]
call fcn.1400cdebc
test eax, eax
jne 0x140001342
lea rcx, [rsp + 0xc0]
call fcn.1400010c0
xor ecx, ecx
mov qword [rdi + 0x128], rax
test rax, rax
sete cl
jmp 0x140001347
mov ecx, 1
test ecx, ecx
je 0x140001355
mov rcx, rdi
call fcn.1400d2d0c
xor edi, edi
test rdi, rdi
je 0x1400017a5
mov qword [rsp + 0x330], rbx
mov qword [rsp + 0x300], rbp
mov qword [rsp + 0x2f8], rsi
mov rsi, 0xffffffffffffffff
mov qword [rsp + 0x2e8], r12
mov qword [rsp + 0x2e0], r14
mov r14, rsi
inc r14
cmp byte [r15 + r14], 0
jne 0x140001390
lea r12, [rdi + 0x128]
mov rbx, qword [r12]
cmp dword [rbx + 0x478], 0
je 0x1400013c1
lea rsi, [rbx + 0x228]
mov dword [rbx + 0x478], 0
jmp 0x140001403
mov rcx, qword [rbx + 0x480]
cmp rcx, 0xffffffffffffffff
je 0x1400016ec
lea rsi, [rbx + 0x228]
mov rdx, rsi
call qword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x140001403
mov rcx, qword [rbx + 0x480]
call qword [sym.imp.KERNEL32.dll_FindClose]
mov rax, 0xffffffffffffffff
xor esi, esi
mov qword [rbx + 0x480], rax
test rsi, rsi
je 0x1400016e5
lea r9, [rsi + 0x2c]
mov qword [rsp + 0x20], 0x105
mov r8d, 0x105
lea rdx, [rdi + 0x1c]
lea rcx, [rsp + 0x30]
call fcn.1400d2850
test eax, eax
je 0x140001460
lea r9, [rsi + 0x234]
cmp word [r9], 0
je 0x14000145c
mov r8d, 0x105
mov qword [rsp + 0x20], 0x105
lea rdx, [rdi + 0x1c]
lea rcx, [rsp + 0x30]
call fcn.1400d2850
test eax, eax
jne 0x1400014a5
mov rax, qword [rsp + 0x30]
dec rax
mov qword [rdi + 0x10], rax
mov eax, dword [rsi]
test al, 0x40
je 0x140001486
xor eax, eax
mov dword [rdi + 0x18], 0x2000
mov ecx, 0x128
lea rsi, [rax - 1]
jmp 0x1400014c5
test al, 0x10
mov ecx, 0x4000
mov eax, 0x8000
cmovne eax, ecx
mov ecx, 0x128
mov dword [rdi + 0x18], eax
xor eax, eax
lea rsi, [rax - 1]
jmp 0x1400014c5
mov rsi, 0xffffffffffffffff
mov word [rdi + 0x1c], 0x3f
mov eax, esi
mov qword [rdi + 0x10], 1
mov dword [rdi + 0x18], 0
xor ecx, ecx
mov dword [rdi], 0
mov rbx, rdi
mov dword [rdi + 4], eax
mov word [rdi + 8], cx
mov ecx, 0x4000
mov eax, dword [rdi + 0x18]
cmp eax, ecx
jne 0x140001583
add rbx, 0x1c
cmp byte [rbx], 0x2e
jne 0x14000150d
cmp byte [rbx + 1], 0
je 0x1400013a1
cmp byte [rbx], 0x2e
jne 0x14000150d
cmp byte [rbx + 1], 0x2e
jne 0x14000150d
cmp byte [rbx + 2], 0
je 0x1400013a1
mov rax, rsi
inc rax
cmp byte [rbx + rax], 0
jne 0x140001510
inc rax
add rax, r14
cmp rax, 0x80
ja 0x1400017cc
lea rdx, [rsp + 0x40]
mov rcx, r15
sub rdx, r15
nop word [rax + rax]
movzx eax, byte [rcx]
mov byte [rdx + rcx], al
lea rcx, [rcx + 1]
test al, al
jne 0x140001540
lea rcx, [rsp + 0x41]
mov byte [rsp + r14 + 0x40], 0x2f
sub rcx, rbx
add rcx, r14
nop
movzx eax, byte [rbx]
mov byte [rcx + rbx], al
lea rbx, [rbx + 1]
test al, al
jne 0x140001560
mov r8b, 1
lea rdx, [rsp + 0x40]
mov rcx, r13
call fcn.140001280
jmp 0x1400013a1
cmp eax, 0x8000
jne 0x1400013a1
add rbx, 0x1c
mov rax, rsi
inc rax
cmp byte [rbx + rax], 0
jne 0x140001595
inc rax
add rax, r14
cmp rax, 0x80
ja 0x14000186c
lea rdx, [rsp + 0x40]
mov rcx, r15
sub rdx, r15
nop dword [rax + rax]
movzx eax, byte [rcx]
mov byte [rdx + rcx], al
lea rcx, [rcx + 1]
test al, al
jne 0x1400015c0
lea rcx, [rsp + 0x41]
mov byte [rsp + r14 + 0x40], 0x2f
sub rcx, rbx
add rcx, r14
nop
movzx eax, byte [rbx]
mov byte [rcx + rbx], al
lea rbx, [rbx + 1]
test al, al
jne 0x1400015e0
mov eax, dword [r13 + 0x44000]
lea rdx, [rsp + 0x40]
imul rbp, rax, 0x88
mov r8d, 0x80
add rbp, r13
inc eax
mov rcx, rbp
mov dword [r13 + 0x44000], eax
call fcn.1400d11d0
mov edx, 0x80
mov rcx, rbp
call fcn.1400d2d20
lea rdx, [0x14011334c]
mov byte [rbp + 0x80], al
lea rcx, [rsp + 0x40]
call fcn.1400cda80
mov rsi, rax
test rax, rax
je 0x140001843
xor edx, edx
mov rcx, rax
lea r8d, [rdx + 2]
call fcn.1400ce540
mov rcx, rsi
call fcn.1400cd540
movsxd rbx, eax
test eax, eax
js 0x14000181f
xor r8d, r8d
xor edx, edx
mov rcx, rsi
call fcn.1400ce540
mov rcx, qword [r13 + 0x44008]
mov edx, ebx
add edx, dword [r13 + 0x44010]
mov rax, 0xffffffffffffffff
cmovb rdx, rax
call fcn.1400ce2c8
mov qword [r13 + 0x44008], rax
test rax, rax
je 0x1400017f6
mov ecx, dword [r13 + 0x44010]
mov rdx, rbx
add rcx, rax
mov r9, rsi
mov r8d, 1
call fcn.1400d338c
add dword [r13 + 0x44010], ebx
mov rcx, rsi
call fcn.1400ce230
mov dword [rbp + 0x84], ebx
mov rsi, 0xffffffffffffffff
jmp 0x1400013a1
mov rsi, 0xffffffffffffffff
mov rbx, qword [r12]
test rbx, rbx
je 0x140001735
mov rcx, qword [rbx + 0x480]
cmp rcx, 0xffffffffffffffff
je 0x14000170f
call qword [sym.imp.KERNEL32.dll_FindClose]
mov qword [rbx + 0x480], rsi
mov rcx, qword [rbx + 0x488]
test rcx, rcx
je 0x14000172b
call fcn.1400d2d0c
mov qword [rbx + 0x488], 0
mov rcx, rbx
call fcn.1400d2d0c
jmp 0x14000173f
mov ecx, 9
call fcn.1400d2324
mov rcx, rdi
mov qword [r12], 0
call fcn.1400d2d0c
mov r12, qword [rsp + 0x2e8]
mov rbx, qword [rsp + 0x330]
mov rsi, qword [rsp + 0x2f8]
mov rbp, qword [rsp + 0x300]
mov r14, qword [rsp + 0x2e0]
mov rdi, qword [rsp + 0x2f0]
mov rcx, qword [rsp + 0x2d0]
xor rcx, rsp
call fcn.1400c8a50
add rsp, 0x308
pop r15
pop r13
ret
mov ecx, 2
call fcn.1400d2324
mov ecx, 2
call fcn.1400ce084
mov rcx, rax
lea rdx, str._CRASH__couldnt_open_directory_____s_n
mov r8, r15
call fcn.140001010
mov ecx, 1
call fcn.1400cd8e0
int3
mov ecx, 2
call fcn.1400ce084
mov rcx, rax
lea rdx, str._CRASH__path_is_too_long_____s__s_n
mov r9, rbx
mov r8, r15
call fcn.140001010
mov ecx, 1
call fcn.1400cd8e0
int3
mov ecx, 2
call fcn.1400ce084
mov rcx, rax
lea r8, [rsp + 0x40]
lea rdx, str._CRASH__couldnt_allocate_data_when_reading_the_file__s_n
call fcn.140001010
mov ecx, 1
call fcn.1400cd8e0
int3
mov ecx, 2
call fcn.1400ce084
mov rcx, rax
lea rdx, str._CRASH__length_of_file_is_negative_n
call fcn.140001010
mov ecx, 1
call fcn.1400cd8e0
int3
mov ecx, 2
call fcn.1400ce084
mov rcx, rax
lea r8, [rsp + 0x40]
lea rdx, str._CRASH__couldnt_open_file_____s_n
call fcn.140001010
mov ecx, 1
call fcn.1400cd8e0
int3
mov ecx, 2
call fcn.1400ce084
mov rcx, rax
lea rdx, str._CRASH__path_is_too_long_____s__s_n
mov r9, rbx
mov r8, r15
call fcn.140001010
mov ecx, 1
call fcn.1400cd8e0
int3