Function at 0x10038990
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
and esp, 0xfffffff8
sub esp, 0x35c
mov eax, dword [0x1008f080]
xor eax, esp
mov dword [esp + 0x358], eax
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
test edi, edi
je 0x10038c2b
push edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x10038c12
not eax
test al, 0x10
jne 0x10038c2b
push 0
call dword [sym.imp.KERNEL32.dll_SetLastError]
push edi
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
test eax, eax
jne 0x10038c12
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x91
jne 0x10038c2b
mov ecx, edi
lea edx, [ecx + 1]
nop
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10038a00
sub ecx, edx
lea eax, [ecx + 5]
cmp eax, 0x104
ja 0x10038c2b
push 0x104
lea eax, [esp + 0x154]
push 0
push eax
call fcn.10049290
add esp, 0xc
lea eax, [esp + 0x150]
push edi
push str._s.
push eax
call fcn.10033770
add esp, 0xc
lea eax, [esp + 0x10]
push eax
lea eax, [esp + 0x154]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov dword [esp + 0xc], eax
cmp eax, 0xffffffff
je 0x10038c2b
lea edx, [esp + 0x150]
mov ecx, edi
sub edx, edi
nop
mov al, byte [ecx]
lea ecx, [ecx + 1]
mov byte [edx + ecx - 1], al
test al, al
jne 0x10038a70
mov ebx, dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
mov esi, dword [esp + 0xc]
nop word [eax + eax]
mov ecx, 0x1007a2fc
lea eax, [esp + 0x3c]
nop dword [eax]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x10038ac0
test dl, dl
je 0x10038abc
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x10038ac0
add eax, 2
add ecx, 2
test dl, dl
jne 0x10038aa0
xor eax, eax
jmp 0x10038ac5
sbb eax, eax
or eax, 1
test eax, eax
je 0x10038bc9
mov ecx, 0x100826e0
lea eax, [esp + 0x3c]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x10038af6
test dl, dl
je 0x10038af2
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x10038af6
add eax, 2
add ecx, 2
test dl, dl
jne 0x10038ad6
xor eax, eax
jmp 0x10038afb
sbb eax, eax
or eax, 1
test eax, eax
je 0x10038bc9
lea ecx, [esp + 0x150]
lea edx, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10038b10
sub ecx, edx
lea edx, [esp + 0x3c]
lea esi, [edx + 1]
mov al, byte [edx]
inc edx
test al, al
jne 0x10038b20
sub edx, esi
lea eax, [edx + 1]
add eax, ecx
cmp eax, 0x104
ja 0x10038bc5
push 0x104
lea eax, [esp + 0x25c]
push 0
push eax
call fcn.10049290
add esp, 0xc
lea eax, [esp + 0x3c]
push eax
lea eax, [esp + 0x154]
push eax
lea eax, [esp + 0x260]
push str._s_s
push eax
call fcn.10033770
mov eax, dword [esp + 0x20]
add esp, 0x10
test al, 0x10
je 0x10038ba4
test al, 1
je 0x10038b90
and eax, 0xfffffffe
push eax
mov dword [esp + 0x14], eax
lea eax, [esp + 0x25c]
push eax
call ebx
lea eax, [esp + 0x258]
mov ecx, 0x100922e0
push eax
call fcn.10038990
jmp 0x10038bc5
test al, 5
je 0x10038bb7
push 0x80
lea eax, [esp + 0x25c]
push eax
call ebx
lea eax, [esp + 0x258]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov esi, dword [esp + 0xc]
lea eax, [esp + 0x10]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x10038a90
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x12
jne 0x10038c2b
push edi
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
test eax, eax
setne al
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x358]
xor ecx, esp
call fcn.10046e53
mov esp, ebp
pop ebp
ret 4
mov al, 1
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x358]
xor ecx, esp
call fcn.10046e53
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [esp + 0x364]
xor al, al
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.10046e53
mov esp, ebp
pop ebp
ret 4