Function at 0x1005f970
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, 0x360
mov eax, dword [0x100d1400]
xor eax, ebp
mov dword [ebp - 8], eax
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x1005fbbb
not eax
test al, 0x10
jne 0x1005fbbb
push 0
call dword [sym.imp.KERNEL32.dll_SetLastError]
push ebx
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
test eax, eax
jne 0x1005fbbb
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x91
jne 0x1005fbbb
mov ecx, ebx
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x1005f9d0
sub ecx, edx
lea eax, [ecx + 5]
cmp eax, 0x104
ja 0x1005fbbb
push ebx
lea eax, [ebp - 0x21c]
push str._s.
push eax
call fcn.10055010
add esp, 0xc
lea eax, [ebp - 0x35c]
push eax
lea eax, [ebp - 0x21c]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov dword [ebp - 0x360], eax
cmp eax, 0xffffffff
je 0x1005fbbb
lea edx, [ebp - 0x21c]
mov ecx, ebx
sub edx, ebx
nop dword [eax]
mov al, byte [ecx]
lea ecx, [ecx + 1]
mov byte [edx + ecx - 1], al
test al, al
jne 0x1005fa30
mov edi, dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
mov esi, dword [ebp - 0x360]
nop dword [eax]
mov ecx, 0x100bbff0
lea eax, [ebp - 0x330]
nop dword [eax + eax]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x1005fa80
test dl, dl
je 0x1005fa7c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x1005fa80
add eax, 2
add ecx, 2
test dl, dl
jne 0x1005fa60
xor eax, eax
jmp 0x1005fa85
sbb eax, eax
or eax, 1
test eax, eax
je 0x1005fb8c
mov eax, 0x100c1908
lea ecx, [ebp - 0x330]
mov dl, byte [ecx]
cmp dl, byte [eax]
jne 0x1005fab8
test dl, dl
je 0x1005fab4
mov dl, byte [ecx + 1]
cmp dl, byte [eax + 1]
jne 0x1005fab8
add ecx, 2
add eax, 2
test dl, dl
jne 0x1005fa98
xor eax, eax
jmp 0x1005fabd
sbb eax, eax
or eax, 1
test eax, eax
je 0x1005fb8c
lea ecx, [ebp - 0x21c]
lea edx, [ecx + 1]
nop
mov al, byte [ecx]
inc ecx
test al, al
jne 0x1005fad0
sub ecx, edx
lea edx, [ebp - 0x330]
lea esi, [edx + 1]
mov al, byte [edx]
inc edx
test al, al
jne 0x1005fae2
sub edx, esi
lea eax, [edx + 1]
add eax, ecx
cmp eax, 0x104
ja 0x1005fb86
push 0x104
lea eax, [ebp - 0x114]
push 0
push eax
call fcn.1007d660
add esp, 0xc
lea eax, [ebp - 0x330]
push eax
lea eax, [ebp - 0x21c]
push eax
lea eax, [ebp - 0x114]
push str._s_s
push eax
call fcn.10055010
mov eax, dword [ebp - 0x35c]
add esp, 0x10
test al, 0x10
je 0x1005fb67
test al, 1
je 0x1005fb54
and eax, 0xfffffffe
push eax
mov dword [ebp - 0x35c], eax
lea eax, [ebp - 0x114]
push eax
call edi
lea eax, [ebp - 0x114]
mov ecx, 0x100d3a35
push eax
call fcn.1005f970
jmp 0x1005fb86
test al, 5
je 0x1005fb79
push 0x80
lea eax, [ebp - 0x114]
push eax
call edi
lea eax, [ebp - 0x114]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov esi, dword [ebp - 0x360]
lea eax, [ebp - 0x35c]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x1005fa50
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x12
jne 0x1005fbbb
push ebx
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
mov ecx, dword [ebp - 8]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.1007a635
mov esp, ebp
pop ebp
ret 4