Function at 0x401930
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 0x475f01
mov eax, dword fs:[0]
push eax
sub esp, 0x230
mov eax, dword [0x49d4a4]
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 - 0x234], ebx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x40197c
mov eax, 1
jmp 0x401d1d
push ebx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x401972
call fcn.00401570
mov ecx, eax
test ecx, ecx
jne 0x40199c
push 0x80004005
call fcn.00401280
mov eax, dword [ecx]
mov edx, dword [eax + 0xc]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x4019b1
lock inc dword [ecx + 0x14]
lea eax, [ecx + 8]
jmp 0x4019b3
call edx
add eax, 0x10
mov dword [ebp - 0x238], eax
push 0x208
lea eax, [ebp - 0x218]
mov dword [ebp - 4], 0
push 0
push eax
call fcn.0045c360
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 0x4019fc
xor ecx, ecx
jmp 0x401a10
mov ecx, edx
lea esi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x401a01
sub ecx, esi
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x238]
call fcn.00403450
call fcn.00401570
mov ecx, eax
test ecx, ecx
jne 0x401a32
push 0x80004005
call fcn.00401280
mov eax, dword [ecx]
mov edx, dword [eax + 0xc]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x401a47
lock inc dword [ecx + 0x14]
lea eax, [ecx + 8]
jmp 0x401a49
call edx
add eax, 0x10
mov dword [ebp - 0x23c], 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 - 0x23c]
push str._u__u__u__u
push eax
call fcn.004036b0
add esp, 0x18
call fcn.00401570
mov ecx, eax
test ecx, ecx
jne 0x401ac8
push 0x80004005
call fcn.00401280
mov eax, dword [ecx]
mov edx, dword [eax + 0xc]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x401add
lock inc dword [ecx + 0x14]
lea eax, [ecx + 8]
jmp 0x401adf
call edx
add eax, 0x10
mov dword [ebp - 0x230], eax
mov byte [ebp - 4], 2
lea eax, [ebp - 0x230]
mov edi, dword [ebp - 0x23c]
mov ebx, dword [ebp - 0x238]
push edi
push ebx
push str._s._s.del
push eax
call fcn.004036b0
mov esi, dword [ebp - 0x230]
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 - 0x234]
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
mov dword [ebp - 0x22c], eax
test eax, eax
jne 0x401be1
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x11
jne 0x401be1
mov eax, dword [ebp - 0x234]
push edi
movzx eax, word [eax]
push eax
lea eax, [ebp - 0x230]
push str._c:_s.del
push eax
call fcn.004036b0
mov esi, dword [ebp - 0x230]
add esp, 0x10
push 1
push esi
push dword [ebp - 0x234]
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
mov dword [ebp - 0x22c], eax
test eax, eax
je 0x401be1
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x401bad
test al, 1
jne 0x401bad
or eax, 2
push eax
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
cmp dword [esi - 4], 1
jle 0x401bc7
push dword [esi - 0xc]
lea ecx, [ebp - 0x230]
call fcn.004031c0
mov esi, dword [ebp - 0x230]
push esi
push 0x4928fc
lea eax, [ebp - 0x218]
push 0x104
push eax
call fcn.004040d0
add esp, 0x10
cmp dword [ebp - 0x22c], 0
lea eax, [ebp - 0x218]
push 4
cmove eax, dword [ebp - 0x234]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
mov dword [ebp - 0x234], eax
add esi, 0xfffffff0
mov byte [ebp - 4], 1
or ecx, 0xffffffff
lock xadd dword [esi + 0xc], ecx
dec ecx
mov edx, dword [sym.imp.KERNEL32.dll_HeapFree]
test ecx, ecx
jg 0x401c73
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
mov ebx, dword [eax + 4]
mov dword [ebp - 0x22c], ebx
mov ebx, dword [ebp - 0x238]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x401c67
mov ecx, dword [ecx + 4]
mov eax, dword [ecx]
mov edi, dword [eax + 4]
mov dword [ebp - 0x22c], edi
mov edi, dword [ebp - 0x23c]
cmp eax, vtable.ATL::CWin32Heap.0
jne 0x401c5f
push 0
push dword [ecx + 4]
call edx
jmp 0x401c6d
call dword [ebp - 0x22c]
jmp 0x401c6d
call dword [ebp - 0x22c]
mov edx, dword [sym.imp.KERNEL32.dll_HeapFree]
or esi, 0xffffffff
mov byte [ebp - 4], 0
add edi, 0xfffffff0
mov eax, esi
lock xadd dword [edi + 0xc], eax
dec eax
test eax, eax
jg 0x401cd6
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
mov ebx, dword [eax + 4]
mov dword [ebp - 0x22c], ebx
mov ebx, dword [ebp - 0x238]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x401cd0
mov ecx, dword [ecx + 4]
mov eax, dword [ecx]
mov ebx, dword [eax + 4]
mov dword [ebp - 0x22c], ebx
mov ebx, dword [ebp - 0x238]
cmp eax, vtable.ATL::CWin32Heap.0
jne 0x401cc8
push 0
push dword [ecx + 4]
call edx
jmp 0x401cd6
call dword [ebp - 0x22c]
jmp 0x401cd6
call dword [ebp - 0x22c]
mov dword [ebp - 4], 0xffffffff
add ebx, 0xfffffff0
lock xadd dword [ebx + 0xc], esi
dec esi
test esi, esi
jg 0x401d17
mov ecx, dword [ebx]
push ebx
mov eax, dword [ecx]
mov edx, dword [eax + 4]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x401d15
mov ecx, dword [ecx + 4]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
cmp eax, vtable.ATL::CWin32Heap.0
jne 0x401d15
push 0
push dword [ecx + 4]
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x401d17
call edx
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.0045a746
mov esp, ebp
pop ebp
ret