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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x57eb9c
mov eax, dword fs:[0]
push eax
sub esp, 0x278
mov eax, dword [0x5e6000]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov dword [ebp - 0x284], edi
call fcn.0041f881
mov ecx, eax
test ecx, ecx
je 0x40f08d
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x264], eax
mov dword [ebp - 4], 0
test edi, edi
je 0x40ecd1
test edi, 0xffff0000
jne 0x40ecb7
movzx eax, di
lea ecx, [ebp - 0x264]
push eax
call fcn.00407a20
jmp 0x40ece0
mov ecx, edi
lea edx, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40ecc0
sub ecx, edx
sar ecx, 1
jmp 0x40ecd3
xor ecx, ecx
push ecx
push edi
lea ecx, [ebp - 0x264]
call fcn.00402c30
push 1
lea eax, [ebp - 0x268]
mov dword [ebp - 4], 1
push eax
lea ecx, [ebp - 0x264]
call fcn.004138c0
mov ecx, 0x5c6cbc
mov eax, dword [eax]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x40ed28
test dx, dx
je 0x40ed24
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x40ed28
add eax, 4
add ecx, 4
test dx, dx
jne 0x40ed02
xor esi, esi
jmp 0x40ed2d
sbb esi, esi
or esi, 1
mov edx, dword [ebp - 0x268]
or ebx, 0xffffffff
add edx, 0xfffffff0
mov eax, ebx
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x40ed4d
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
test esi, esi
je 0x40ed63
push 1
push 0x5c6cbc
lea ecx, [ebp - 0x264]
call fcn.00407440
push 3
push 0x5c6d04
lea ecx, [ebp - 0x264]
call fcn.00407440
mov esi, dword [ebp - 0x264]
lea eax, [ebp - 0x260]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov dword [ebp - 0x268], eax
cmp eax, 0xffffffff
je 0x40f055
lea ecx, [ebp - 0x260]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
je 0x40f033
lea eax, [ebp - 0x260]
push eax
push dword [ebp - 0x268]
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
je 0x40f033
nop dword [eax]
test byte [ebp - 0x260], 0x10
push 0x5c
push esi
je 0x40eec8
call fcn.0055e3be
add esp, 8
test eax, eax
jne 0x40edf1
or eax, 0xffffffff
jmp 0x40edf5
sub eax, esi
sar eax, 1
inc eax
lea ecx, [ebp - 0x264]
push eax
lea eax, [ebp - 0x270]
push eax
call fcn.00402510
mov byte [ebp - 4], 2
lea edi, [esi - 0x10]
mov ecx, dword [eax]
lea edx, [ecx - 0x10]
cmp edx, edi
je 0x40ee70
cmp dword [edi + 0xc], 0
lea esi, [edi + 0xc]
jl 0x40ee5b
mov eax, dword [edx]
cmp eax, dword [edi]
jne 0x40ee5b
push edx
call fcn.00402880
add esp, 4
mov dword [ebp - 0x26c], eax
mov ecx, ebx
lock xadd dword [esi], ecx
dec ecx
test ecx, ecx
jg 0x40ee50
mov ecx, dword [edi]
push edi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, dword [ebp - 0x26c]
lea esi, [eax + 0x10]
mov dword [ebp - 0x264], esi
jmp 0x40ee70
push dword [ecx - 0xc]
push ecx
lea ecx, [ebp - 0x264]
call fcn.00402c30
mov esi, dword [ebp - 0x264]
mov byte [ebp - 4], 1
mov eax, ebx
mov edx, dword [ebp - 0x270]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x40ee91
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
lea eax, [ebp - 0x234]
push eax
lea eax, [ebp - 0x264]
push eax
lea eax, [ebp - 0x274]
push eax
call fcn.004072b0
add esp, 0xc
mov byte [ebp - 4], 3
mov ecx, dword [eax]
call fcn.0040ec40
mov byte [ebp - 4], 1
mov edx, dword [ebp - 0x274]
jmp 0x40effb
call fcn.0055e3be
add esp, 8
test eax, eax
jne 0x40eed9
or eax, 0xffffffff
jmp 0x40eedd
sub eax, esi
sar eax, 1
inc eax
lea ecx, [ebp - 0x264]
push eax
lea eax, [ebp - 0x278]
push eax
call fcn.00402510
mov byte [ebp - 4], 4
lea edi, [esi - 0x10]
mov ecx, dword [eax]
lea edx, [ecx - 0x10]
cmp edx, edi
je 0x40ef58
cmp dword [edi + 0xc], 0
lea esi, [edi + 0xc]
jl 0x40ef43
mov eax, dword [edx]
cmp eax, dword [edi]
jne 0x40ef43
push edx
call fcn.00402880
add esp, 4
mov dword [ebp - 0x26c], eax
mov ecx, ebx
lock xadd dword [esi], ecx
dec ecx
test ecx, ecx
jg 0x40ef38
mov ecx, dword [edi]
push edi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, dword [ebp - 0x26c]
lea esi, [eax + 0x10]
mov dword [ebp - 0x264], esi
jmp 0x40ef58
push dword [ecx - 0xc]
push ecx
lea ecx, [ebp - 0x264]
call fcn.00402c30
mov esi, dword [ebp - 0x264]
mov byte [ebp - 4], 1
mov eax, ebx
mov edx, dword [ebp - 0x278]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x40ef79
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
lea eax, [ebp - 0x234]
push eax
lea eax, [ebp - 0x264]
push eax
lea eax, [ebp - 0x27c]
push eax
call fcn.004072b0
add esp, 0xc
mov edi, dword [eax]
push edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x40efb3
test al, 1
je 0x40efb3
and eax, 0xfffffffe
push eax
push edi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov edx, dword [ebp - 0x27c]
mov eax, ebx
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x40efd0
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
lea eax, [ebp - 0x234]
push eax
lea eax, [ebp - 0x264]
push eax
lea eax, [ebp - 0x280]
push eax
call fcn.004072b0
add esp, 0xc
push dword [eax]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov edx, dword [ebp - 0x280]
mov eax, ebx
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x40f012
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
lea eax, [ebp - 0x260]
push eax
push dword [ebp - 0x268]
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x40edd0
mov edi, dword [ebp - 0x284]
push dword [ebp - 0x268]
call dword [sym.imp.KERNEL32.dll_FindClose]
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
cmp word [edi + eax*2 - 2], 0x5c
je 0x40f055
push edi
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
mov dword [ebp - 4], 0xffffffff
add esi, 0xfffffff0
lock xadd dword [esi + 0xc], ebx
dec ebx
test ebx, ebx
jg 0x40f071
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0055cc1b
mov esp, ebp
pop ebp
ret
push 0x80004005
call fcn.00402be0
int3