Function at 0x1400129c8
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 [0x140027028]
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 0x140012a22
call qword [sym.imp.KERNEL32.dll_GetLastError]
movzx ebx, ax
or ebx, 0x80070000
test eax, eax
cmovle ebx, eax
test ebx, ebx
js 0x140012c9e
test dil, 0x10
je 0x140012c65
test dil, 1
je 0x140012a60
mov edx, 0x80
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test eax, eax
jne 0x140012a60
call qword [sym.imp.KERNEL32.dll_GetLastError]
movzx ebx, ax
or ebx, 0x80070000
test eax, eax
cmovle ebx, eax
test ebx, ebx
js 0x140012c9e
mov ebx, dword [rsp + 0x20]
mov edi, dword [rsp + 0x24]
test ebx, ebx
jne 0x140012a74
test edi, edi
je 0x140012c7d
or rsi, 0xffffffffffffffff
lea rcx, [rsp + 0x280]
mov r8, rbp
mov r9, rsi
mov edx, 0x104
call fcn.140014638
cmp eax, 0x50
jne 0x140012a9f
mov ebx, 0x8007007a
jmp 0x140012c9e
lea r8, str..
lea rcx, [rsp + 0x280]
mov r9, rsi
mov edx, 0x104
call fcn.14001445c
cmp eax, 0x50
je 0x140012a95
lea rdx, [rsp + 0x30]
lea rcx, [rsp + 0x280]
call qword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov rsi, rax
cmp rax, 0xffffffffffffffff
jne 0x140012afc
call qword [sym.imp.KERNEL32.dll_GetLastError]
movzx ebx, ax
or ebx, 0x80070000
test eax, eax
cmovle ebx, eax
test ebx, ebx
js 0x140012c6a
mov ebx, dword [rsp + 0x20]
lea rdx, [0x140021af0]
lea rcx, [rsp + 0x5c]
call qword [sym.imp.KERNEL32.dll_lstrcmpW]
test eax, eax
je 0x140012c29
lea rdx, [0x140021d18]
lea rcx, [rsp + 0x5c]
call qword [sym.imp.KERNEL32.dll_lstrcmpW]
test eax, eax
je 0x140012c29
lea rcx, [rsp + 0x280]
or r9, 0xffffffffffffffff
mov r8, rbp
mov edx, 0x104
call fcn.140014638
cmp eax, 0x50
je 0x140012c4e
lea r8, [rsp + 0x5c]
lea rcx, [rsp + 0x280]
or r9, 0xffffffffffffffff
mov edx, 0x104
call fcn.14001445c
cmp eax, 0x50
je 0x140012c4e
mov eax, dword [rsp + 0x30]
test edi, edi
je 0x140012bc0
test al, 0x10
je 0x140012bc0
lea r8, [0x140020d30]
lea rcx, [rsp + 0x280]
or r9, 0xffffffffffffffff
mov edx, 0x104
call fcn.14001445c
cmp eax, 0x50
je 0x140012c4e
lea rcx, [rsp + 0x280]
mov r8d, edi
mov edx, ebx
call fcn.1400129c8
mov ebx, eax
test eax, eax
jmp 0x140012c27
test ebx, ebx
je 0x140012c29
test al, 1
jne 0x140012bd0
test al, 2
jne 0x140012bd0
test al, 4
je 0x140012bff
lea rcx, [rsp + 0x280]
mov edx, 0x80
call qword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test eax, eax
jne 0x140012bff
call qword [sym.imp.KERNEL32.dll_GetLastError]
movzx ebx, ax
or ebx, 0x80070000
test eax, eax
cmovle ebx, eax
test ebx, ebx
js 0x140012c6a
lea rcx, [rsp + 0x280]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x140012c29
call qword [sym.imp.KERNEL32.dll_GetLastError]
movzx ebx, ax
or ebx, 0x80070000
test eax, eax
cmovle ebx, eax
test ebx, ebx
js 0x140012c6a
lea rdx, [rsp + 0x30]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x140012af8
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x12
jne 0x140012c55
xor ebx, ebx
jmp 0x140012c6a
mov ebx, 0x8007007a
jmp 0x140012c6a
movzx ebx, ax
or ebx, 0x80070000
test eax, eax
cmovle ebx, eax
jmp 0x140012c6a
mov ebx, 0x8000ffff
cmp rsi, 0xffffffffffffffff
je 0x140012c79
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_FindClose]
test ebx, ebx
js 0x140012c9e
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
test eax, eax
jne 0x140012c9e
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.1400143fc
mov rbx, qword [rsp + 0x4d8]
add rsp, 0x4a0
pop rdi
pop rsi
pop rbp
ret