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

Disassembly:
push rbx
push rbp
push rdi
sub rsp, 0x6b0
mov rax, qword [0x1800cb660]
xor rax, rsp
mov qword [rsp + 0x6a0], rax
mov qword [rsp + 0x20], r8
mov rbp, rdx
mov rbx, rcx
test rcx, rcx
je 0x1800124e7
or rcx, 0xffffffffffffffff
xor eax, eax
mov rdi, rbx
repne scasw ax, word [rdi]
not rcx
dec rcx
je 0x1800124e7
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov edi, eax
cmp eax, 0xffffffff
je 0x1800124e7
mov qword [rsp + 0x6e8], rsi
test al, 1
je 0x1800122c7
and edi, 0xfffffffe
mov rcx, rbx
mov edx, edi
call qword [sym.imp.KERNEL32.dll_SetFileAttributesW]
xor esi, esi
test dil, 0x10
je 0x1800124a9
lea rcx, [rsp + 0x492]
xor edx, edx
mov r8d, 0x206
mov word [rsp + 0x490], si
call fcn.180037550
lea rcx, [rsp + 0x490]
sub rcx, rbx
mov rdx, rbx
nop
movzx eax, word [rdx]
add rdx, 2
mov word [rcx + rdx - 2], ax
test ax, ax
jne 0x180012300
xor eax, eax
or rcx, 0xffffffffffffffff
lea rdi, [rsp + 0x490]
repne scasw ax, word [rdi]
mov eax, dword [0x1800a6d48]
lea rcx, [rsp + 0x34]
mov dword [rdi - 2], eax
movzx eax, word [0x1800a6d4c]
xor edx, edx
mov r8d, 0x24c
mov dword [rsp + 0x30], esi
mov word [rdi + 2], ax
call fcn.180037550
lea rdx, [rsp + 0x30]
lea rcx, [rsp + 0x490]
call qword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov rdi, rax
mov qword [rsp + 0x28], rax
cmp rax, 0xffffffffffffffff
je 0x18001246b
lea rdx, [0x1800a6d7c]
lea rcx, [rsp + 0x5c]
call qword [sym.imp.KERNEL32.dll_lstrcmpW]
test eax, eax
je 0x18001244c
lea rdx, [0x1800a6d84]
lea rcx, [rsp + 0x5c]
call qword [sym.imp.KERNEL32.dll_lstrcmpW]
test eax, eax
je 0x18001244c
lea rcx, [rsp + 0x282]
xor edx, edx
mov r8d, 0x206
mov word [rsp + 0x280], si
call fcn.180037550
lea rcx, [rsp + 0x280]
sub rcx, rbx
mov rdx, rbx
movzx eax, word [rdx]
add rdx, 2
mov word [rcx + rdx - 2], ax
test ax, ax
jne 0x1800123d0
xor eax, eax
or rcx, 0xffffffffffffffff
lea rdi, [rsp + 0x280]
repne scasw ax, word [rdi]
mov eax, dword [0x1800a0b28]
or rcx, 0xffffffffffffffff
mov dword [rdi - 2], eax
xor eax, eax
lea rdi, [rsp + 0x280]
repne scasw ax, word [rdi]
xor ecx, ecx
lea rdx, [rsp + 0x5c]
nop word [rax + rax]
movzx eax, word [rdx + rcx]
add rcx, 2
mov word [rdi + rcx - 4], ax
test ax, ax
jne 0x180012420
mov r8, qword [rsp + 0x20]
lea rcx, [rsp + 0x280]
mov rdx, rbp
call fcn.180012250
mov rdi, qword [rsp + 0x28]
lea rdx, [rsp + 0x30]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x180012371
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_FindClose]
test rbp, rbp
je 0x180012494
mov rax, qword [rsp + 0x20]
test rax, rax
je 0x180012494
mov r8, rax
mov rdx, rbp
mov rcx, rbx
call fcn.180033e90
mov esi, eax
mov rsi, qword [rsp + 0x6e8]
jmp 0x1800124e9
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
mov esi, eax
mov rsi, qword [rsp + 0x6e8]
jmp 0x1800124e9
test rbp, rbp
je 0x1800124d2
mov rax, qword [rsp + 0x20]
test rax, rax
je 0x1800124d2
mov r8, rax
mov rdx, rbp
mov rcx, rbx
call fcn.180033e80
mov eax, esi
mov rsi, qword [rsp + 0x6e8]
jmp 0x1800124e9
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
mov esi, eax
mov rsi, qword [rsp + 0x6e8]
jmp 0x1800124e9
xor eax, eax
mov rcx, qword [rsp + 0x6a0]
xor rcx, rsp
call fcn.1800356a0
add rsp, 0x6b0
pop rdi
pop rbp
pop rbx
ret