Function at 0x140016ec8
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
mov rbp, rsp
push rsi
push rdi
sub rsp, 0x4a0
mov rax, qword [0x140027098]
xor rax, rsp
mov qword [rbp - 0x20], rax
mov dword [rsp + 0x20], r8d
mov dword [rsp + 0x24], edx
mov rbx, rcx
mov qword [rsp + 0x28], rcx
or rsi, 0xffffffffffffffff
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov edi, eax
cmp eax, 0xffffffff
jne 0x140016f2b
call qword [sym.imp.KERNEL32.dll_GetLastError]
movzx ebx, ax
or ebx, 0x80070000
test eax, eax
cmovle ebx, eax
test ebx, ebx
js 0x1400171ba
mov rbx, qword [rsp + 0x28]
test dil, 0x10
je 0x14001717c
test dil, 1
je 0x140016f69
mov edx, 0x80
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test eax, eax
jne 0x140016f69
call qword [sym.imp.KERNEL32.dll_GetLastError]
movzx ebx, ax
or ebx, 0x80070000
test eax, eax
cmovle ebx, eax
test ebx, ebx
js 0x1400171ba
mov ebx, dword [rsp + 0x24]
test ebx, ebx
jne 0x140016f81
cmp dword [rsp + 0x20], ebx
jne 0x140016f81
mov rdi, qword [rsp + 0x28]
jmp 0x140017199
mov rdi, qword [rsp + 0x28]
or rsi, 0xffffffffffffffff
lea rcx, [rsp + 0x280]
mov r9, rsi
mov edx, 0x104
mov r8, rdi
call fcn.140010790
cmp eax, 0x50
jne 0x140016fb1
mov ebx, 0x8007007a
jmp 0x1400171ba
lea r8, str..
lea rcx, [rsp + 0x280]
mov r9, rsi
mov edx, 0x104
call fcn.14001069c
cmp eax, 0x50
je 0x140016fa7
lea rdx, [rsp + 0x30]
lea rcx, [rsp + 0x280]
call qword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov rsi, rax
cmp rax, 0xffffffffffffffff
jne 0x14001700e
call qword [sym.imp.KERNEL32.dll_GetLastError]
movzx ebx, ax
or ebx, 0x80070000
test eax, eax
cmovle ebx, eax
test ebx, ebx
js 0x1400171ba
mov ebx, dword [rsp + 0x24]
lea rdx, [0x140023148]
lea rcx, [rsp + 0x5c]
call qword [sym.imp.KERNEL32.dll_lstrcmpW]
test eax, eax
je 0x140017140
lea rdx, [0x140023160]
lea rcx, [rsp + 0x5c]
call qword [sym.imp.KERNEL32.dll_lstrcmpW]
test eax, eax
je 0x140017140
lea rcx, [rsp + 0x280]
or r9, 0xffffffffffffffff
mov r8, rdi
mov edx, 0x104
call fcn.140010790
cmp eax, 0x50
je 0x140017165
lea r8, [rsp + 0x5c]
lea rcx, [rsp + 0x280]
or r9, 0xffffffffffffffff
mov edx, 0x104
call fcn.14001069c
cmp eax, 0x50
je 0x140017165
cmp dword [rsp + 0x20], 0
mov eax, dword [rsp + 0x30]
je 0x1400170d7
test al, 0x10
je 0x1400170d7
lea r8, [0x140020d00]
lea rcx, [rsp + 0x280]
or r9, 0xffffffffffffffff
mov edx, 0x104
call fcn.14001069c
cmp eax, 0x50
je 0x140017165
mov r8d, dword [rsp + 0x20]
lea rcx, [rsp + 0x280]
mov edx, ebx
call fcn.140016ec8
mov ebx, eax
test eax, eax
jmp 0x14001713e
test ebx, ebx
je 0x140017140
test al, 1
jne 0x1400170e7
test al, 2
jne 0x1400170e7
test al, 4
je 0x140017116
lea rcx, [rsp + 0x280]
mov edx, 0x80
call qword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test eax, eax
jne 0x140017116
call qword [sym.imp.KERNEL32.dll_GetLastError]
movzx ebx, ax
or ebx, 0x80070000
test eax, eax
cmovle ebx, eax
test ebx, ebx
js 0x140017186
lea rcx, [rsp + 0x280]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x140017140
call qword [sym.imp.KERNEL32.dll_GetLastError]
movzx ebx, ax
or ebx, 0x80070000
test eax, eax
cmovle ebx, eax
test ebx, ebx
js 0x140017186
lea rdx, [rsp + 0x30]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x14001700a
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x12
jne 0x14001716c
xor ebx, ebx
jmp 0x140017186
mov ebx, 0x8007007a
jmp 0x140017186
movzx ebx, ax
or ebx, 0x80070000
test eax, eax
cmovle ebx, eax
jmp 0x140017186
mov rdi, qword [rsp + 0x28]
mov ebx, 0x8000ffff
cmp rsi, 0xffffffffffffffff
je 0x140017195
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_FindClose]
test ebx, ebx
js 0x1400171ba
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
test eax, eax
jne 0x1400171ba
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 - 0x20]
xor rcx, rsp
call fcn.140010528
mov rbx, qword [rsp + 0x4d8]
add rsp, 0x4a0
pop rdi
pop rsi
pop rbp
ret