Function at 0x1400044a0
Capabilities:
Check if file exists
Delete directory
Delete file
Enumerate files on windows
Get common file path
Set current directory
Set file attributes

Disassembly:
mov rax, rsp
push rdi
sub rsp, 0x4b0
mov qword [rsp + 0x30], 0xfffffffffffffffe
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rsi
mov rax, qword [0x1400e71f0]
xor rax, rsp
mov qword [rsp + 0x4a0], rax
mov rax, qword [0x1400e92f0]
cmp dword [rax - 0x10], 0
je 0x140004737
mov rax, qword [0x1400e9408]
cmp dword [rax - 0x10], 0
je 0x140004737
mov rax, qword [0x1400e9410]
cmp dword [rax - 0x10], 0
je 0x140004737
call fcn.140015a10
cmp eax, 5
je 0x14000451c
cmp eax, 6
je 0x14000451c
cmp eax, 0xa
je 0x14000451c
mov ecx, 2
jmp 0x140004521
mov ecx, 0x17
call fcn.1400163f0
mov rbx, rax
test rax, rax
je 0x140004737
call fcn.1400696cc
mov r11, rax
xor edi, edi
mov ecx, edi
test rax, rax
setne cl
test ecx, ecx
jne 0x140004553
mov ecx, 0x80004005
call fcn.140001000
int3
mov rax, qword [rax]
mov rcx, r11
call qword [rax + 0x18]
add rax, 0x18
mov qword [rsp + 0x20], rax
mov r9, qword [0x1400e9438]
cmp dword [r9 - 0x10], 0
jne 0x140004590
mov r9, qword [0x1400e92f0]
mov r8, rbx
lea rdx, [0x1400a3e08]
lea rcx, [rsp + 0x20]
call fcn.1400040b0
jmp 0x1400045a4
mov r8, rbx
lea rdx, [0x1400a3e08]
lea rcx, [rsp + 0x20]
call fcn.1400040b0
mov rcx, rbx
call qword [sym.imp.ole32.dll_CoTaskMemFree]
mov rbx, qword [rsp + 0x20]
mov rcx, rbx
call qword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x1400045e4
lea rdx, [rbx - 0x18]
or ebx, 0xffffffff
lock xadd dword [rdx + 0x10], ebx
add ebx, 0xffffffff
test ebx, ebx
jg 0x140004737
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
jmp 0x140004737
call fcn.1400696cc
mov rcx, rax
test rax, rax
setne dil
test edi, edi
jne 0x140004602
mov ecx, 0x80004005
call fcn.140001000
int3
mov rax, qword [rax]
call qword [rax + 0x18]
lea rdi, [rax + 0x18]
mov qword [rsp + 0x28], rdi
lea rdx, [rsp + 0x290]
mov ecx, 0x105
call qword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
test eax, eax
je 0x1400046f1
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
test eax, eax
je 0x1400046f1
lea rdx, [rsp + 0x40]
lea rcx, [0x1400a42e8]
call qword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov rsi, rax
cmp rax, 0xffffffffffffffff
je 0x1400046e3
nop
test byte [rsp + 0x40], 0x10
jne 0x1400046c8
lea rdx, [0x1400a42e0]
lea rcx, [rsp + 0x6c]
call qword [sym.imp.KERNEL32.dll_lstrcmpW]
test eax, eax
je 0x1400046c8
lea rdx, [0x1400a42d8]
lea rcx, [rsp + 0x6c]
call qword [sym.imp.KERNEL32.dll_lstrcmpW]
test eax, eax
je 0x1400046c8
lea r9, [rsp + 0x6c]
mov r8, rbx
lea rdx, [0x1400a3e08]
lea rcx, [rsp + 0x28]
call fcn.1400040b0
mov edx, 0x20
mov rdi, qword [rsp + 0x28]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
lea rdx, [rsp + 0x40]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x140004660
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_FindClose]
lea rcx, [rsp + 0x290]
call qword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
nop
lea rdx, [rdi - 0x18]
or ebx, 0xffffffff
mov eax, ebx
lock xadd dword [rdx + 0x10], eax
add eax, ebx
test eax, eax
jg 0x140004719
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
nop
mov rdx, qword [rsp + 0x20]
add rdx, 0xffffffffffffffe8
lock xadd dword [rdx + 0x10], ebx
add ebx, 0xffffffff
test ebx, ebx
jg 0x140004737
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov rcx, qword [rsp + 0x4a0]
xor rcx, rsp
call fcn.140081050
lea r11, [rsp + 0x4b0]
mov rbx, qword [r11 + 0x10]
mov rsi, qword [r11 + 0x18]
mov rsp, r11
pop rdi
ret