Function at 0x140012ccc
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
sub rsp, 0x4a0
mov rax, qword [0x1400280c8]
xor rax, rsp
mov qword [rsp + 0x490], rax
mov dword [rsp + 0x24], r8d
mov dword [rsp + 0x20], edx
mov rbp, rcx
or rsi, 0xffffffffffffffff
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov edi, eax
cmp eax, 0xffffffff
jne 0x140012d26
call qword [sym.imp.KERNEL32.dll_GetLastError]
movzx ebx, ax
or ebx, 0x80070000
test eax, eax
cmovle ebx, eax
test ebx, ebx
js 0x140012fa2
test dil, 0x10
je 0x140012f69
test dil, 1
je 0x140012d64
mov edx, 0x80
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test eax, eax
jne 0x140012d64
call qword [sym.imp.KERNEL32.dll_GetLastError]
movzx ebx, ax
or ebx, 0x80070000
test eax, eax
cmovle ebx, eax
test ebx, ebx
js 0x140012fa2
mov ebx, dword [rsp + 0x20]
mov edi, dword [rsp + 0x24]
test ebx, ebx
jne 0x140012d78
test edi, edi
je 0x140012f81
or rsi, 0xffffffffffffffff
lea rcx, [rsp + 0x280]
mov r8, rbp
mov r9, rsi
mov edx, 0x104
call fcn.140014938
cmp eax, 0x50
jne 0x140012da3
mov ebx, 0x8007007a
jmp 0x140012fa2
lea r8, str..
lea rcx, [rsp + 0x280]
mov r9, rsi
mov edx, 0x104
call fcn.14001475c
cmp eax, 0x50
je 0x140012d99
lea rdx, [rsp + 0x30]
lea rcx, [rsp + 0x280]
call qword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov rsi, rax
cmp rax, 0xffffffffffffffff
jne 0x140012e00
call qword [sym.imp.KERNEL32.dll_GetLastError]
movzx ebx, ax
or ebx, 0x80070000
test eax, eax
cmovle ebx, eax
test ebx, ebx
js 0x140012f6e
mov ebx, dword [rsp + 0x20]
lea rdx, [0x140022b18]
lea rcx, [rsp + 0x5c]
call qword [sym.imp.KERNEL32.dll_lstrcmpW]
test eax, eax
je 0x140012f2d
lea rdx, [0x140022d28]
lea rcx, [rsp + 0x5c]
call qword [sym.imp.KERNEL32.dll_lstrcmpW]
test eax, eax
je 0x140012f2d
lea rcx, [rsp + 0x280]
or r9, 0xffffffffffffffff
mov r8, rbp
mov edx, 0x104
call fcn.140014938
cmp eax, 0x50
je 0x140012f52
lea r8, [rsp + 0x5c]
lea rcx, [rsp + 0x280]
or r9, 0xffffffffffffffff
mov edx, 0x104
call fcn.14001475c
cmp eax, 0x50
je 0x140012f52
mov eax, dword [rsp + 0x30]
test edi, edi
je 0x140012ec4
test al, 0x10
je 0x140012ec4
lea r8, [0x140021cb0]
lea rcx, [rsp + 0x280]
or r9, 0xffffffffffffffff
mov edx, 0x104
call fcn.14001475c
cmp eax, 0x50
je 0x140012f52
lea rcx, [rsp + 0x280]
mov r8d, edi
mov edx, ebx
call fcn.140012ccc
mov ebx, eax
test eax, eax
jmp 0x140012f2b
test ebx, ebx
je 0x140012f2d
test al, 1
jne 0x140012ed4
test al, 2
jne 0x140012ed4
test al, 4
je 0x140012f03
lea rcx, [rsp + 0x280]
mov edx, 0x80
call qword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test eax, eax
jne 0x140012f03
call qword [sym.imp.KERNEL32.dll_GetLastError]
movzx ebx, ax
or ebx, 0x80070000
test eax, eax
cmovle ebx, eax
test ebx, ebx
js 0x140012f6e
lea rcx, [rsp + 0x280]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x140012f2d
call qword [sym.imp.KERNEL32.dll_GetLastError]
movzx ebx, ax
or ebx, 0x80070000
test eax, eax
cmovle ebx, eax
test ebx, ebx
js 0x140012f6e
lea rdx, [rsp + 0x30]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x140012dfc
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x12
jne 0x140012f59
xor ebx, ebx
jmp 0x140012f6e
mov ebx, 0x8007007a
jmp 0x140012f6e
movzx ebx, ax
or ebx, 0x80070000
test eax, eax
cmovle ebx, eax
jmp 0x140012f6e
mov ebx, 0x8000ffff
cmp rsi, 0xffffffffffffffff
je 0x140012f7d
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_FindClose]
test ebx, ebx
js 0x140012fa2
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
test eax, eax
jne 0x140012fa2
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 [rsp + 0x490]
xor rcx, rsp
call fcn.1400146fc
mov rbx, qword [rsp + 0x4d8]
add rsp, 0x4a0
pop rdi
pop rsi
pop rbp
ret