Function at 0x40e590
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, 0x348
push ebx
push ebp
mov ebp, dword [esp + 0x354]
push edi
test ebp, ebp
je 0x40e7e0
mov edi, ebp
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
je 0x40e7e0
push ebp
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x40e7e0
test bl, 1
je 0x40e5dc
and ebx, 0xfffffffe
push ebx
push ebp
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
test bl, 0x10
je 0x40e7b6
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x251]
mov byte [esp + 0x250], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov edi, ebp
or ecx, 0xffffffff
xor eax, eax
push esi
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x254]
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x254]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
mov dword [esp + 0x114], eax
rep movsb byte es:[edi], byte [esi]
mov edi, 0x64c744
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, 0x4e
lea edi, [esp + 0x118]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea eax, [esp + 0x114]
lea ecx, [esp + 0x254]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x40e78b
mov esi, dword [sym.imp.KERNEL32.dll_lstrcmpA]
lea edx, [esp + 0x140]
push 0x64ca2c
push edx
call esi
test eax, eax
je 0x40e76d
lea eax, [esp + 0x140]
push 0x64ca28
push eax
call esi
test eax, eax
je 0x40e76d
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x11]
mov byte [esp + 0x10], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
or ecx, 0xffffffff
mov edi, ebp
xor eax, eax
lea edx, [esp + 0x10]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
shr ecx, 2
mov edi, edx
lea edx, [esp + 0x10]
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, 0x6463d8
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
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
lea edx, [esp + 0x10]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x140]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
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 eax, dword [esp + 0x360]
mov ecx, edx
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x14]
push ecx
call fcn.0040e590
add esp, 8
lea edx, [esp + 0x114]
push edx
push ebx
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x40e690
push ebx
call dword [sym.imp.KERNEL32.dll_FindClose]
push ebp
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
test eax, eax
pop esi
jne 0x40e7e2
mov ecx, dword [esp + 0x35c]
test ecx, ecx
je 0x40e7e2
push 4
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_MoveFileExA]
pop edi
pop ebp
pop ebx
add esp, 0x348
ret
push ebp
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
jne 0x40e7e2
mov ecx, dword [esp + 0x35c]
test ecx, ecx
je 0x40e7e2
push 4
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_MoveFileExA]
pop edi
pop ebp
pop ebx
add esp, 0x348
ret
xor eax, eax
pop edi
pop ebp
pop ebx
add esp, 0x348
ret