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

Disassembly:
push ebp
mov ebp, esp
push ecx
mov ecx, 0xe
push 0
push 0
dec ecx
jne 0x535799
push ecx
xchg dword [ebp - 4], ecx
push ebx
mov dword [ebp - 0xc], ecx
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
mov eax, dword [ebp - 8]
call fcn.00406a38
xor eax, eax
push ebp
push 0x535a78
push dword fs:[eax]
mov dword fs:[eax], esp
lea edx, [ebp - 0x4c]
mov eax, dword [0x543f4c]
mov eax, dword [eax]
call fcn.004bd300
mov eax, dword [ebp - 0x4c]
lea edx, [ebp - 0x48]
call fcn.0041ce98
push dword [ebp - 0x48]
push dword [ebp + 8]
push 0x535a94
lea eax, [ebp - 0x44]
mov edx, 3
call fcn.004075b4
mov eax, dword [ebp - 0x44]
mov dl, 1
call fcn.0041cdb8
test al, al
je 0x5358aa
lea edx, [ebp - 0x58]
mov eax, dword [0x543f4c]
mov eax, dword [eax]
call fcn.004bd300
mov eax, dword [ebp - 0x58]
lea edx, [ebp - 0x54]
call fcn.0041ce98
push dword [ebp - 0x54]
push dword [ebp + 8]
push 0x535a94
lea eax, [ebp - 0x50]
mov edx, 3
call fcn.004075b4
mov eax, dword [ebp - 0x50]
mov dword [ebp - 0x34], eax
mov eax, dword [ebp - 0x34]
call fcn.004072e0
push eax
call sub.kernel32.dll_DeleteFileW
cmp eax, 1
sbb eax, eax
inc eax
mov byte [ebp - 0x35], al
cmp byte [ebp - 0x35], 0
jne 0x5358aa
call sub.kernel32.dll_GetLastError_1
mov dword [ebp - 0x40], eax
mov eax, dword [ebp - 0x34]
call fcn.004072e0
push eax
call sub.kernel32.dll_GetFileAttributesW
mov dword [ebp - 0x3c], eax
cmp dword [ebp - 0x3c], 0xffffffff
je 0x5358a1
test byte [ebp - 0x3b], 4
je 0x5358a1
test byte [ebp - 0x3c], 0x10
je 0x5358a1
mov eax, dword [ebp - 0x34]
call fcn.004072e0
push eax
call sub.kernel32.dll_RemoveDirectoryW
cmp eax, 1
sbb eax, eax
inc eax
mov byte [ebp - 0x35], al
jmp 0x5358aa
mov eax, dword [ebp - 0x40]
push eax
call sub.kernel32.dll_SetLastError
mov dl, 1
mov eax, dword [0x523ff4]
call fcn.00524508
mov dword [ebp - 0x18], eax
push 0
mov ecx, dword [ebp - 0xc]
mov dl, 1
mov eax, dword [0x435c20]
call fcn.0044220c
mov dword [ebp - 0x28], eax
call fcn.00404720
dec eax
sub eax, 5
jl 0x535931
inc eax
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x24], 5
push 0
lea edx, [ebp - 0x60]
mov eax, dword [ebp - 0x24]
call fcn.00404780
mov eax, dword [ebp - 0x60]
lea ecx, [ebp - 0x5c]
mov dx, 0x3d
call fcn.005356f8
mov eax, dword [ebp - 0x5c]
push eax
lea edx, [ebp - 0x68]
mov eax, dword [ebp - 0x24]
call fcn.00404780
mov eax, dword [ebp - 0x68]
lea ecx, [ebp - 0x64]
mov dx, 0x3d
call fcn.00535660
mov edx, dword [ebp - 0x64]
mov eax, dword [ebp - 0x18]
pop ecx
call fcn.00524818
inc dword [ebp - 0x24]
dec dword [ebp - 0x30]
jne 0x5358e3
push 0x535aa8
mov eax, dword [ebp - 0x28]
push eax
mov eax, dword [ebp + 8]
push eax
mov ecx, 0x535ac0
mov edx, 0x535aec
mov eax, dword [ebp - 0x18]
call fcn.0052463c
lea eax, [ebp - 0x10]
push eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x388]
mov ecx, dword [ebp - 0x18]
mov edx, dword [ebp - 8]
call fcn.00532758
mov edx, dword [ebp - 0x10]
mov eax, 0x535b04
call fcn.00407808
mov dword [ebp - 0x1c], eax
mov edx, dword [ebp - 0x10]
mov eax, 0x535b34
call fcn.00407808
mov dword [ebp - 0x20], eax
lea eax, [ebp - 0x14]
push eax
mov ecx, dword [ebp - 0x20]
sub ecx, dword [ebp - 0x1c]
mov edx, dword [ebp - 0x1c]
mov eax, dword [ebp - 0x10]
call fcn.0040769c
lea ecx, [ebp - 0x6c]
mov dx, 0x3d
mov eax, dword [ebp - 0x14]
call fcn.005356f8
mov edx, dword [ebp - 0x6c]
mov eax, 0x54a478
call fcn.00406d14
mov edx, dword [ebp - 0x10]
mov eax, 0x535b60
call fcn.00407808
test eax, eax
jle 0x535a2c
mov dl, 1
mov eax, dword [0x434d0c]
call fcn.0044176c
mov dword [ebp - 0x2c], eax
mov edx, dword [0x54a478]
mov eax, dword [ebp - 0x2c]
mov ecx, dword [eax]
call dword [ecx + 0x38]
lea edx, [ebp - 0x78]
mov eax, dword [0x543f4c]
mov eax, dword [eax]
call fcn.004bd300
mov eax, dword [ebp - 0x78]
lea edx, [ebp - 0x74]
call fcn.0041ce98
push dword [ebp - 0x74]
push dword [ebp + 8]
push 0x535a94
lea eax, [ebp - 0x70]
mov edx, 3
call fcn.004075b4
mov edx, dword [ebp - 0x70]
mov eax, dword [ebp - 0x2c]
mov ecx, dword [eax]
call dword [ecx + 0x7c]
mov eax, dword [ebp - 0x2c]
call fcn.00404f34
mov eax, dword [ebp - 0x18]
call fcn.00404f34
mov eax, dword [ebp - 0x28]
call fcn.00404f34
mov eax, dword [0x543f4c]
mov eax, dword [eax]
call fcn.004bcb74
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x535a7f
lea eax, [ebp - 0x78]
mov edx, 0xe
call fcn.004069b4
lea eax, [ebp - 0x14]
mov edx, 2
call fcn.004069b4
lea eax, [ebp - 8]
call fcn.00406954
ret