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

Disassembly:
push ebp
mov ebp, esp
mov eax, dword fs:[0]
lea edx, [ebp - 0x678]
push 0xffffffffffffffff
push 0x458b80
push eax
mov dword fs:[0], esp
sub esp, 0x66c
push ebx
mov ebx, dword [ebp + 8]
mov ecx, ebx
push esi
push edi
sub edx, ebx
mov edi, edi
movzx eax, word [ecx]
lea ecx, [ecx + 2]
mov word [edx + ecx - 2], ax
test ax, ax
jne 0x40f410
lea ecx, [ebp - 0x678]
add ecx, 0xfffffffe
lea esp, [esp]
mov ax, word [ecx + 2]
lea ecx, [ecx + 2]
test ax, ax
jne 0x40f430
mov eax, dword [0x462750]
lea edx, [ebp - 0x220]
mov dword [ecx], eax
sub edx, ebx
mov ax, word [0x462754]
mov word [ecx + 4], ax
mov ecx, ebx
jmp 0x40f460
movzx eax, word [ecx]
lea ecx, [ecx + 2]
mov word [edx + ecx - 2], ax
test ax, ax
jne 0x40f460
lea edi, [ebp - 0x220]
add edi, 0xfffffffe
lea esp, [esp]
mov ax, word [edi + 2]
lea edi, [edi + 2]
test ax, ax
jne 0x40f480
mov eax, dword [0x461514]
mov dword [edi], eax
lea eax, [ebp - 0x470]
push eax
lea eax, [ebp - 0x678]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov esi, eax
mov dword [ebp - 0x10], esi
cmp esi, 0xffffffff
je 0x40f729
xor ecx, ecx
jmp 0x40f4c0
movzx eax, word [ebp + ecx - 0x220]
lea ecx, [ecx + 2]
mov word [ebp + ecx - 0x67a], ax
test ax, ax
jne 0x40f4c0
mov ebx, dword [ebp + 0xc]
mov edi, dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
lea eax, [ebp - 0x470]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
je 0x40f73c
test ebx, ebx
je 0x40f512
mov ecx, dword [ebp - 0x454]
xor eax, eax
add eax, dword [ebp - 0x450]
adc ecx, 0
add dword [ebx + 0x10], eax
adc dword [ebx + 0x14], ecx
mov ecx, 0x462db8
lea eax, [ebp - 0x444]
lea ecx, [ecx]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x40f546
test dx, dx
je 0x40f542
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x40f546
add eax, 4
add ecx, 4
test dx, dx
jne 0x40f520
xor eax, eax
jmp 0x40f54b
sbb eax, eax
or eax, 1
test eax, eax
je 0x40f4e1
mov ecx, 0x462dbc
lea eax, [ebp - 0x444]
lea ebx, [ebx]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x40f586
test dx, dx
je 0x40f582
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x40f586
add eax, 4
add ecx, 4
test dx, dx
jne 0x40f560
xor eax, eax
jmp 0x40f58b
sbb eax, eax
or eax, 1
test eax, eax
je 0x40f4e1
lea edx, [ebp - 0x444]
mov esi, edx
jmp 0x40f5a0
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x40f5a0
lea edi, [ebp - 0x220]
sub edx, esi
add edi, 0xfffffffe
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x40f5b6
mov eax, dword [ebp - 0x470]
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
test al, 0x10
je 0x40f623
lea eax, [ebp - 0x220]
push ebx
push eax
call fcn.0040f3e0
add esp, 8
test eax, eax
je 0x40f720
mov edi, dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
lea eax, [ebp - 0x220]
push eax
call edi
xor ecx, ecx
movzx eax, word [ebp + ecx - 0x678]
lea ecx, [ecx + 2]
mov word [ebp + ecx - 0x222], ax
test ax, ax
jne 0x40f603
mov esi, dword [ebp - 0x10]
jmp 0x40f4e1
test al, 1
je 0x40f638
and eax, 0xfffffffe
push eax
lea eax, [ebp - 0x220]
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov edi, dword [sym.imp.KERNEL32.dll_DeleteFileW]
lea eax, [ebp - 0x220]
push eax
call edi
test eax, eax
jne 0x40f6f5
push 0x462dc4
lea ecx, [ebp - 0x14]
call fcn.004054c0
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x220]
push ecx
push eax
lea eax, [ebp - 0x18]
push eax
call fcn.00409410
mov byte [ebp - 4], 1
mov edx, dword [eax]
mov ecx, dword [edx - 8]
add ecx, ecx
mov dword [edx - 4], ecx
push dword [eax]
call edi
test eax, eax
sete bl
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x18]
lea ecx, [eax - 0x20]
cmp ecx, dword [0x476474]
je 0x40f6bb
lea ecx, [eax - 0x20]
or eax, 0xffffffff
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x40f6bb
mov eax, dword [ebp - 0x18]
add eax, 0xffffffe0
push eax
call fcn.004471aa
add esp, 4
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x14]
lea ecx, [eax - 0x20]
cmp ecx, dword [0x476474]
je 0x40f6ee
lea ecx, [eax - 0x20]
or eax, 0xffffffff
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x40f6ee
mov eax, dword [ebp - 0x14]
add eax, 0xffffffe0
push eax
call fcn.004471aa
add esp, 4
test bl, bl
jne 0x40f720
mov ebx, dword [ebp + 0xc]
xor eax, eax
jmp 0x40f700
movzx ecx, word [ebp + eax - 0x678]
lea eax, [eax + 2]
mov word [ebp + eax - 0x222], cx
test cx, cx
jne 0x40f700
mov esi, dword [ebp - 0x10]
jmp 0x40f4db
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_FindClose]
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
push esi
cmp eax, 0x12
jne 0x40f723
call dword [sym.imp.KERNEL32.dll_FindClose]
push dword [ebp + 8]
call edi
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret