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

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffd8
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x14], ebx
mov dword [ebp - 8], ebx
mov byte [ebp - 0xd], cl
mov dword [ebp - 4], edx
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 4]
call fcn.00407248
xor eax, eax
push ebp
push 0x589987
push dword fs:[eax]
mov dword fs:[eax], esp
xor ebx, ebx
mov eax, dword [ebp - 0xc]
cmp byte [eax + 0x28c], 0
jne 0x58995f
cmp byte [ebp - 0xd], 0
jne 0x589753
push 0x34
push 0x589998
push 0x5899cc
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0x270]
call fcn.00483658
push eax
call sub.user32.dll_MessageBoxW
sub eax, 7
je 0x58974c
jmp 0x589753
xor ebx, ebx
jmp 0x58995f
lea edx, [ebp - 0x14]
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0x27c]
call fcn.0041e3b0
mov edx, dword [ebp - 0x14]
lea eax, [ebp - 8]
mov ecx, dword [ebp - 4]
call fcn.00407dc8
mov dl, 1
mov eax, dword [ebp - 8]
call fcn.0041e058
test al, al
je 0x5897d9
mov eax, dword [ebp - 8]
call fcn.00407b7c
mov edi, eax
push edi
call sub.kernel32.dll_DeleteFileW
cmp eax, 1
sbb eax, eax
inc eax
mov byte [ebp - 0xe], al
cmp byte [ebp - 0xe], 0
jne 0x5897d9
call sub.kernel32.dll_GetLastError_1
mov esi, eax
push edi
call sub.kernel32.dll_GetFileAttributesW
cmp eax, 0xffffffff
je 0x5897d3
test ah, 4
je 0x5897d3
test al, 0x10
je 0x5897d3
mov eax, dword [ebp - 8]
call fcn.00407b7c
push eax
call sub.kernel32.dll_RemoveDirectoryW
cmp eax, 1
sbb eax, eax
inc eax
mov byte [ebp - 0xe], al
jmp 0x5897d9
push esi
call sub.kernel32.dll_SetLastError
push 0xff01
mov ecx, dword [ebp - 8]
mov dl, 1
mov eax, dword [0x437a28]
call fcn.00444098
mov edx, dword [ebp - 0xc]
mov dword [edx + 0x278], eax
xor edx, edx
push ebp
push 0x589956
push dword fs:[edx]
mov dword fs:[edx], esp
mov eax, dword [ebp - 0xc]
mov esi, dword [eax + 0x274]
xor edx, edx
push ebp
push 0x58989d
push dword fs:[edx]
mov dword fs:[edx], esp
mov eax, dword [ebp - 0xc]
mov byte [eax + 0x294], 1
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0x280]
mov edx, 0x589a84
mov ecx, dword [eax]
call dword [ecx + 0x38]
lea eax, [ebp - 0x18]
mov ecx, dword [ebp - 8]
mov edx, 0x589ab0
call fcn.00407dc8
mov edx, dword [ebp - 0x18]
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0x280]
mov ecx, dword [eax]
call dword [ecx + 0x38]
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax + 0x278]
mov eax, dword [ebp - 0xc]
mov edx, dword [eax + 0x290]
mov eax, esi
call fcn.005846d0
mov eax, dword [ebp - 0xc]
cmp byte [eax + 0x294], 0
jne 0x589890
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
call fcn.004069a8
jmp 0x58995f
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x589930
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x58995d
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0x278]
call fcn.00405744
mov eax, dword [ebp - 0xc]
mov byte [eax + 0x294], 0
ret
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x58998e
lea eax, [ebp - 0x20]
mov edx, 4
call fcn.004071c4
lea eax, [ebp - 8]
mov edx, 2
call fcn.004071c4
ret