Function at 0x40f300
Capabilities:
Delete directory
Delete file
Get file attributes
Set file attributes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x587dc0
mov eax, dword fs:[0]
push eax
sub esp, 0x38
push ebx
push esi
push edi
mov eax, dword [0x5ef60c]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
xor edi, edi
mov dword [ebp - 4], edi
mov esi, dword [ebp + 8]
mov eax, dword [esi]
cmp dword [eax - 0xc], edi
mov dword [ebp - 0x18], edi
jg 0x40f34e
push 0x5de3a0
lea ecx, [ebp - 0x1c]
push ecx
mov dword [ebp - 0x1c], edi
call fcn.0055ad30
push esi
call fcn.0040efd0
add esp, 4
cmp eax, edi
jne 0x40f399
push esi
call fcn.0040ef30
xor edx, edx
add esp, 4
cmp eax, edi
sete dl
mov eax, edx
cmp eax, edi
jne 0x40f382
push 0x5de3a0
lea eax, [ebp - 0x20]
push eax
mov dword [ebp - 0x20], edi
call fcn.0055ad30
mov eax, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [esi]
push eax
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
test eax, eax
jne 0x40f382
mov eax, dword [esi]
sub eax, 0x10
push eax
call fcn.00401ff0
lea ecx, [eax + 0x10]
add esp, 4
mov dword [ebp - 0x14], ecx
mov byte [ebp - 4], 1
mov edx, dword [ecx - 0xc]
lea eax, [edx - 1]
cmp eax, edi
jl 0x40f596
cmp eax, edx
jg 0x40f596
movzx eax, word [ecx + eax*2]
cmp ax, 0x5c
je 0x40f3eb
push 0x5b93a4
lea ecx, [ebp - 0x14]
call fcn.00403fe0
push 0x5bb694
lea ecx, [ebp - 0x14]
call fcn.00403fe0
lea ecx, [ebp - 0x44]
call fcn.00469934
mov byte [ebp - 4], 2
mov ecx, dword [ebp - 0x14]
push edi
push ecx
lea ecx, [ebp - 0x44]
call fcn.004699cc
mov ebx, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov edi, eax
lea esp, [esp]
test edi, edi
je 0x40f524
call fcn.00467a9c
mov ecx, dword [eax + 4]
call fcn.00466df4
lea ecx, [ebp - 0x44]
mov byte [ebp - 4], 3
call fcn.004696ab
lea ecx, [ebp - 0x44]
mov edi, eax
call fcn.004698f5
test eax, eax
je 0x40f45d
lea ecx, [ebp + 0xb]
mov byte [ebp - 4], 2
call fcn.004139a0
jmp 0x40f420
mov edx, dword [ebp - 0x44]
mov eax, dword [edx + 0x38]
push 0x10
lea ecx, [ebp - 0x44]
call eax
test eax, eax
jne 0x40f4d2
xor eax, eax
je 0x40f4b8
lea ecx, [ebp - 0x24]
push ecx
lea ecx, [ebp - 0x44]
call fcn.00469bcb
mov esi, eax
mov eax, dword [esi]
push eax
call ebx
test al, 1
je 0x40f496
mov esi, dword [esi]
and eax, 0xfffffffe
push eax
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov eax, dword [ebp - 0x24]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40f4b5
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov esi, dword [ebp + 8]
lea ecx, [ebp - 0x28]
push ecx
lea ecx, [ebp - 0x44]
call fcn.00469bcb
mov eax, dword [eax]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov eax, dword [ebp - 0x28]
jmp 0x40f4f7
lea ecx, [ebp - 0x2c]
push ecx
lea ecx, [ebp - 0x44]
call fcn.00469bcb
push 0
push eax
mov byte [ebp - 4], 4
call fcn.0040f300
mov dword [ebp - 0x18], eax
mov byte [ebp - 4], 3
mov eax, dword [ebp - 0x2c]
add esp, 8
add eax, 0xfffffff0
or ecx, 0xffffffff
lea edx, [eax + 0xc]
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40f513
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [ebp + 0xb]
mov byte [ebp - 4], 2
call fcn.004139a0
jmp 0x40f420
lea ecx, [ebp - 0x44]
call fcn.004695c5
xor eax, eax
je 0x40f546
mov eax, dword [esi]
push eax
call ebx
test al, 1
je 0x40f546
mov ecx, dword [esi]
and eax, 0xfffffffe
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov eax, dword [esi]
push eax
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
lea ecx, [ebp - 0x44]
mov dword [ebp - 0x18], eax
mov byte [ebp - 4], 1
call fcn.0046995d
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x14]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40f581
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0x80070057
call fcn.00401fd0
mov eax, 0x40f581
ret