Function at 0x140057020
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 [0x1400bca20]
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 main
mov r13, 0xffffffffffffffff
test rbp, rbp
je 0x140057364
mov rax, r13
nop word [rax + rax]
inc rax
cmp word [rbp + rax*2], 0
jne 0x140057070
test rax, rax
je 0x140057364
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 0x1400570b6
mov ecx, 0x2f
lea r15d, [rcx + 0x2d]
test rdi, rdi
je 0x1400570e9
movzx eax, word [rbp + rdi*2 - 2]
mov rbx, rdi
cmp r15w, ax
je 0x1400570e9
cmp cx, ax
je 0x1400570e9
lea r14d, [rcx - 0x2e]
lea rbx, [rdi + 1]
mov qword [rsp + 0x2a0], r12
add rbx, 1
je 0x140057319
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 0x140057319
test rdi, rdi
je 0x140057142
lea r8, [rdi + rdi]
mov rdx, rbp
mov rcx, rax
call fcn.14007f550
mov rsi, rdi
test r14d, r14d
je 0x14005714f
mov word [r12 + rsi*2], r15w
inc rsi
movzx eax, word [0x1400a46a8]
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 0x140057303
mov r12, qword [rsp + 0x20]
nop dword [rax + rax]
test byte [rsp + 0x30], 0x10
je 0x1400571b9
lea rdx, [0x1400a46ac]
lea rcx, [rsp + 0x5c]
call fcn.140061e80
test eax, eax
je 0x1400572e8
lea rdx, [0x1400a2f8c]
lea rcx, [rsp + 0x5c]
call fcn.140061e80
test eax, eax
je 0x1400572e8
xor edi, edi
xor r15d, r15d
xor r14d, r14d
mov rbx, 0xffffffffffffffff
nop dword [rax + rax]
inc rbx
cmp word [rbp + rbx*2], di
jne 0x1400571d0
test rbx, rbx
je 0x140057203
movzx eax, word [rbp + rbx*2 - 2]
mov ecx, 0x5c
mov rdi, rbx
cmp cx, ax
je 0x140057203
mov ecx, 0x2f
cmp cx, ax
je 0x140057203
lea r15d, [rcx - 0x2e]
lea rdi, [rbx + 1]
lea rax, [rsp + 0x5c]
mov rsi, 0xffffffffffffffff
nop
inc rsi
cmp word [rax + rsi*2], r14w
jne 0x140057210
add rdi, rsi
je 0x1400572e8
lea rdi, [rdi*2 + 2]
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rdi
mov edx, 8
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rdi, rax
test rax, rax
je 0x1400572e8
test rbx, rbx
je 0x140057265
lea r8, [rbx + rbx]
mov rdx, rbp
mov rcx, rax
call fcn.14007f550
mov r14, rbx
test r15d, r15d
je 0x140057278
mov r15d, 0x5c
mov word [rdi + r14*2], r15w
inc r14
test rsi, rsi
je 0x14005728f
lea r8, [rsi + rsi]
lea rcx, [rdi + r14*2]
lea rdx, [rsp + 0x5c]
call fcn.14007f550
test byte [rsp + 0x30], 0x10
mov rcx, rdi
je 0x1400572c9
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x1400572b0
and eax, 0x410
cmp eax, 0x410
je 0x1400572be
xor r8d, r8d
mov rdx, r12
mov rcx, rdi
call fcn.140057020
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
jmp 0x1400572d4
xor r8d, r8d
lea rdx, [rsp + 0x30]
call r12
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rdi
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 0x140057180
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 0x140057324
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 0x140057371
mov ecx, 0x57
call qword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
mov rcx, qword [rsp + 0x280]
xor rcx, rsp
call fcn.14007a950
add rsp, 0x2b8
pop r13
pop rbp
ret