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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x254
mov eax, dword [0x1011040]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
push edi
mov dword [ebp - 0x250], ebx
test ebx, ebx
je 0x1005fa5
cmp byte [ebx], 0
je 0x1005fa5
mov edi, dword [sym.imp.KERNEL32.dll_lstrlenA]
push ebx
call edi
inc eax
inc eax
cmp eax, 0x104
ja 0x1005fa5
push 0x100218c
push ebx
push 0x1001808
lea eax, [ebp - 0x10c]
push 0x105
push eax
call fcn.01003faf
add esp, 0x14
test eax, eax
jl 0x1005fb0
push esi
lea eax, [ebp - 0x24c]
push eax
lea eax, [ebp - 0x10c]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x254], eax
cmp eax, 0xffffffff
jne 0x1005dcf
call esi
cmp eax, 2
je 0x1005f75
call esi
cmp eax, 0x12
je 0x1005f75
call esi
cmp eax, 3
je 0x1005f75
call esi
push eax
push 0x1002160
jmp 0x1005f67
push ebx
call edi
mov ebx, eax
lea eax, [ebp - 0x220]
push eax
call edi
lea ecx, [ebx + eax + 1]
mov eax, 0x104
cmp ecx, eax
jbe 0x1005e0b
push eax
lea eax, [ebp - 0x220]
push eax
push dword [ebp - 0x250]
push 0x1002134
push dword [0x101135c]
call fcn.0100a43e
add esp, 0x14
push dword [ebp - 0x250]
call edi
mov ebx, eax
lea eax, [ebp - 0x220]
push eax
call edi
lea eax, [ebx + eax + 1]
cmp eax, 0x104
ja 0x1005f0a
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcmpA]
push 0x1002130
lea eax, [ebp - 0x220]
push eax
call ebx
test eax, eax
je 0x1005f0a
push 0x100212c
lea eax, [ebp - 0x220]
push eax
call ebx
test eax, eax
je 0x1005f0a
mov ebx, dword [ebp - 0x250]
lea eax, [ebp - 0x220]
push eax
push ebx
push 0x1001808
lea eax, [ebp - 0x10c]
push 0x105
push eax
call fcn.01003faf
add esp, 0x14
test eax, eax
jl 0x1005f10
mov eax, dword [ebp - 0x24c]
test al, 1
je 0x1005eca
and eax, 0xfffffffe
push eax
lea eax, [ebp - 0x10c]
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
test eax, eax
jne 0x1005eca
call esi
push eax
lea eax, [ebp - 0x10c]
push eax
push 0x10020f4
push dword [0x101135c]
call fcn.0100a43e
add esp, 0x10
test byte [ebp - 0x24c], 0x10
lea eax, [ebp - 0x10c]
push eax
je 0x1005ee1
call fcn.01005d0d
jmp 0x1005f10
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
jne 0x1005f10
call esi
push eax
lea eax, [ebp - 0x10c]
push eax
push 0x10020c4
push dword [0x101135c]
call fcn.0100a43e
add esp, 0x10
jmp 0x1005f10
mov ebx, dword [ebp - 0x250]
lea eax, [ebp - 0x24c]
push eax
push dword [ebp - 0x254]
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x1005dcf
call esi
cmp eax, 2
je 0x1005f4f
call esi
cmp eax, 0x12
je 0x1005f4f
call esi
push eax
push 0x100209c
push dword [0x101135c]
call fcn.0100a43e
add esp, 0xc
push dword [ebp - 0x254]
call dword [sym.imp.KERNEL32.dll_FindClose]
test eax, eax
jne 0x1005f75
call esi
push eax
push 0x1002074
push dword [0x101135c]
call fcn.0100a43e
add esp, 0xc
push ebx
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
mov edi, eax
test edi, edi
jne 0x1005fa0
call esi
cmp eax, 3
je 0x1005fa0
call esi
push eax
push ebx
push 0x1002040
push dword [0x101135c]
call fcn.0100a43e
add esp, 0x10
mov eax, edi
pop esi
jmp 0x1005fb2
push 0xa1
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop ebx
call fcn.010096ed
leave
ret 4