Function at 0x40f640
Capabilities:
Delete directory
Delete file
Enumerate files on windows
Enumerate files recursively
Get file attributes
Set file attributes

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x25c
mov eax, dword [0x42482c]
push ebx
mov ebx, dword [ebp + 8]
xor eax, ebp
push esi
push edi
mov dword [esp + 0x264], eax
mov byte [esp + 0x158], 0
xor eax, eax
mov ecx, 0x40
lea edi, [esp + 0x159]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push ebx
mov dword [esp + 0x14], ebx
stosb byte es:[edi], al
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
test al, 0x10
jne 0x40f6b8
push 0x80
push ebx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
push ebx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
neg eax
sbb eax, eax
neg eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x258]
xor ecx, ebp
call fcn.004144ff
mov esp, ebp
pop ebp
ret
mov esi, dword [sym.imp.KERNEL32.dll_lstrlenA]
push ebx
call esi
test eax, eax
je 0x40f88b
push ebx
call esi
cmp eax, 0xff
jbe 0x40f6f2
push 0x6f
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x258]
xor ecx, ebp
call fcn.004144ff
mov esp, ebp
pop ebp
ret
push 0x103
lea eax, [esp + 0x15c]
push ebx
push eax
call fcn.00414950
add esp, 0xc
lea ecx, [esp + 0x158]
push ecx
call esi
lea edx, [esp + 0x158]
push 0x5c
push edx
lea edi, [esp + eax + 0x160]
call fcn.004152f0
add esp, 8
cmp eax, edi
je 0x40f748
lea edi, [esp + 0x158]
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x40f737
mov ax, word [0x41f434]
mov word [edi], ax
lea edi, [esp + 0x158]
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x40f750
mov ecx, dword [0x41fcf0]
lea edx, [esp + 0x18]
push edx
lea eax, [esp + 0x15c]
push eax
mov dword [edi], ecx
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
cmp eax, 0xffffffff
mov dword [esp + 0x14], eax
je 0x40f88b
mov ebx, dword [ebp + 0x10]
mov ecx, dword [esp + 0x10]
push 0x103
push ecx
lea edx, [esp + 0x160]
push edx
call fcn.00414950
add esp, 0xc
lea eax, [esp + 0x44]
push eax
call esi
lea ecx, [esp + 0x158]
push ecx
mov edi, eax
call esi
add edi, eax
cmp edi, 0x103
ja 0x40f80f
lea edi, [esp + 0x158]
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x40f7c2
mov dx, word [0x41f434]
lea eax, [esp + 0x44]
mov word [edi], dx
mov edx, eax
lea ebx, [ebx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40f7e0
lea edi, [esp + 0x158]
sub eax, edx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x40f7f1
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [sym.imp.KERNEL32.dll_lstrlenA]
test byte [esp + 0x18], 0x10
je 0x40f83c
cmp byte [esp + 0x44], 0x2e
je 0x40f861
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x40f861
push ebx
push eax
lea eax, [esp + 0x160]
push eax
call fcn.0040f640
add esp, 0xc
test eax, eax
je 0x40f88b
jmp 0x40f861
push 0x80
lea ecx, [esp + 0x15c]
push ecx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
test ebx, ebx
jne 0x40f861
lea edx, [esp + 0x158]
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov edi, dword [esp + 0x14]
lea eax, [esp + 0x18]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x40f783
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x12
push edi
je 0x40f8a2
call dword [sym.imp.KERNEL32.dll_FindClose]
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x258]
xor ecx, ebp
call fcn.004144ff
mov esp, ebp
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_FindClose]
test eax, eax
je 0x40f88b
mov esi, dword [esp + 0x10]
push 0x80
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
push esi
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
mov ecx, dword [esp + 0x264]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004144ff
mov esp, ebp
pop ebp
ret