Function at 0x140021190
Capabilities:
Check if file exists
Enumerate files on windows
Get file attributes

Disassembly:
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x10220]
mov eax, 0x10320
call fcn.1400417b0
sub rsp, rax
mov qword [rsp + 0x20], 0xfffffffffffffffe
mov qword [rsp + 0x10370], rbx
mov rax, qword [0x1400681b8]
xor rax, rsp
mov qword [rbp + 0x10210], rax
mov r13d, r9d
mov rdi, r8
mov r15, rdx
mov r12, rcx
xor edx, edx
lea r8d, [rdx + 0x54]
lea rcx, [rsp + 0x30]
call fcn.140042d50
call fcn.1400091f0
mov rcx, rax
test rax, rax
je 0x140021581
mov rax, qword [rax]
call qword [rax + 0x18]
add rax, 0x18
mov qword [rbp - 0x78], rax
xor eax, eax
mov qword [rbp - 0x70], rax
mov qword [rbp - 0x68], rax
mov qword [rbp - 0x60], rax
xor ebx, ebx
mov qword [rbp - 0x58], rbx
mov qword [rbp - 0x50], rbx
lea rcx, [rbp - 0x58]
call fcn.14000a280
mov qword [rbp - 0x58], rax
mov rax, qword [rdi + 0x78]
mov qword [rbp - 0x68], rax
mov r14d, ebx
mov r8, qword [rdi + 0x68]
mov esi, 0x7fff
mov edx, esi
lea rcx, [rbp + 0x210]
lea rax, [rbp + 0x210]
sub r8, rax
nop word [rax + rax]
lea rax, [rdx + 0x7fff7fff]
test rax, rax
je 0x140021283
movzx eax, word [rcx + r8]
test ax, ax
je 0x140021283
mov word [rcx], ax
add rcx, 2
sub rdx, 1
jne 0x140021260
lea rax, [rcx - 2]
test rdx, rdx
cmovne rax, rcx
mov word [rax], bx
mov rbx, qword [rdi]
mov rax, qword [rdi + 8]
mov qword [rax], rbx
mov rcx, qword [rdi]
mov rax, qword [rdi + 8]
mov qword [rcx + 8], rax
dec qword [r15 + 8]
lea rcx, [rdi + 0x10]
call fcn.140006670
mov edx, 0x98
mov rcx, rdi
call fcn.140040e00
lea rcx, [rbp + 0x210]
call qword [sym.imp.KERNEL32.dll_lstrlenW]
movsxd rcx, eax
cmp word [rbp + rcx*2 + 0x20e], 0x5c
jne 0x140021307
lea rcx, [rbp + 0x210]
call qword [sym.imp.KERNEL32.dll_lstrlenW]
dec eax
cdqe
add rax, rax
cmp rax, 0xfffe
jae 0x14002158c
xor edi, edi
mov word [rbp + rax + 0x210], di
jmp 0x140021309
xor edi, edi
mov rcx, rsi
lea rax, [rbp + 0x210]
cmp word [rax], r14w
je 0x140021323
add rax, 2
sub rcx, 1
jne 0x140021313
mov rax, rsi
sub rax, rcx
mov rdx, rdi
test rcx, rcx
cmovne rdx, rax
je 0x14002138d
sub rsi, rdx
lea rcx, [rbp + 0x210]
lea rcx, [rcx + rdx*2]
je 0x14002137f
lea rax, [rsi + 0x7fff8000]
add rax, rdx
lea r8, [0x140058470]
sub r8, rcx
nop dword [rax]
test rax, rax
je 0x14002137f
movzx edx, word [rcx + r8]
test dx, dx
je 0x14002137f
mov word [rcx], dx
add rcx, 2
dec rax
sub rsi, 1
jne 0x140021360
lea rax, [rcx - 2]
test rsi, rsi
cmovne rax, rcx
mov word [rax], di
lea rdx, [rbp - 0x40]
lea rcx, [rbp + 0x210]
call qword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov rsi, rax
lea rcx, [rbp + 0x210]
call qword [sym.imp.KERNEL32.dll_lstrlenW]
sub eax, 2
movsxd rcx, eax
add rcx, rcx
cmp rcx, 0xfffe
jae 0x14002157b
mov word [rbp + rcx + 0x210], di
cmp rsi, 0xffffffffffffffff
jne 0x140021410
mov qword [r12], rbx
lea rcx, [rsp + 0x30]
call fcn.140006670
mov rax, r12
mov rcx, qword [rbp + 0x10210]
xor rcx, rsp
call fcn.140041820
mov rbx, qword [rsp + 0x10370]
add rsp, 0x10320
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
lea rdx, [0x1400564b0]
lea rcx, [rbp - 0x14]
call qword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
je 0x1400214d1
lea rdx, [0x140058478]
lea rcx, [rbp - 0x14]
call qword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
je 0x1400214d1
lea r9, [rbp - 0x14]
lea r8, [rbp + 0x210]
lea rdx, [0x1400563f0]
lea rcx, [rbp - 0x78]
call fcn.140008d30
mov rcx, qword [rbp - 0x78]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x140021470
test al, 0x10
jne 0x14002148d
mov rcx, qword [rbp - 0x78]
test r13d, r13d
je 0x140021484
call fcn.14001e130
test eax, eax
jne 0x14002148d
jmp 0x1400214d1
call fcn.14001df70
test eax, eax
jne 0x1400214d1
mov rdi, qword [rbx + 8]
lea r9, [rsp + 0x30]
mov r8, rdi
mov rdx, rbx
mov rcx, r15
call fcn.140005990
mov rdx, qword [r15 + 8]
movabs rcx, 0x1af286bca1af285
sub rcx, rdx
cmp rcx, 1
jb 0x14002156e
lea rcx, [rdx + 1]
mov qword [r15 + 8], rcx
mov qword [rbx + 8], rax
mov qword [rdi], rax
inc r14d
lea rdx, [rbp - 0x40]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x140021410
test r14d, r14d
je 0x1400214fa
mov eax, r14d
nop
mov rbx, qword [rbx + 8]
sub rax, 1
jne 0x1400214f0
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_FindClose]
mov qword [r12], rbx
mov rbx, qword [rbp - 0x58]
mov rdx, qword [rbx + 8]
lea rcx, [rbp - 0x58]
call fcn.14000a3e0
mov rax, qword [rbp - 0x58]
mov qword [rax + 8], rbx
mov rax, qword [rbp - 0x58]
mov qword [rax], rbx
mov rax, qword [rbp - 0x58]
mov qword [rax + 0x10], rbx
mov qword [rbp - 0x50], 0
mov edx, 0xb8
mov rcx, qword [rbp - 0x58]
call fcn.140040e00
mov rdx, qword [rbp - 0x78]
add rdx, 0xffffffffffffffe8
mov eax, 0xffffffff
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x1400213e0
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + 8]
jmp 0x1400213e0
lea rcx, str.list_T__too_long
call fcn.140040d8c
int3
call fcn.1400411c4
nop
mov ecx, 0x80004005
call fcn.140007690
nop
call fcn.1400411c4
int3