Function at 0x4be250
Capabilities:
Check if file exists
Delete directory
Delete file
Get file attributes

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffe8
push ebx
push esi
push edi
xor edx, edx
mov dword [ebp - 0x18], edx
mov dword [ebp - 0x14], edx
mov dword [ebp - 4], edx
mov dword [ebp - 8], eax
xor eax, eax
push ebp
push 0x4be548
push dword fs:[eax]
mov dword fs:[eax], esp
xor ecx, ecx
push ebp
push 0x4be4f2
push dword fs:[ecx]
mov dword fs:[ecx], esp
mov eax, dword [ebp - 8]
mov eax, dword [eax + 0x390]
mov eax, dword [eax + 0x270]
xor edx, edx
call fcn.004a1de0
mov edx, 0x4be564
call fcn.004a1d3c
mov eax, dword [0x4c72bc]
mov eax, dword [eax]
call fcn.004b7438
mov dl, 1
mov eax, dword [0x4326d8]
call fcn.0043ed88
mov dword [ebp - 0xc], eax
xor edx, edx
mov eax, dword [ebp - 0xc]
call fcn.0043ecc4
lea eax, [ebp - 0xc]
push eax
xor ecx, ecx
mov dl, 1
mov eax, dword [0x4cd284]
call fcn.004bc1ac
mov eax, dword [ebp - 0xc]
mov edx, dword [eax]
call dword [edx + 0x14]
mov edx, eax
mov eax, dword [ebp - 8]
mov eax, dword [eax + 0x38c]
call fcn.004a309c
mov eax, dword [ebp - 8]
mov eax, dword [eax + 0x38c]
xor edx, edx
call fcn.004a3118
mov eax, dword [ebp - 0xc]
mov edx, dword [eax]
call dword [edx + 0x14]
dec eax
cmp eax, 0
jl 0x4be46d
mov dword [ebp - 0x10], eax
lea ecx, [ebp - 4]
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp - 0xc]
mov ebx, dword [eax]
call dword [ebx + 0xc]
mov eax, dword [ebp - 8]
mov eax, dword [eax + 0x390]
mov eax, dword [eax + 0x270]
mov edx, 1
call fcn.004a1de0
mov edx, dword [ebp - 4]
call fcn.004a1d3c
mov eax, dword [0x4c72bc]
mov eax, dword [eax]
call fcn.004b7438
xor ecx, ecx
push ebp
push 0x4be41d
push dword fs:[ecx]
mov dword fs:[ecx], esp
mov edx, dword [ebp - 4]
mov eax, edx
test eax, eax
je 0x4be36e
sub eax, 4
mov eax, dword [eax]
mov ecx, dword [ebp - 4]
cmp word [ecx + eax*2 - 2], 0x5c
jne 0x4be399
mov eax, edx
test eax, eax
je 0x4be384
sub eax, 4
mov eax, dword [eax]
mov edx, eax
dec edx
lea eax, [ebp - 4]
call fcn.004079d0
mov eax, dword [ebp - 4]
call fcn.0041c82c
jmp 0x4be413
mov eax, dword [ebp - 4]
call fcn.0040786c
push eax
call sub.kernel32.dll_DeleteFileW
cmp eax, 1
sbb ebx, ebx
inc ebx
test bl, bl
jne 0x4be3f0
call sub.kernel32.dll_GetLastError_1
mov esi, eax
mov eax, dword [ebp - 4]
call fcn.0040786c
push eax
call sub.kernel32.dll_GetFileAttributesW
cmp eax, 0xffffffff
je 0x4be3ea
test ah, 4
je 0x4be3ea
test al, 0x10
je 0x4be3ea
mov eax, dword [ebp - 4]
call fcn.0040786c
push eax
call sub.kernel32.dll_RemoveDirectoryW_1
cmp eax, 1
sbb ebx, ebx
inc ebx
jmp 0x4be3f0
push esi
call sub.kernel32.dll_SetLastError
test bl, bl
jne 0x4be413
push 1
lea eax, [ebp - 0x14]
mov ecx, dword [ebp - 4]
mov edx, 0x4be5a4
call fcn.00407aa8
mov edx, dword [ebp - 0x14]
mov cl, 1
mov eax, dword [ebp - 8]
call fcn.004be96c
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x4be452
mov eax, dword [ebp - 8]
mov eax, dword [eax + 0x38c]
call fcn.004a31a0
dec dword [ebp - 0x10]
cmp dword [ebp - 0x10], 0xffffffff
jne 0x4be317
mov dl, 1
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax]
call dword [ecx - 4]
xor eax, eax
push ebp
push 0x4be49e
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [0x4cd284]
call fcn.00404844
call fcn.00404528
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x4be4a8
mov eax, dword [ebp - 8]
mov eax, dword [eax + 0x390]
mov eax, dword [eax + 0x270]
xor edx, edx
call fcn.004a1de0
mov edx, 0x4be5d8
call fcn.004a1d3c
mov eax, dword [ebp - 8]
mov eax, dword [eax + 0x390]
mov eax, dword [eax + 0x270]
mov edx, 1
call fcn.004a1de0
xor edx, edx
call fcn.004a1d3c
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x4be525
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4be54f
lea eax, [ebp - 0x18]
mov edx, 2
call fcn.00406f54
lea eax, [ebp - 4]
call fcn.00406ef4
ret