Function at 0x525c28
Capabilities:
Check if file exists
Delete directory
Delete file
Print debug messages

Disassembly:
push ebp
mov ebp, esp
mov ecx, 7
push 0
push 0
dec ecx
jne 0x525c30
push ebx
push esi
push edi
mov dword [ebp - 4], eax
xor eax, eax
push ebp
push 0x525ebf
push dword fs:[eax]
mov dword fs:[eax], esp
xor eax, eax
push ebp
push 0x525e80
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 4]
mov eax, dword [eax + 4]
mov edx, dword [eax]
call dword [edx + 0x14]
dec eax
cmp eax, 0
jl 0x525dbb
mov dword [ebp - 8], eax
xor eax, eax
push ebp
push 0x525d4f
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 4]
cmp dword [eax + 0x20], 0
je 0x525d1c
lea ecx, [ebp - 0x20]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 4]
mov edx, dword [ebp - 8]
mov ebx, dword [eax]
call dword [ebx + 0xc]
mov edx, dword [ebp - 0x20]
lea eax, [ebp - 0x1c]
mov ecx, 0
call fcn.00407940
mov edx, dword [ebp - 0x1c]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x20]
call fcn.0050ecf0
lea ecx, [ebp - 0x28]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 4]
mov edx, dword [ebp - 8]
mov ebx, dword [eax]
call dword [ebx + 0xc]
mov ecx, dword [ebp - 0x28]
lea eax, [ebp - 0x24]
mov edx, 0x525edc
call fcn.00407d98
mov eax, dword [ebp - 0x24]
call fcn.00407b34
push eax
call sub.kernel32.dll_OutputDebugStringW
xor eax, eax
push ebp
push 0x525d10
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 4]
mov eax, dword [eax + 4]
mov edx, dword [ebp - 8]
mov ecx, dword [eax]
call dword [ecx + 0x48]
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x525d45
lea edx, [ebp - 0x2c]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x20]
call fcn.0050e558
lea eax, [ebp - 0x2c]
mov edx, 0x525ef0
call fcn.00407d40
mov eax, dword [ebp - 0x2c]
call fcn.00407b34
push eax
call sub.kernel32.dll_OutputDebugStringW
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x525dae
dec dword [ebp - 8]
cmp dword [ebp - 8], 0xffffffff
jne 0x525c71
mov eax, dword [ebp - 4]
mov eax, dword [eax + 4]
mov edx, dword [eax]
call dword [edx + 0x14]
test eax, eax
jne 0x525e52
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x1c]
mov dl, 1
call fcn.0041d1e0
test al, al
je 0x525e52
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x1c]
call fcn.00407b34
push eax
call sub.kernel32.dll_DeleteFileW
cmp eax, 1
sbb eax, eax
inc eax
mov byte [ebp - 0xd], al
cmp byte [ebp - 0xd], 0
jne 0x525e52
call sub.kernel32.dll_GetLastError_1
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x1c]
call fcn.00407b34
push eax
call sub.kernel32.dll_GetFileAttributesW
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0xffffffff
je 0x525e49
test byte [ebp - 0x13], 4
je 0x525e49
test byte [ebp - 0x14], 0x10
je 0x525e49
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x1c]
call fcn.00407b34
push eax
call sub.kernel32.dll_RemoveDirectoryW
cmp eax, 1
sbb eax, eax
inc eax
mov byte [ebp - 0xd], al
jmp 0x525e52
mov eax, dword [ebp - 0x18]
push eax
call sub.kernel32.dll_SetLastError
mov eax, dword [ebp - 4]
mov eax, dword [eax + 4]
mov edx, dword [eax]
call dword [edx + 0x14]
test eax, eax
jle 0x525e72
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0x1c]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 4]
mov ecx, dword [eax]
call dword [ecx + 0x7c]
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x525e87
ret