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

Disassembly:
sub esp, 0x154
push ebx
push ebp
push esi
mov esi, dword [esp + 0x164]
push edi
mov eax, esi
call fcn.00407060
mov ecx, eax
mov eax, dword [esp + 0x16c]
test al, 8
mov dword [esp + 0x1c], ecx
je 0x406d0a
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
neg eax
sbb eax, eax
add eax, 1
add dword [0x425c88], eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x154
ret 8
mov ebx, eax
and ebx, 1
mov dword [esp + 0x18], ebx
je 0x406d25
test ecx, ecx
je 0x406ea1
test al, 2
je 0x406ea1
push 0x400
push esi
push 0x424738
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
test ebx, ebx
mov edi, dword [sym.imp.KERNEL32.dll_lstrcatA]
je 0x406d4e
push 0x4095e4
push 0x424738
call edi
jmp 0x406d53
call fcn.00406fa0
cmp byte [esi], 0
jne 0x406d61
cmp byte [0x424738], 0x5c
jne 0x406d69
push 0x4092dc
push esi
call edi
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov ebp, eax
lea eax, [esp + 0x20]
push eax
push 0x424738
add ebp, esi
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
cmp eax, 0xffffffff
mov dword [esp + 0x14], eax
je 0x406e95
mov ebx, dword [sym.imp.USER32.dll_CharNextA]
mov cl, byte [esp + 0x4c]
test cl, cl
lea edi, [esp + 0x4c]
mov eax, edi
je 0x406dcb
cmp cl, 0x3f
je 0x406db5
push eax
call ebx
mov cl, byte [eax]
test cl, cl
jne 0x406da5
jmp 0x406dcb
cmp byte [eax], 0
je 0x406dcb
cmp byte [esp + 0x150], 0
je 0x406dcb
lea edi, [esp + 0x150]
cmp byte [edi], 0x2e
jne 0x406de9
mov al, byte [edi + 1]
test al, al
je 0x406e6e
cmp al, 0x2e
jne 0x406de9
cmp byte [edi + 2], 0
je 0x406e6e
push 0x400
push edi
push ebp
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
test byte [esp + 0x20], 0x10
je 0x406e17
mov eax, dword [esp + 0x16c]
mov ecx, eax
and ecx, 3
cmp cl, 3
jne 0x406e6e
push eax
push esi
call fcn.00406cc0
jmp 0x406e6e
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x406e2e
and eax, 0xfffffffe
push eax
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
jne 0x406e62
test byte [esp + 0x16c], 4
je 0x406e59
mov ecx, esi
mov eax, 0xfffffff1
call fcn.00406620
push esi
xor eax, eax
call fcn.004072c0
jmp 0x406e6e
add dword [0x425c88], 1
jmp 0x406e6e
mov ecx, esi
mov eax, 0xfffffff2
call fcn.00406620
mov eax, dword [esp + 0x14]
lea edx, [esp + 0x20]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x406d97
mov ecx, dword [esp + 0x14]
push ecx
call dword [sym.imp.KERNEL32.dll_FindClose]
mov ebx, dword [esp + 0x18]
test ebx, ebx
je 0x406f3a
mov byte [ebp - 1], 0
test ebx, ebx
je 0x406f3a
cmp dword [esp + 0x1c], 0
je 0x406f1a
push 0x4241f8
push esi
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
cmp eax, 0xffffffff
je 0x406f3a
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
call fcn.00406f50
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x406ee4
and eax, 0xfffffffe
push eax
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
push esi
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
test eax, eax
jne 0x406f2e
test byte [esp + 0x16c], 4
je 0x406f1a
mov ecx, esi
mov eax, 0xfffffff1
call fcn.00406620
push esi
xor eax, eax
call fcn.004072c0
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x154
ret 8
add dword [0x425c88], 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x154
ret 8
mov ecx, esi
mov eax, 0xffffffe5
call fcn.00406620
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x154
ret 8