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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x268
mov eax, dword [0x438008]
xor eax, ebp
mov dword [ebp - 8], eax
or dword [ebp - 0x268], 0xffffffff
lea edx, [ebp - 0x264]
push ebx
push esi
push edi
xor edi, edi
and dword [ebp - 0x264], edi
mov dword [ebp - 0x260], edi
call fcn.0040f587
mov ebx, dword [ebp - 0x264]
mov esi, eax
test esi, esi
js 0x40f32f
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov dword [ebp - 0x264], eax
cmp eax, 0xffffffff
jne 0x40f0fa
call dword [sym.imp.KERNEL32.dll_GetLastError]
movzx esi, ax
or esi, 0x80070000
test eax, eax
cmovle esi, eax
test esi, esi
js 0x40f32f
mov eax, dword [ebp - 0x264]
test al, 0x10
je 0x40f2ea
test al, 1
je 0x40f132
push 0x80
push ebx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test eax, eax
jne 0x40f132
call dword [sym.imp.KERNEL32.dll_GetLastError]
movzx esi, ax
or esi, 0x80070000
test eax, eax
cmovle esi, eax
test esi, esi
js 0x40f32f
push 0
mov edx, ebx
lea ecx, [ebp - 0x260]
call fcn.0040e5b0
mov esi, eax
test esi, esi
js 0x40f2e2
push 0
mov edx, 0x4081e0
lea ecx, [ebp - 0x260]
call fcn.0040e7c6
mov esi, eax
test esi, esi
js 0x40f2e2
mov edi, dword [ebp - 0x260]
lea eax, [ebp - 0x25c]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov dword [ebp - 0x268], eax
cmp eax, 0xffffffff
jne 0x40f1a2
call dword [sym.imp.KERNEL32.dll_GetLastError]
movzx esi, ax
or esi, 0x80070000
test eax, eax
cmovle esi, eax
test esi, esi
js 0x40f301
push 0x2e
pop ecx
cmp cx, word [ebp - 0x230]
jne 0x40f1d3
xor eax, eax
cmp ax, word [ebp - 0x22e]
je 0x40f29d
cmp cx, word [ebp - 0x22e]
jne 0x40f1d3
cmp ax, word [ebp - 0x22c]
je 0x40f29d
xor edi, edi
lea ecx, [ebp - 0x260]
push edi
mov edx, ebx
call fcn.0040e5b0
mov esi, eax
test esi, esi
js 0x40f2da
push edi
lea edx, [ebp - 0x230]
lea ecx, [ebp - 0x260]
call fcn.0040e7c6
mov esi, eax
test esi, esi
js 0x40f2da
test byte [ebp - 0x25c], 0x10
je 0x40f243
push edi
mov edx, 0x407e50
lea ecx, [ebp - 0x260]
call fcn.0040e7c6
mov esi, eax
test esi, esi
js 0x40f2da
mov edi, dword [ebp - 0x260]
xor edx, edx
push 1
inc edx
mov ecx, edi
call fcn.0040f080
mov esi, eax
jmp 0x40f299
test byte [ebp - 0x25c], 7
mov edi, dword [ebp - 0x260]
je 0x40f27a
push 0x80
push edi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test eax, eax
jne 0x40f27a
call dword [sym.imp.KERNEL32.dll_GetLastError]
movzx esi, ax
or esi, 0x80070000
test eax, eax
cmovle esi, eax
test esi, esi
js 0x40f2ef
push edi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x40f29d
call dword [sym.imp.KERNEL32.dll_GetLastError]
movzx esi, ax
or esi, 0x80070000
test eax, eax
cmovle esi, eax
test esi, esi
js 0x40f2ef
lea eax, [ebp - 0x25c]
push eax
push dword [ebp - 0x268]
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
push 0x2e
pop ecx
test eax, eax
jne 0x40f1a5
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x12
jne 0x40f2ca
xor esi, esi
jmp 0x40f2ef
movzx esi, ax
or esi, 0x80070000
test eax, eax
cmovle esi, eax
jmp 0x40f2ef
mov edi, dword [ebp - 0x260]
jmp 0x40f2ef
mov edi, dword [ebp - 0x260]
jmp 0x40f301
mov esi, 0x8000ffff
mov eax, dword [ebp - 0x268]
cmp eax, 0xffffffff
je 0x40f301
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
test edi, edi
je 0x40f30c
mov ecx, edi
call fcn.0040eb78
test esi, esi
js 0x40f32f
push ebx
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
test eax, eax
jne 0x40f32f
call dword [sym.imp.KERNEL32.dll_GetLastError]
movzx esi, ax
or esi, 0x80070000
test eax, eax
cmovle esi, eax
test ebx, ebx
je 0x40f33a
mov ecx, ebx
call fcn.0040eb78
mov ecx, dword [ebp - 8]
mov eax, esi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0041d15a
leave
ret 4