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

Disassembly:
sub esp, 0x14c
push ebx
mov ebx, dword [esp + 0x154]
push ebp
push esi
push edi
push ebx
mov dword [esp + 0x1c], ecx
push str._nDelete_in__s_n
call fcn.00403645
add esp, 8
push 0x104
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov edx, eax
mov edi, ebx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov dword [esp + 0x14], edx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, str..
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebp, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebp
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebp
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x1c]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
cmp eax, 0xffffffff
mov dword [esp + 0x10], eax
je 0x4024ce
lea edx, [esp + 0x48]
push 0x40aec0
push edx
call fcn.004035be
add esp, 8
test eax, eax
je 0x4024a4
lea eax, [esp + 0x48]
push 0x40aebc
push eax
call fcn.004035be
add esp, 8
test eax, eax
je 0x4024a4
push 0x104
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov ebp, eax
or ecx, 0xffffffff
mov edi, ebx
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push ebp
mov edx, ecx
mov esi, edi
mov edi, ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, 0x40acec
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edx, ecx
mov edi, ebp
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x4c]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edx, ecx
mov edi, ebp
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
test byte [esp + 0x20], 0x10
je 0x402447
mov ecx, dword [esp + 0x1c]
call fcn.004022e0
push ebp
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
test eax, eax
je 0x4024a4
jmp 0x40249d
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x40249d
cmp eax, 4
je 0x40249d
cmp eax, 0x10
je 0x40249d
push 0x80
push ebp
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
push ebp
push str.remove_file__s_n
call fcn.00403645
add esp, 8
push ebp
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
jne 0x40249d
push 4
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_MoveFileExA]
test eax, eax
jne 0x40249d
push ebp
push str.File_removal_problem:__s_n
call fcn.00403645
add esp, 8
push ebp
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov esi, dword [esp + 0x10]
lea eax, [esp + 0x1c]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x402378
mov ecx, dword [esp + 0x14]
push ecx
call dword [sym.imp.KERNEL32.dll_LocalFree]
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x14c
ret 4