Function at 0x408640
Capabilities:
Delete file
Enumerate files on windows
Set file attributes

Disassembly:
sub esp, 0x260
push ebx
push ebp
mov ebp, dword [esp + 0x26c]
xor ebx, ebx
push esi
cmp ebp, ebx
push edi
mov dword [esp + 0x14], ebx
mov dword [esp + 0x10], ebx
lea edx, [esp + 0x2c]
je 0x4086b0
mov edi, 0x419460
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x2c]
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..inv
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
jmp 0x4086cd
mov edi, str..inv
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
lea edx, [esp + 0x2c]
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x130]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov esi, eax
cmp esi, 0xffffffff
mov dword [esp + 0x18], esi
je 0x4087fb
xor ebp, ebp
test byte [esp + 0x130], 0x10
jne 0x4087d6
mov eax, dword [esp + 0x144]
test eax, eax
jne 0x408729
mov eax, dword [esp + 0x148]
test eax, eax
jne 0x408729
lea eax, [esp + 0x1c]
lea ecx, [esp + 0x134]
push eax
push ecx
jmp 0x408736
lea edx, [esp + 0x1c]
lea eax, [esp + 0x144]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_FileTimeToSystemTime]
mov edx, dword [esp + 0x1e]
mov eax, dword [esp + 0x1c]
and edx, 0xffff
and eax, 0xffff
imul edx, edx, 0x1f
lea ecx, [eax + eax*8]
lea eax, [eax + ecx*8]
mov ecx, dword [esp + 0x14]
lea esi, [eax + eax*4]
mov eax, dword [esp + 0x22]
add esi, edx
and eax, 0xffff
add esi, eax
mov eax, dword [esp + 0x10]
cmp ecx, eax
jl 0x40879b
lea edx, [ebp + 0x7000]
push edx
push ebx
call dword [sym.imp.MSVCRT.dll_realloc]
mov ebx, eax
mov ecx, 0x1c00
xor eax, eax
add esp, 8
lea edi, [ebx + ebp]
rep stosd dword es:[edi], eax
add dword [esp + 0x10], 0x400
lea edi, [esp + 0x15c]
or ecx, 0xffffffff
xor eax, eax
mov dword [ebx + ebp], esi
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [ebx + ebp + 4]
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x14]
mov esi, dword [esp + 0x18]
inc ecx
add ebp, 0x1c
mov dword [esp + 0x14], ecx
lea ecx, [esp + 0x130]
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x4086f6
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
mov ebp, dword [esp + 0x274]
mov edi, dword [esp + 0x14]
push 0x408900
push 0x1c
push edi
push ebx
call dword [sym.imp.MSVCRT.dll_qsort]
add esp, 0x10
cmp edi, ebp
jle 0x4088ed
test ebp, ebp
je 0x4088c1
cmp ebp, edi
jge 0x4088e3
mov ecx, dword [esp + 0x274]
lea edx, [ebp*8]
mov eax, edi
sub edx, ebp
sub eax, ecx
lea ebp, [ebx + edx*4 + 4]
mov dword [esp + 0x10], eax
mov edi, 0x419460
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x2c]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push 0x80
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x30]
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, ebp
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 eax, [esp + 0x30]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
lea ecx, [esp + 0x2c]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov eax, dword [esp + 0x10]
add ebp, 0x1c
dec eax
mov dword [esp + 0x10], eax
jne 0x408845
jmp 0x4088e3
test edi, edi
jle 0x4088e3
mov ebp, dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
lea esi, [ebx + 4]
push 0x80
push esi
call ebp
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
add esi, 0x1c
dec edi
jne 0x4088ce
push ebx
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x260
ret