Function at 0x497080
Capabilities:
Delete directory
Delete file
Enumerate files on windows
Enumerate files recursively
Get file attributes
Set file attributes

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x12b8
call fcn.004fa800
mov eax, dword [0x5954a0]
xor eax, ebp
mov dword [ebp - 4], eax
xor eax, eax
mov word [ebp - 0x1008], ax
push 0x7fe
push 0
lea ecx, [ebp - 0x1006]
push ecx
call fcn.004f8090
add esp, 0xc
xor edx, edx
mov word [ebp - 0x808], dx
push 0x7fe
push 0
lea eax, [ebp - 0x806]
push eax
call fcn.004f8090
add esp, 0xc
mov ecx, dword [ebp + 8]
push ecx
call fcn.004f810a
add esp, 4
mov edx, dword [ebp + 8]
movzx eax, word [edx + eax*2 - 2]
cmp eax, 0x5c
je 0x4970fd
push 0x5668c0
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcatW]
mov edx, dword [ebp + 8]
push edx
lea eax, [ebp - 0x808]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
push 0x545040
lea ecx, [ebp - 0x808]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcatW]
push 0x250
push 0
lea edx, [ebp - 0x1260]
push edx
call fcn.004f8090
add esp, 0xc
lea eax, [ebp - 0x1260]
push eax
lea ecx, [ebp - 0x808]
push ecx
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov dword [ebp - 0x1010], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x100c], eax
cmp dword [ebp - 0x1010], 0xffffffff
je 0x49716e
cmp dword [ebp - 0x1010], 0
jne 0x497175
xor al, al
jmp 0x49737c
push 0x548c24
lea edx, [ebp - 0x1234]
push edx
call fcn.004f937f
add esp, 8
test eax, eax
je 0x4971a5
push 0x545060
lea eax, [ebp - 0x1234]
push eax
call fcn.004f937f
add esp, 8
test eax, eax
jne 0x4971aa
jmp 0x497347
mov ecx, dword [ebp + 8]
push ecx
lea edx, [ebp - 0x1008]
push edx
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
lea eax, [ebp - 0x1234]
push eax
lea ecx, [ebp - 0x1008]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcatW]
lea edx, [ebp - 0x1008]
push edx
lea ecx, [ebp - 0x126c]
call fcn.0044f380
mov eax, dword [ebp - 0x126c]
mov dword [ebp - 0x1288], eax
push 0x2e
mov ecx, dword [ebp - 0x1288]
push ecx
call fcn.004f8f45
add esp, 8
mov dword [ebp - 0x1284], eax
cmp dword [ebp - 0x1284], 0
jne 0x497219
mov dword [ebp - 0x12b8], 0xffffffff
jmp 0x49722d
mov edx, dword [ebp - 0x1284]
sub edx, dword [ebp - 0x126c]
sar edx, 1
mov dword [ebp - 0x12b8], edx
mov eax, dword [ebp - 0x12b8]
mov dword [ebp - 0x1264], eax
cmp dword [ebp - 0x1264], 0xffffffff
je 0x4972d2
mov ecx, dword [ebp - 0x126c]
mov edx, dword [ecx - 0xc]
mov dword [ebp - 0x128c], edx
mov eax, dword [ebp - 0x128c]
sub eax, dword [ebp - 0x1264]
push eax
lea ecx, [ebp - 0x1270]
push ecx
lea ecx, [ebp - 0x126c]
call fcn.0044e690
lea ecx, [ebp - 0x1270]
call fcn.00470330
mov ecx, eax
call fcn.004703c0
lea ecx, [ebp - 0x1270]
call fcn.0046f9b0
lea edx, [ebp - 0x1270]
push edx
push str..dat
call fcn.0046fdf0
add esp, 8
movzx eax, al
test eax, eax
je 0x4972c7
lea ecx, [ebp - 0x1270]
call fcn.0044f990
lea ecx, [ebp - 0x126c]
call fcn.0044f990
jmp 0x497347
lea ecx, [ebp - 0x1270]
call fcn.0044f990
lea ecx, [ebp - 0x1008]
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov dword [ebp - 0x1268], eax
mov edx, dword [ebp - 0x1268]
and edx, 0x10
je 0x497301
lea eax, [ebp - 0x1008]
push eax
call fcn.00497080
add esp, 4
jmp 0x49733c
mov ecx, dword [ebp - 0x1268]
and ecx, 1
je 0x49732f
mov edx, dword [ebp - 0x1268]
and edx, 0xfffffffe
mov dword [ebp - 0x1268], edx
mov eax, dword [ebp - 0x1268]
push eax
lea ecx, [ebp - 0x1008]
push ecx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
lea edx, [ebp - 0x1008]
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
lea ecx, [ebp - 0x126c]
call fcn.0044f990
lea eax, [ebp - 0x1260]
push eax
mov ecx, dword [ebp - 0x1010]
push ecx
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x497175
mov edx, dword [ebp - 0x1010]
push edx
call dword [sym.imp.KERNEL32.dll_FindClose]
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
mov al, 1
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004f8124
mov esp, ebp
pop ebp
ret