Function at 0x407a60
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, 0x150
push ebx
push esi
push edi
push 0x2000
call dword [sym.imp.msvcrt.dll_malloc]
mov esi, dword [esp + 0x164]
add esp, 4
mov edi, eax
push esi
mov dword [esp + 0x10], edi
call fcn.00407450
mov ebx, dword [esp + 0x164]
test bl, 8
mov dword [esp + 0x18], eax
je 0x407ab3
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
neg eax
sbb eax, eax
add eax, 1
add dword [0x43d8c8], eax
jmp 0x407d09
push ebp
mov ebp, ebx
and ebp, 1
mov dword [esp + 0x18], ebp
je 0x407ad0
test eax, eax
je 0x407c72
test bl, 2
je 0x407c72
push 0x2000
push esi
push edi
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
test ebp, ebp
mov edi, dword [sym.imp.KERNEL32.dll_lstrcatA]
je 0x407af5
mov eax, dword [esp + 0x10]
push str..
push eax
call edi
jmp 0x407afb
push esi
call fcn.00407420
cmp byte [esi], 0
jne 0x407b09
mov ecx, dword [esp + 0x10]
cmp byte [ecx], 0x5c
jne 0x407b11
push 0x40a58c
push esi
call edi
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov ebx, eax
mov eax, dword [esp + 0x10]
lea edx, [esp + 0x20]
push edx
push eax
add ebx, esi
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
cmp eax, 0xffffffff
mov dword [esp + 0x14], eax
je 0x407c5f
mov ebp, dword [sym.imp.USER32.dll_CharNextA]
nop
mov cl, byte [esp + 0x4c]
test cl, cl
lea edi, [esp + 0x4c]
mov eax, edi
je 0x407b76
mov edi, edi
cmp cl, 0x3f
je 0x407b60
push eax
call ebp
mov cl, byte [eax]
test cl, cl
jne 0x407b50
jmp 0x407b76
cmp byte [eax], 0
je 0x407b76
cmp byte [esp + 0x150], 0
je 0x407b76
lea edi, [esp + 0x150]
cmp byte [edi], 0x2e
jne 0x407b94
mov al, byte [edi + 1]
test al, al
je 0x407c38
cmp al, 0x2e
jne 0x407b94
cmp byte [edi + 2], 0
je 0x407c38
push 0x2000
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
test byte [esp + 0x20], 0x10
je 0x407bc2
mov eax, dword [esp + 0x168]
mov ecx, eax
and ecx, 3
cmp cl, 3
jne 0x407c38
push eax
push esi
call fcn.00407a60
jmp 0x407c38
push esi
push str.Delete:_DeleteFile___s__
call fcn.004072f0
add esp, 8
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x407be6
and al, 0xfe
push eax
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
push esi
jne 0x407c31
test byte [esp + 0x16c], 4
je 0x407c1b
push str.Delete:_DeleteFile_on_Reboot___s__
call fcn.004072f0
add esp, 8
push esi
push 0xfffffffffffffff1
call fcn.00405cb0
push 0
push esi
call fcn.00407860
jmp 0x407c38
push str.Delete:_DeleteFile_failed___s__
call fcn.004072f0
add esp, 8
add dword [0x43d8c8], 1
jmp 0x407c38
push 0xfffffffffffffff2
call fcn.00405cb0
mov eax, dword [esp + 0x14]
lea edx, [esp + 0x20]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x407b40
mov ecx, dword [esp + 0x14]
push ecx
call dword [sym.imp.KERNEL32.dll_FindClose]
mov ebp, dword [esp + 0x18]
test ebp, ebp
mov edi, dword [esp + 0x10]
je 0x407c6b
mov byte [ebx - 1], 0
mov ebx, dword [esp + 0x168]
test ebp, ebp
pop ebp
je 0x407d09
cmp dword [esp + 0x18], 0
push esi
jne 0x407c99
push str.RMDir:_RemoveDirectory_invalid_input___s__
call fcn.004072f0
add esp, 8
add dword [0x43d8c8], 1
jmp 0x407d09
call fcn.00407330
test eax, eax
je 0x407d09
push esi
call fcn.004073f0
push esi
push str.RMDir:_RemoveDirectory___s__
call fcn.004072f0
add esp, 8
push esi
call fcn.00406e00
push esi
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
test eax, eax
push esi
jne 0x407d02
test bl, 4
je 0x407cec
push str.RMDir:_RemoveDirectory_on_Reboot___s__
call fcn.004072f0
add esp, 8
push esi
push 0xfffffffffffffff1
call fcn.00405cb0
push 0
push esi
call fcn.00407860
jmp 0x407d09
push str.RMDir:_RemoveDirectory_failed___s__
call fcn.004072f0
add esp, 8
add dword [0x43d8c8], 1
jmp 0x407d09
push 0xffffffffffffffe5
call fcn.00405cb0
push edi
call dword [sym.imp.msvcrt.dll_free]
add esp, 4
pop edi
pop esi
pop ebx
add esp, 0x150
ret 8