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

Disassembly:
mov qword [rsp + 0x20], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x390]
sub rsp, 0x490
mov rax, qword [0x140039008]
xor rax, rsp
mov qword [rbp + 0x380], rax
or r13, 0xffffffffffffffff
mov r12d, r8d
mov rsi, r13
mov r15d, edx
mov r14, rcx
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov edi, eax
cmp eax, 0xffffffff
jne 0x1400127f9
call qword [sym.imp.KERNEL32.dll_GetLastError]
movzx ebx, ax
or ebx, 0x80070000
test eax, eax
cmovle ebx, eax
test ebx, ebx
js 0x140012a50
test dil, 0x10
je 0x140012a18
test dil, 1
je 0x14001283a
mov edx, 0x80
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test eax, eax
jne 0x14001283a
call qword [sym.imp.KERNEL32.dll_GetLastError]
movzx ebx, ax
mov edi, 0x80070000
or ebx, edi
test eax, eax
cmovle ebx, eax
test ebx, ebx
js 0x140012a50
jmp 0x14001283f
mov edi, 0x80070000
test r15d, r15d
jne 0x140012850
test r12d, r12d
jne 0x140012850
xor ebx, ebx
jmp 0x140012a2f
mov ebx, 0x104
lea rcx, [rbp + 0x170]
mov edx, ebx
mov r9, r13
mov r8, r14
call fcn.1400197c0
cmp eax, 0x50
jne 0x140012878
mov ebx, 0x8007007a
jmp 0x140012a50
mov r9, r13
lea r8, str..
mov rdx, rbx
lea rcx, [rbp + 0x170]
call fcn.1400196c0
cmp eax, 0x50
je 0x14001286e
lea rdx, [rsp + 0x20]
lea rcx, [rbp + 0x170]
call qword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov rsi, rax
cmp rax, r13
jne 0x1400128cd
call qword [sym.imp.KERNEL32.dll_GetLastError]
movzx ebx, ax
or ebx, edi
test eax, eax
cmovle ebx, eax
test ebx, ebx
js 0x140012a50
mov ebx, 0x104
lea rdx, [0x140033814]
lea rcx, [rsp + 0x4c]
call qword [sym.imp.KERNEL32.dll_lstrcmpW]
test eax, eax
je 0x1400129e0
lea rdx, [0x140033818]
lea rcx, [rsp + 0x4c]
call qword [sym.imp.KERNEL32.dll_lstrcmpW]
test eax, eax
je 0x1400129e0
mov r9, r13
lea rcx, [rbp + 0x170]
mov r8, r14
mov rdx, rbx
call fcn.1400197c0
cmp eax, 0x50
je 0x140012a05
mov r9, r13
lea r8, [rsp + 0x4c]
mov rdx, rbx
lea rcx, [rbp + 0x170]
call fcn.1400196c0
cmp eax, 0x50
je 0x140012a05
test r12d, r12d
je 0x140012985
test byte [rsp + 0x20], 0x10
je 0x140012985
mov r9, r13
lea r8, [0x140032ec8]
mov rdx, rbx
lea rcx, [rbp + 0x170]
call fcn.1400196c0
cmp eax, 0x50
je 0x140012a05
mov r8d, r12d
lea rcx, [rbp + 0x170]
mov edx, r15d
call fcn.140012790
mov ebx, eax
test eax, eax
jmp 0x1400129de
test r15d, r15d
je 0x1400129e0
test byte [rsp + 0x20], 7
je 0x1400129bb
mov edx, 0x80
lea rcx, [rbp + 0x170]
call qword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test eax, eax
jne 0x1400129bb
call qword [sym.imp.KERNEL32.dll_GetLastError]
movzx ebx, ax
or ebx, edi
test eax, eax
cmovle ebx, eax
test ebx, ebx
js 0x140012a1d
lea rcx, [rbp + 0x170]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x1400129e0
call qword [sym.imp.KERNEL32.dll_GetLastError]
movzx ebx, ax
or ebx, edi
test eax, eax
cmovle ebx, eax
test ebx, ebx
js 0x140012a1d
lea rdx, [rsp + 0x20]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x1400128c8
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x12
jne 0x140012a0c
xor ebx, ebx
jmp 0x140012a1d
mov ebx, 0x8007007a
jmp 0x140012a1d
movzx ebx, ax
or ebx, edi
test eax, eax
cmovle ebx, eax
jmp 0x140012a1d
mov ebx, 0x8000ffff
cmp rsi, r13
je 0x140012a2b
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_FindClose]
test ebx, ebx
js 0x140012a50
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
test eax, eax
jne 0x140012a50
call qword [sym.imp.KERNEL32.dll_GetLastError]
movzx ebx, ax
or ebx, 0x80070000
test eax, eax
cmovle ebx, eax
mov eax, ebx
mov rcx, qword [rbp + 0x380]
xor rcx, rsp
call fcn.140015cc0
mov rbx, qword [rsp + 0x4e8]
add rsp, 0x490
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret