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

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffe7c
push ebx
push esi
push edi
xor edx, edx
mov dword [ebp - 0x184], edx
mov dword [ebp - 0x180], edx
mov dword [ebp - 0x17c], edx
mov dword [ebp - 0x178], edx
mov dword [ebp - 0x174], edx
mov dword [ebp - 0x170], edx
mov dword [ebp - 0x16c], edx
mov dword [ebp - 4], edx
mov dword [ebp - 8], edx
mov esi, eax
lea eax, [ebp - 0x168]
mov edx, dword [0x408044]
call fcn.00405600
xor eax, eax
push ebp
push 0x46858e
push dword fs:[eax]
mov dword fs:[eax], esp
lea eax, [ebp - 0x16c]
mov ecx, 0x4685a4
mov edx, esi
call fcn.00404e88
mov eax, dword [ebp - 0x16c]
lea ecx, [ebp - 0x168]
mov edx, 0x37
call fcn.00409988
test eax, eax
jne 0x46848e
xor edx, edx
push ebp
push 0x468469
push dword fs:[edx]
mov dword fs:[edx], esp
cmp byte [ebp - 0x18], 0
jne 0x468357
lea eax, [ebp - 4]
mov edx, dword [ebp - 0x154]
call fcn.00404c08
jmp 0x468367
lea eax, [ebp - 4]
lea edx, [ebp - 0x18]
mov ecx, 0xe
call fcn.00404de0
lea eax, [ebp - 8]
mov ecx, dword [ebp - 4]
mov edx, esi
call fcn.00404e88
test byte [ebp - 0x158], 0x10
je 0x4683cb
mov eax, dword [ebp - 4]
mov edx, 0x4685b0
call fcn.00404f98
je 0x46844c
mov eax, dword [ebp - 4]
mov edx, 0x4685bc
call fcn.00404f98
je 0x46844c
mov eax, dword [ebp + 8]
push eax
lea eax, [ebp - 0x170]
mov ecx, 0x4685c8
mov edx, dword [ebp - 8]
call fcn.00404e88
mov eax, dword [ebp - 0x170]
call fcn.004682a4
pop ecx
jmp 0x46844c
mov eax, dword [ebp - 8]
call fcn.00405000
mov ebx, eax
push ebx
call sub.kernel32.dll_GetFileAttributesA
cmp eax, 0xffffffff
jne 0x468407
call sub.kernel32.dll_GetLastError_1
lea edx, [ebp - 0x174]
call fcn.0040c5b0
mov ecx, dword [ebp - 0x174]
mov dl, 1
mov eax, dword [0x4081d8]
call fcn.0040cdc4
call fcn.00404598
test al, 1
je 0x468415
and eax, 0xfffffffe
push eax
push ebx
call sub.kernel32.dll_SetFileAttributesA
push ebx
call sub.kernel32.dll_DeleteFileA
cmp eax, 1
sbb eax, eax
inc eax
test al, al
jne 0x46844c
call sub.kernel32.dll_GetLastError_1
lea edx, [ebp - 0x178]
call fcn.0040c5b0
mov ecx, dword [ebp - 0x178]
mov dl, 1
mov eax, dword [0x4081d8]
call fcn.0040cdc4
call fcn.00404598
lea eax, [ebp - 0x168]
call fcn.004099d8
test eax, eax
jle 0x468341
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x468483
lea eax, [ebp - 0x168]
call fcn.004099fc
push 0x4685d4
push esi
push 0x4685d4
lea eax, [ebp - 0x17c]
mov edx, 3
call fcn.00404f04
mov eax, dword [ebp - 0x17c]
mov edx, dword [ebp + 8]
mov edx, dword [edx - 4]
call fcn.0040514c
test eax, eax
jne 0x468542
mov eax, esi
call fcn.00405000
mov ebx, eax
push ebx
call sub.kernel32.dll_GetFileAttributesA
cmp eax, 0xffffffff
jne 0x4684fd
call sub.kernel32.dll_GetLastError_1
lea edx, [ebp - 0x180]
call fcn.0040c5b0
mov ecx, dword [ebp - 0x180]
mov dl, 1
mov eax, dword [0x4081d8]
call fcn.0040cdc4
call fcn.00404598
test al, 1
je 0x46850b
and eax, 0xfffffffe
push eax
push ebx
call sub.kernel32.dll_SetFileAttributesA
push ebx
call sub.kernel32.dll_RemoveDirectoryA
cmp eax, 1
sbb eax, eax
inc eax
test al, al
jne 0x468542
call sub.kernel32.dll_GetLastError_1
lea edx, [ebp - 0x184]
call fcn.0040c5b0
mov ecx, dword [ebp - 0x184]
mov dl, 1
mov eax, dword [0x4081d8]
call fcn.0040cdc4
call fcn.00404598
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x468595
lea eax, [ebp - 0x184]
mov edx, 5
call fcn.00404b94
lea eax, [ebp - 0x170]
mov edx, 2
call fcn.00404b94
lea eax, [ebp - 0x168]
mov edx, dword [0x408044]
call fcn.004056d0
lea eax, [ebp - 8]
mov edx, 2
call fcn.00404b94
ret