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

Disassembly:
push ebp
mov ebp, esp
mov ecx, 0xc
push 0
push 0
dec ecx
jne 0x5083e8
push ecx
mov dword [ebp - 4], eax
xor eax, eax
push ebp
push 0x508684
push dword fs:[eax]
mov dword fs:[eax], esp
lea edx, [ebp - 0x34]
mov eax, dword [0x514150]
mov eax, dword [eax]
call fcn.004aec88
mov eax, dword [ebp - 0x34]
lea edx, [ebp - 0x30]
call fcn.0041c89c
mov edx, dword [ebp - 0x30]
lea eax, [ebp - 8]
mov ecx, 0x50869c
call fcn.00407498
mov eax, dword [ebp - 8]
call fcn.0041c758
lea eax, [ebp - 0x38]
mov ecx, 0x5086c0
mov edx, dword [ebp - 8]
call fcn.00407498
mov eax, dword [ebp - 0x38]
call fcn.0040725c
push eax
call sub.kernel32.dll_DeleteFileW
cmp eax, 1
sbb eax, eax
inc eax
mov byte [ebp - 9], al
cmp byte [ebp - 9], 0
jne 0x5084cd
call sub.kernel32.dll_GetLastError_1
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x3c]
mov ecx, 0x5086c0
mov edx, dword [ebp - 8]
call fcn.00407498
mov eax, dword [ebp - 0x3c]
call fcn.0040725c
push eax
call sub.kernel32.dll_GetFileAttributesW
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0xffffffff
je 0x5084c4
test byte [ebp - 0xf], 4
je 0x5084c4
test byte [ebp - 0x10], 0x10
je 0x5084c4
lea eax, [ebp - 0x40]
mov ecx, 0x5086c0
mov edx, dword [ebp - 8]
call fcn.00407498
mov eax, dword [ebp - 0x40]
call fcn.0040725c
push eax
call sub.kernel32.dll_RemoveDirectoryW
cmp eax, 1
sbb eax, eax
inc eax
mov byte [ebp - 9], al
jmp 0x5084cd
mov eax, dword [ebp - 0x14]
push eax
call sub.kernel32.dll_SetLastError
lea eax, [ebp - 0x44]
mov ecx, 0x5086f4
mov edx, dword [ebp - 8]
call fcn.00407498
mov eax, dword [ebp - 0x44]
call fcn.0040725c
push eax
call sub.kernel32.dll_DeleteFileW
cmp eax, 1
sbb eax, eax
inc eax
mov byte [ebp - 0x15], al
cmp byte [ebp - 0x15], 0
jne 0x508567
call sub.kernel32.dll_GetLastError_1
mov dword [ebp - 0x20], eax
mov ecx, 0x5086f4
lea eax, [ebp - 0x48]
mov edx, dword [ebp - 8]
call fcn.00407498
mov eax, dword [ebp - 0x48]
call fcn.0040725c
push eax
call sub.kernel32.dll_GetFileAttributesW
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0xffffffff
je 0x50855e
test byte [ebp - 0x1b], 4
je 0x50855e
test byte [ebp - 0x1c], 0x10
je 0x50855e
mov ecx, 0x5086f4
lea eax, [ebp - 0x4c]
mov edx, dword [ebp - 8]
call fcn.00407498
mov eax, dword [ebp - 0x4c]
call fcn.0040725c
push eax
call sub.kernel32.dll_RemoveDirectoryW
cmp eax, 1
sbb eax, eax
inc eax
mov byte [ebp - 0x15], al
jmp 0x508567
mov eax, dword [ebp - 0x20]
push eax
call sub.kernel32.dll_SetLastError
lea eax, [ebp - 0x50]
mov ecx, 0x508728
mov edx, dword [ebp - 8]
call fcn.00407498
mov eax, dword [ebp - 0x50]
call fcn.0040725c
push eax
call sub.kernel32.dll_DeleteFileW
cmp eax, 1
sbb eax, eax
inc eax
mov byte [ebp - 0x21], al
cmp byte [ebp - 0x21], 0
jne 0x508601
call sub.kernel32.dll_GetLastError_1
mov dword [ebp - 0x2c], eax
mov ecx, 0x508728
lea eax, [ebp - 0x54]
mov edx, dword [ebp - 8]
call fcn.00407498
mov eax, dword [ebp - 0x54]
call fcn.0040725c
push eax
call sub.kernel32.dll_GetFileAttributesW
mov dword [ebp - 0x28], eax
cmp dword [ebp - 0x28], 0xffffffff
je 0x5085f8
test byte [ebp - 0x27], 4
je 0x5085f8
test byte [ebp - 0x28], 0x10
je 0x5085f8
mov ecx, 0x508728
lea eax, [ebp - 0x58]
mov edx, dword [ebp - 8]
call fcn.00407498
mov eax, dword [ebp - 0x58]
call fcn.0040725c
push eax
call sub.kernel32.dll_RemoveDirectoryW
cmp eax, 1
sbb eax, eax
inc eax
mov byte [ebp - 0x21], al
jmp 0x508601
mov eax, dword [ebp - 0x2c]
push eax
call sub.kernel32.dll_SetLastError
lea eax, [ebp - 0x5c]
mov ecx, 0x5086c0
mov edx, dword [ebp - 8]
call fcn.00407498
mov ecx, dword [ebp - 0x5c]
mov edx, 0x50874c
mov eax, dword [ebp - 4]
call fcn.005081d8
mov ecx, 0x5086f4
lea eax, [ebp - 0x60]
mov edx, dword [ebp - 8]
call fcn.00407498
mov ecx, dword [ebp - 0x60]
mov edx, 0x5087bc
mov eax, dword [ebp - 4]
call fcn.005081d8
mov ecx, 0x508728
lea eax, [ebp - 0x64]
mov edx, dword [ebp - 8]
call fcn.00407498
mov ecx, dword [ebp - 0x64]
mov edx, 0x508828
mov eax, dword [ebp - 4]
call fcn.005081d8
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x50868b
lea eax, [ebp - 0x64]
mov edx, 0xe
call fcn.00406978
lea eax, [ebp - 8]
call fcn.00406918
ret