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

Disassembly:
mov r11, rsp
push rdi
sub rsp, 0x330
mov qword [rsp + 0x50], 0xfffffffffffffffe
mov qword [r11 + 0x10], rbx
mov qword [r11 + 0x18], rbp
mov qword [r11 + 0x20], rsi
mov rax, qword [0x140099938]
xor rax, rsp
mov qword [rsp + 0x320], rax
mov dword [rsp + 0x40], edx
mov rsi, rcx
mov ebx, 1
mov edi, ebx
mov qword [r11 - 0x270], 7
xor eax, eax
mov qword [r11 - 0x278], rax
mov word [rsp + 0xb0], ax
mov ebp, eax
call fcn.14005b1c0
mov r8, rax
mov rdx, rsi
lea rcx, [rsp + 0xa8]
call fcn.140002280
lea r11d, [rbx + 0x29]
mov word [rsp + 0x30], r11w
mov r9, rbx
xor r8d, r8d
lea rdx, [rsp + 0x30]
lea rcx, [rsp + 0xa8]
call fcn.140020e64
mov ebx, 0x3f
cmp rax, 0xffffffffffffffff
jne 0x140058614
mov word [rsp + 0x30], bx
lea r9d, [rbx - 0x3e]
xor r8d, r8d
lea rdx, [rsp + 0x30]
lea rcx, [rsp + 0xa8]
call fcn.140020e64
cmp rax, 0xffffffffffffffff
jne 0x140058614
lea rcx, [0x140084eb0]
call fcn.14005b1c0
mov r8, rax
lea rdx, [0x140084eb0]
lea rcx, [rsp + 0xa8]
call fcn.14000362c
jmp 0x140058640
mov word [rsp + 0x30], bx
mov r9d, 1
xor r8d, r8d
lea rdx, [rsp + 0x30]
lea rcx, [rsp + 0xa8]
call fcn.140020e64
cmp rax, 0xffffffffffffffff
cmovne ebp, dword [rsp + 0xc0]
lea rcx, [rsp + 0xb0]
cmp qword [rsp + 0xc8], 8
cmovae rcx, qword [rsp + 0xb0]
lea rdx, [rsp + 0xd0]
call qword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov rbx, rax
mov qword [rsp + 0x48], rax
cmp rax, 0xffffffffffffffff
jne 0x1400586ac
lea r8, str._____Not_found._n
lea rdx, str.DeleteDirectoryFilesW
lea ecx, [rax + 6]
call fcn.140009480
nop
cmp qword [rsp + 0xc8], 8
jb 0x1400586a5
mov rcx, qword [rsp + 0xb0]
call fcn.14005ab0c
xor eax, eax
jmp 0x140058a08
mov eax, 0x5c
mov word [rsp + 0x30], ax
mov qword [rsp + 0xa0], 7
xor eax, eax
mov qword [rsp + 0x98], rax
mov word [rsp + 0x88], ax
lea r9d, [rax + 1]
or r8, 0xffffffffffffffff
lea rdx, [rsp + 0x30]
lea rcx, [rsp + 0xa8]
call fcn.140020f70
cmp rax, 0xffffffffffffffff
je 0x14005875d
mov eax, 0x5c
mov word [rsp + 0x38], ax
lea r9d, [rax - 0x5b]
or r8, 0xffffffffffffffff
lea rdx, [rsp + 0x38]
lea rcx, [rsp + 0xa8]
call fcn.140020f70
mov r9, rax
xor r8d, r8d
lea rdx, [rsp + 0x58]
lea rcx, [rsp + 0xa8]
call fcn.140003ab8
nop
or r9, 0xffffffffffffffff
xor r8d, r8d
mov rdx, rax
lea rcx, [rsp + 0x80]
call fcn.140002130
nop
cmp qword [rsp + 0x78], 8
jb 0x140058778
mov rcx, qword [rsp + 0x60]
call fcn.14005ab0c
jmp 0x140058778
mov rcx, rsi
call fcn.14005b1c0
mov r8, rax
mov rdx, rsi
lea rcx, [rsp + 0x80]
call fcn.140002280
lea rcx, [0x1400778f0]
call fcn.14005b1c0
mov r8, rax
lea rdx, [0x1400778f0]
lea rcx, [rsp + 0x80]
call fcn.14000362c
lea rcx, [rsp + 0xfc]
call fcn.14005b1c0
mov r8, rax
lea rdx, [rsp + 0xfc]
lea rcx, [rsp + 0x80]
call fcn.14000362c
lea r9, [rsp + 0x88]
cmp qword [rsp + 0xa0], 8
cmovae r9, qword [rsp + 0x88]
lea r8, str.DeleteFileW__1_ls__._n
lea rdx, str.DeleteDirectoryFilesW
mov ecx, 5
call fcn.140009480
test ebp, ebp
je 0x140058823
mov eax, ebp
cmp rax, qword [rsp + 0x98]
je 0x140058823
cmp qword [rsp + 0xa0], 8
jb 0x140058991
mov rcx, qword [rsp + 0x88]
call fcn.14005ab0c
jmp 0x140058991
lea rcx, [rsp + 0x88]
cmp qword [rsp + 0xa0], 8
cmovae rcx, qword [rsp + 0x88]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x140058979
test al, 0x10
je 0x1400588ec
lea rdx, [0x14007c660]
lea rcx, [rsp + 0xfc]
call fcn.14005c7d4
test eax, eax
je 0x1400588cb
lea rdx, [0x14007c658]
lea rcx, [rsp + 0xfc]
call fcn.14005c7d4
test eax, eax
je 0x1400588cb
lea rcx, [rsp + 0x88]
cmp qword [rsp + 0xa0], 8
cmovae rcx, qword [rsp + 0x88]
mov edx, 1
call fcn.140058528
and edi, eax
cmp qword [rsp + 0xa0], 8
jb 0x140058991
mov rcx, qword [rsp + 0x88]
call fcn.14005ab0c
jmp 0x140058991
cmp qword [rsp + 0xa0], 8
jb 0x140058991
mov rcx, qword [rsp + 0x88]
call fcn.14005ab0c
jmp 0x140058991
and eax, 0xfffffffe
lea rcx, [rsp + 0x88]
cmp qword [rsp + 0xa0], 8
cmovae rcx, qword [rsp + 0x88]
mov edx, eax
call qword [sym.imp.KERNEL32.dll_SetFileAttributesW]
lea rcx, [rsp + 0x88]
cmp qword [rsp + 0xa0], 8
cmovae rcx, qword [rsp + 0x88]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x140058979
xor edi, edi
lea rbx, [rsp + 0x88]
cmp qword [rsp + 0xa0], 8
cmovae rbx, qword [rsp + 0x88]
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x20], eax
mov r9, rbx
lea r8, str.DeleteFileW__1_ls___failed.__0x_2_lx___n
lea rdx, str.DeleteDirectoryFilesW
lea ecx, [rdi + 2]
call fcn.140009480
mov rbx, qword [rsp + 0x48]
cmp qword [rsp + 0xa0], 8
jb 0x140058991
mov rcx, qword [rsp + 0x88]
call fcn.14005ab0c
lea rdx, [rsp + 0xd0]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x1400586b6
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FindClose]
xor ebx, ebx
cmp dword [rsp + 0x40], ebx
je 0x1400589ee
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
cmp eax, ebx
jne 0x1400589ee
mov edi, ebx
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x20], eax
mov r9, rsi
lea r8, str.pRemoveDirectoryW__1_ls___failed.__0x_2_lx___n
lea rdx, str.DeleteDirectoryFilesW
lea ecx, [rbx + 2]
call fcn.140009480
nop
cmp qword [rsp + 0xc8], 8
jb 0x140058a06
mov rcx, qword [rsp + 0xb0]
call fcn.14005ab0c
mov eax, edi
mov rcx, qword [rsp + 0x320]
xor rcx, rsp
call fcn.14005bad0
lea r11, [rsp + 0x330]
mov rbx, qword [r11 + 0x18]
mov rbp, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rsp, r11
pop rdi
ret