Function at 0x401780
Capabilities:
Check if file exists
Delete file
Get common file path
Get file attributes
Move file
Set file attributes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x473a01
mov eax, dword fs:[0]
push eax
sub esp, 0x230
mov eax, dword [0x49c404]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, dword [ebp + 8]
push ebx
mov dword [ebp - 0x230], ebx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x4017cc
mov eax, 1
jmp 0x401a5e
push ebx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x4017c2
call fcn.00401350
mov ecx, eax
test ecx, ecx
jne 0x4017ec
push 0x80004005
call fcn.00401220
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x23c], eax
push 0x208
lea eax, [ebp - 0x218]
mov dword [ebp - 4], 0
push 0
push eax
call fcn.00459eb0
add esp, 0xc
lea eax, [ebp - 0x218]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
push ebx
call dword [sym.imp.SHLWAPI.dll_PathFindFileNameW]
mov edx, eax
test edx, edx
jne 0x40183a
xor ecx, ecx
jmp 0x40184f
mov ecx, edx
lea esi, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x401840
sub ecx, esi
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x23c]
call fcn.00402e70
call fcn.00401350
mov ecx, eax
test ecx, ecx
jne 0x401871
push 0x80004005
call fcn.00401220
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x238], eax
mov byte [ebp - 4], 1
lea eax, [ebp - 0x228]
xorps xmm0, xmm0
mov dword [ebp - 0x228], 0
push eax
movq qword [ebp - 0x224], xmm0
mov dword [ebp - 0x21c], 0
call dword [sym.imp.ole32.dll_CoCreateGuid]
lea eax, [ebp - 0x220]
push eax
movzx eax, word [ebp - 0x222]
push eax
movzx eax, word [ebp - 0x224]
push eax
push dword [ebp - 0x228]
lea eax, [ebp - 0x238]
push 0x491ecc
push eax
call fcn.00403120
add esp, 0x18
call fcn.00401350
mov ecx, eax
test ecx, ecx
jne 0x4018f5
push 0x80004005
call fcn.00401220
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x22c], eax
mov byte [ebp - 4], 2
lea eax, [ebp - 0x22c]
mov edi, dword [ebp - 0x238]
mov ebx, dword [ebp - 0x23c]
push edi
push ebx
push str._s._s.del
push eax
call fcn.00403120
mov esi, dword [ebp - 0x22c]
lea eax, [ebp - 0x218]
add esp, 0x10
push esi
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
push 1
lea eax, [ebp - 0x218]
push eax
push dword [ebp - 0x230]
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
mov dword [ebp - 0x234], eax
test eax, eax
jne 0x4019de
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x11
jne 0x4019de
mov eax, dword [ebp - 0x230]
push edi
movzx eax, word [eax]
push eax
lea eax, [ebp - 0x22c]
push str._c:_s.del
push eax
call fcn.00403120
mov esi, dword [ebp - 0x22c]
add esp, 0x10
push 1
push esi
push dword [ebp - 0x230]
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
mov dword [ebp - 0x234], eax
test eax, eax
je 0x4019de
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x4019c4
test al, 1
jne 0x4019c4
or eax, 2
push eax
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push esi
push 0x491f10
lea eax, [ebp - 0x218]
push 0x104
push eax
call fcn.00403b40
add esp, 0x10
cmp dword [ebp - 0x234], 0
lea eax, [ebp - 0x218]
push 4
cmove eax, dword [ebp - 0x230]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
lea edx, [esi - 0x10]
mov dword [ebp - 0x234], eax
or esi, 0xffffffff
mov byte [ebp - 4], 1
mov ecx, esi
lock xadd dword [edx + 0xc], ecx
dec ecx
test ecx, ecx
jg 0x401a21
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0
add edi, 0xfffffff0
mov eax, esi
lock xadd dword [edi + 0xc], eax
dec eax
test eax, eax
jg 0x401a3c
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebp - 4], 0xffffffff
add ebx, 0xfffffff0
lock xadd dword [ebx + 0xc], esi
dec esi
test esi, esi
jg 0x401a58
mov ecx, dword [ebx]
push ebx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [ebp - 0x234]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004582c7
mov esp, ebp
pop ebp
ret