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

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffd60
push ebx
push esi
push edi
xor edx, edx
mov dword [ebp - 0x2a0], edx
mov dword [ebp - 0x29c], edx
mov dword [ebp - 0x298], edx
mov dword [ebp - 0x294], edx
mov dword [ebp - 0x290], edx
mov dword [ebp - 0x28c], edx
mov dword [ebp - 0x288], edx
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
call fcn.0040722c
lea eax, [ebp - 0x278]
mov edx, dword [0x417dd4]
call fcn.004085a8
xor eax, eax
push ebp
push 0x58faf8
push dword fs:[eax]
mov dword fs:[eax], esp
mov bl, 1
lea eax, [ebp - 0x288]
mov ecx, 0x58fb14
mov edx, dword [ebp - 4]
call fcn.00408084
mov eax, dword [ebp - 0x288]
lea ecx, [ebp - 0x278]
mov edx, 0x1ff
call fcn.0041fbb0
mov esi, eax
test esi, esi
jne 0x58fa81
mov eax, dword [ebp - 0x264]
mov edx, 0x58fb2c
call fcn.0040821c
je 0x58fa6c
mov eax, dword [ebp - 0x264]
mov edx, 0x58fb3c
call fcn.0040821c
je 0x58fa6c
cmp dword [ebp - 0x268], 0x10
jne 0x58f93e
test bl, bl
je 0x58f931
push dword [ebp - 4]
push 0x58fb50
push dword [ebp - 0x264]
lea eax, [ebp - 0x28c]
mov edx, 3
call fcn.0040810c
mov eax, dword [ebp - 0x28c]
call fcn.0058f834
test al, al
jne 0x58f935
xor eax, eax
jmp 0x58f937
mov al, 1
mov ebx, eax
jmp 0x58fa6c
push dword [ebp - 4]
push 0x58fb50
push dword [ebp - 0x264]
lea eax, [ebp - 0x290]
mov edx, 3
call fcn.0040810c
mov eax, dword [ebp - 0x290]
mov cl, 1
xor edx, edx
call fcn.0041fa48
push dword [ebp - 4]
push 0x58fb50
push dword [ebp - 0x264]
lea eax, [ebp - 0x294]
mov edx, 3
call fcn.0040810c
mov eax, dword [ebp - 0x294]
call fcn.00407e20
push eax
call sub.kernel32.dll_DeleteFileW
cmp eax, 1
sbb eax, eax
inc eax
mov byte [ebp - 0x279], al
cmp byte [ebp - 0x279], 0
jne 0x58fa4d
call sub.kernel32.dll_GetLastError_1
mov dword [ebp - 0x280], eax
push dword [ebp - 4]
push 0x58fb50
push dword [ebp - 0x264]
lea eax, [ebp - 0x298]
mov edx, 3
call fcn.0040810c
mov eax, dword [ebp - 0x298]
call fcn.00407e20
push eax
call sub.kernel32.dll_GetFileAttributesW
mov edi, eax
cmp edi, 0xffffffff
je 0x58fa41
test edi, 0x400
je 0x58fa41
test edi, 0x10
je 0x58fa41
push dword [ebp - 4]
push 0x58fb50
push dword [ebp - 0x264]
lea eax, [ebp - 0x29c]
mov edx, 3
call fcn.0040810c
mov eax, dword [ebp - 0x29c]
call fcn.00407e20
push eax
call sub.kernel32.dll_RemoveDirectoryW
cmp eax, 1
sbb eax, eax
inc eax
mov byte [ebp - 0x279], al
jmp 0x58fa4d
mov eax, dword [ebp - 0x280]
push eax
call sub.kernel32.dll_SetLastError
cmp byte [ebp - 0x279], 0
je 0x58fa5e
mov byte [ebp - 0x281], bl
jmp 0x58fa65
mov byte [ebp - 0x281], 0
movzx ebx, byte [ebp - 0x281]
lea eax, [ebp - 0x278]
call fcn.0041fc00
mov esi, eax
test esi, esi
je 0x58f8cb
lea eax, [ebp - 0x278]
call fcn.0041fc24
mov eax, dword [ebp - 4]
call fcn.00420058
and bl, al
test bl, bl
jne 0x58fac1
push 0
push 0
call sub.kernel32.dll_GetLastError_1
lea edx, [ebp - 0x2a0]
call fcn.00423c00
mov eax, dword [ebp - 0x2a0]
call fcn.00407e20
push eax
push 0
call sub.user32.dll_MessageBoxW
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x58faff
lea eax, [ebp - 0x2a0]
mov edx, 7
call fcn.004071a8
lea eax, [ebp - 0x278]
mov edx, dword [0x417dd4]
call fcn.00408680
lea eax, [ebp - 4]
call fcn.00407148
ret