Function at 0x140001390
Capabilities:
Check if file exists
Delete directory
Enumerate files on windows
Enumerate files recursively
Get file attributes

Disassembly:
push rbp
push r13
sub rsp, 0x2b8
mov rax, qword [0x140026008]
xor rax, rsp
mov qword [rsp + 0x280], rax
mov qword [rsp + 0x20], rdx
mov rbp, rcx
xor edx, edx
lea rcx, [rsp + 0x30]
mov r8d, 0x250
call fcn.140007a90
mov r13, 0xffffffffffffffff
test rbp, rbp
je 0x1400016da
mov rax, r13
nop word [rax + rax]
inc rax
cmp word [rbp + rax*2], 0
jne 0x1400013e0
test rax, rax
je 0x1400016da
mov qword [rsp + 0x2e0], rbx
xor ebx, ebx
mov qword [rsp + 0x2b0], rsi
mov qword [rsp + 0x2a8], rdi
mov rdi, r13
mov qword [rsp + 0x298], r14
xor r14d, r14d
xor esi, esi
mov qword [rsp + 0x290], r15
inc rdi
cmp word [rbp + rdi*2], bx
jne 0x140001426
mov ecx, 0x2f
lea r15d, [rcx + 0x2d]
test rdi, rdi
je 0x140001459
movzx eax, word [rbp + rdi*2 - 2]
mov rbx, rdi
cmp r15w, ax
je 0x140001459
cmp cx, ax
je 0x140001459
lea r14d, [rcx - 0x2e]
lea rbx, [rdi + 1]
mov qword [rsp + 0x2a0], r12
add rbx, 1
je 0x14000168f
lea rbx, [rbx*2 + 2]
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rbx
mov edx, 8
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov qword [rsp + 0x28], rax
mov r12, rax
test rax, rax
je 0x14000168f
test rdi, rdi
je 0x1400014b2
lea r8, [rdi + rdi]
mov rdx, rbp
mov rcx, rax
call fcn.14000a130
mov rsi, rdi
test r14d, r14d
je 0x1400014bf
mov word [r12 + rsi*2], r15w
inc rsi
movzx eax, word [0x1400217c4]
lea rdx, [rsp + 0x30]
mov rcx, r12
mov word [r12 + rsi*2], ax
call qword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov r13, rax
cmp rax, 0xffffffffffffffff
je 0x140001679
mov r12, qword [rsp + 0x20]
nop dword [rax + rax]
test byte [rsp + 0x30], 0x10
je 0x140001529
lea rdx, [0x1400217c8]
lea rcx, [rsp + 0x5c]
call fcn.14000aa5c
test eax, eax
je 0x14000165e
lea rdx, [0x1400217cc]
lea rcx, [rsp + 0x5c]
call fcn.14000aa5c
test eax, eax
je 0x14000165e
xor ebx, ebx
xor r15d, r15d
xor r14d, r14d
mov rdi, 0xffffffffffffffff
nop dword [rax + rax]
inc rdi
cmp word [rbp + rdi*2], bx
jne 0x140001540
test rdi, rdi
je 0x140001573
movzx eax, word [rbp + rdi*2 - 2]
mov ecx, 0x5c
mov rbx, rdi
cmp cx, ax
je 0x140001573
mov ecx, 0x2f
cmp cx, ax
je 0x140001573
lea r15d, [rcx - 0x2e]
lea rbx, [rdi + 1]
lea rax, [rsp + 0x5c]
mov rsi, 0xffffffffffffffff
nop
inc rsi
cmp word [rax + rsi*2], r14w
jne 0x140001580
add rbx, rsi
je 0x14000165e
lea rbx, [rbx*2 + 2]
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rbx
mov edx, 8
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rbx, rax
test rax, rax
je 0x14000165e
test rdi, rdi
je 0x1400015d5
lea r8, [rdi + rdi]
mov rdx, rbp
mov rcx, rax
call fcn.14000a130
mov r14, rdi
test r15d, r15d
je 0x1400015e8
mov r15d, 0x5c
mov word [rbx + r14*2], r15w
inc r14
test rsi, rsi
je 0x1400015ff
lea r8, [rsi + rsi]
lea rcx, [rbx + r14*2]
lea rdx, [rsp + 0x5c]
call fcn.14000a130
test byte [rsp + 0x30], 0x10
mov rcx, rbx
je 0x140001639
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x140001620
and eax, 0x410
cmp eax, 0x410
je 0x14000162e
xor r8d, r8d
mov rdx, r12
mov rcx, rbx
call fcn.140001390
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
jmp 0x14000164a
xor r8d, r8d
lea rdx, [rsp + 0x30]
mov rax, r12
call qword [0x1400193d0]
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rbx
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
lea rdx, [rsp + 0x30]
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x1400014f0
mov r12, qword [rsp + 0x28]
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, r12
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x14000169a
mov ecx, 0xe
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_FindClose]
mov r15, qword [rsp + 0x290]
mov eax, 1
mov r14, qword [rsp + 0x298]
mov r12, qword [rsp + 0x2a0]
mov rdi, qword [rsp + 0x2a8]
mov rsi, qword [rsp + 0x2b0]
mov rbx, qword [rsp + 0x2e0]
jmp 0x1400016e7
mov ecx, 0x57
call qword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
mov rcx, qword [rsp + 0x280]
xor rcx, rsp
call fcn.140005df0
add rsp, 0x2b8
pop r13
pop rbp
ret