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

Disassembly:
push ebp
mov ebp, esp
mov ecx, 0xf
push 0
push 0
dec ecx
jne 0x588cec
push ebx
push esi
push edi
mov dword [ebp - 4], edx
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 4]
call fcn.00407248
xor eax, eax
push ebp
push 0x58926b
push dword fs:[eax]
mov dword fs:[eax], esp
mov byte [ebp - 0x1d], 0
mov eax, dword [ebp - 0x1c]
cmp byte [eax + 0x28c], 0
jne 0x589243
lea edx, [ebp - 0x54]
mov eax, dword [ebp - 0x1c]
mov eax, dword [eax + 0x27c]
call fcn.0041e3b0
mov edx, dword [ebp - 0x54]
lea eax, [ebp - 8]
mov ecx, 0x58928c
call fcn.00407dc8
lea edx, [ebp - 0x58]
mov eax, dword [ebp - 0x1c]
mov eax, dword [eax + 0x27c]
call fcn.0041e3b0
mov edx, dword [ebp - 0x58]
lea eax, [ebp - 0xc]
mov ecx, 0x5892b4
call fcn.00407dc8
mov dl, 1
mov eax, dword [ebp - 8]
call fcn.0041e058
test al, al
je 0x588dcd
mov eax, dword [ebp - 8]
call fcn.00407b7c
push eax
call sub.kernel32.dll_DeleteFileW
cmp eax, 1
sbb ebx, ebx
inc ebx
test bl, bl
jne 0x588dcd
call sub.kernel32.dll_GetLastError_1
mov esi, eax
mov eax, dword [ebp - 8]
call fcn.00407b7c
push eax
call sub.kernel32.dll_GetFileAttributesW
cmp eax, 0xffffffff
je 0x588dc7
test ah, 4
je 0x588dc7
test al, 0x10
je 0x588dc7
mov eax, dword [ebp - 8]
call fcn.00407b7c
push eax
call sub.kernel32.dll_RemoveDirectoryW
cmp eax, 1
sbb ebx, ebx
inc ebx
jmp 0x588dcd
push esi
call sub.kernel32.dll_SetLastError
mov dl, 1
mov eax, dword [ebp - 8]
call fcn.0041e058
test al, al
je 0x588e32
mov eax, dword [ebp - 0xc]
call fcn.00407b7c
push eax
call sub.kernel32.dll_DeleteFileW
cmp eax, 1
sbb ebx, ebx
inc ebx
test bl, bl
jne 0x588e32
call sub.kernel32.dll_GetLastError_1
mov esi, eax
mov eax, dword [ebp - 0xc]
call fcn.00407b7c
push eax
call sub.kernel32.dll_GetFileAttributesW
cmp eax, 0xffffffff
je 0x588e2c
test ah, 4
je 0x588e2c
test al, 0x10
je 0x588e2c
mov eax, dword [ebp - 0xc]
call fcn.00407b7c
push eax
call sub.kernel32.dll_RemoveDirectoryW
cmp eax, 1
sbb ebx, ebx
inc ebx
jmp 0x588e32
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 - 0x1c]
mov dword [edx + 0x278], eax
mov eax, dword [ebp - 0x1c]
mov ebx, dword [eax + 0x274]
xor edx, edx
push ebp
push 0x589239
push dword fs:[edx]
mov dword fs:[edx], esp
xor edx, edx
push ebp
push 0x5890f4
push dword fs:[edx]
mov dword fs:[edx], esp
mov eax, dword [ebp - 0x1c]
mov byte [eax + 0x294], 2
mov eax, dword [ebp - 0x1c]
mov eax, dword [eax + 0x280]
mov edx, 0x5892dc
mov ecx, dword [eax]
call dword [ecx + 0x38]
mov eax, dword [ebp - 0x1c]
mov ecx, dword [eax + 0x278]
mov edx, dword [ebp - 4]
mov eax, ebx
call fcn.005846d0
mov eax, dword [ebp - 0x1c]
mov eax, dword [eax + 0x280]
mov edx, dword [eax]
call dword [edx + 0x44]
mov eax, dword [ebp - 0x1c]
mov byte [eax + 0x294], 0
mov eax, dword [ebp - 0x1c]
mov eax, dword [eax + 0x278]
call fcn.00405744
lea edx, [ebp - 0xc]
lea eax, [ebp - 8]
call fcn.0051332c
mov ecx, dword [ebp - 0xc]
mov dl, 1
mov eax, dword [0x4510fc]
call fcn.004514b0
mov dword [ebp - 0x24], eax
push 0
push 0
mov ecx, 0x589318
mov edx, 0x589328
mov eax, dword [ebp - 0x24]
mov ebx, dword [eax]
call dword [ebx + 0x28]
fstp qword [ebp - 0x30]
wait
lea edx, [ebp - 0x10]
mov eax, dword [ebp - 0x1c]
mov eax, dword [eax + 0x27c]
call fcn.00510a14
mov eax, dword [ebp - 0x10]
mov edx, 0x589358
call fcn.00407f00
jne 0x588f4a
mov eax, dword [ebp - 0x1c]
mov eax, dword [eax + 0x280]
mov edx, 0x589368
mov ecx, dword [eax]
call dword [ecx + 0x38]
mov byte [ebp - 0x1d], 0
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
call fcn.004069a8
jmp 0x589243
mov edx, dword [0x5a4404]
mov eax, dword [ebp - 0x10]
call fcn.0041fd18
fstp xword [ebp - 0x50]
wait
fld xword [ebp - 0x50]
fstp qword [ebp - 0x38]
wait
fld qword [ebp - 0x30]
add esp, 0xfffffff4
fstp xword [esp]
wait
mov eax, dword [0x5a4404]
push eax
lea eax, [ebp - 0x14]
push eax
mov ecx, 3
mov edx, 4
mov al, 2
call fcn.0041fc7c
lea eax, [ebp - 0x5c]
mov ecx, dword [ebp - 0x14]
mov edx, 0x5893d4
call fcn.00407dc8
mov edx, dword [ebp - 0x5c]
mov eax, dword [ebp - 0x1c]
mov eax, dword [eax + 0x280]
mov ecx, dword [eax]
call dword [ecx + 0x38]
mov eax, dword [ebp - 0x1c]
mov eax, dword [eax + 0x280]
mov edx, 0x589408
mov ecx, dword [eax]
call dword [ecx + 0x38]
fld qword [ebp - 0x30]
fcomp qword [ebp - 0x38]
wait
fnstsw ax
sahf
jbe 0x5890e7
mov eax, dword [ebp - 0x1c]
mov eax, dword [eax + 0x280]
mov edx, dword [eax]
call dword [edx + 0x44]
fld qword [ebp - 0x30]
add esp, 0xfffffff4
fstp xword [esp]
wait
mov eax, dword [0x5a4404]
push eax
lea eax, [ebp - 0x18]
push eax
mov ecx, 3
mov edx, 4
mov al, 2
call fcn.0041fc7c
push 0x589458
push dword [ebp - 0x18]
push 0x5894a0
lea eax, [ebp - 0x64]
call fcn.00510848
push dword [ebp - 0x64]
push 0x5894bc
lea eax, [ebp - 0x60]
mov edx, 5
call fcn.00407e50
mov edx, dword [ebp - 0x60]
mov eax, dword [ebp - 0x1c]
mov eax, dword [eax + 0x280]
mov ecx, dword [eax]
call dword [ecx + 0x38]
push 0x5894e0
lea eax, [ebp - 0x68]
push eax
mov ecx, 0x5894fc
mov edx, 0x589328
mov eax, dword [ebp - 0x24]
mov ebx, dword [eax]
call dword [ebx + 4]
mov edx, dword [ebp - 0x68]
mov eax, dword [ebp - 0x1c]
add eax, 0x290
call fcn.00407524
mov eax, dword [ebp - 0x1c]
mov eax, dword [eax + 0x280]
mov edx, 0x589510
mov ecx, dword [eax]
call dword [ecx + 0x38]
mov eax, dword [ebp - 0x1c]
mov eax, dword [eax + 0x280]
mov edx, 0x589520
mov ecx, dword [eax]
call dword [ecx + 0x38]
push 0x589570
lea eax, [ebp - 0x6c]
push eax
mov ecx, 0x5895c0
mov edx, 0x589328
mov eax, dword [ebp - 0x24]
mov ebx, dword [eax]
call dword [ebx + 4]
mov edx, dword [ebp - 0x6c]
mov eax, dword [ebp - 0x1c]
mov eax, dword [eax + 0x280]
mov ecx, dword [eax]
call dword [ecx + 0x38]
mov eax, dword [ebp - 0x1c]
mov eax, dword [eax + 0x290]
mov edx, 0x5894e0
call fcn.00407f00
jne 0x5890e3
mov byte [ebp - 0x1d], 0
mov eax, dword [ebp - 0x1c]
mov eax, dword [eax + 0x280]
mov edx, 0x5895d4
mov ecx, dword [eax]
call dword [ecx + 0x38]
mov byte [ebp - 0x1d], 1
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x589175
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x589243
mov eax, dword [ebp - 0x24]
call fcn.00405744
mov eax, dword [ebp - 8]
call fcn.00407b7c
push eax
call sub.kernel32.dll_DeleteFileW
cmp eax, 1
sbb ebx, ebx
inc ebx
test bl, bl
jne 0x5891e1
call sub.kernel32.dll_GetLastError_1
mov esi, eax
mov eax, dword [ebp - 8]
call fcn.00407b7c
push eax
call sub.kernel32.dll_GetFileAttributesW
cmp eax, 0xffffffff
je 0x5891db
test ah, 4
je 0x5891db
test al, 0x10
je 0x5891db
mov eax, dword [ebp - 8]
call fcn.00407b7c
push eax
call sub.kernel32.dll_RemoveDirectoryW
cmp eax, 1
sbb ebx, ebx
inc ebx
jmp 0x5891e1
push esi
call sub.kernel32.dll_SetLastError
mov eax, dword [ebp - 0xc]
call fcn.00407b7c
push eax
call sub.kernel32.dll_DeleteFileW
cmp eax, 1
sbb ebx, ebx
inc ebx
test bl, bl
jne 0x589238
call sub.kernel32.dll_GetLastError_1
mov esi, eax
mov eax, dword [ebp - 0xc]
call fcn.00407b7c
push eax
call sub.kernel32.dll_GetFileAttributesW
cmp eax, 0xffffffff
je 0x589232
test ah, 4
je 0x589232
test al, 0x10
je 0x589232
mov eax, dword [ebp - 0xc]
call fcn.00407b7c
push eax
call sub.kernel32.dll_RemoveDirectoryW
cmp eax, 1
sbb ebx, ebx
inc ebx
jmp 0x589238
push esi
call sub.kernel32.dll_SetLastError
ret
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x589272
lea eax, [ebp - 0x70]
mov edx, 8
call fcn.004071c4
lea eax, [ebp - 0x18]
mov edx, 6
call fcn.004071c4
ret