Function at 0x404b20
Capabilities:
Check if file exists
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x414ce4
mov eax, dword fs:[0]
push eax
sub esp, 0x218
mov eax, dword [0x42001c]
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 esi, ecx
mov eax, dword [esi]
xor ebx, ebx
cmp dword [eax + 0x5e4], ebx
je 0x404c56
lea ecx, [ebp - 0x21c]
call dword [sym.imp.Common.dll_public:_void___thiscall_CTXStringW::constructor_void_]
mov dword [ebp - 4], ebx
mov edx, dword [esi]
mov eax, dword [edx + 0x5e4]
push ecx
mov ecx, esp
mov dword [ebp - 0x224], esp
push eax
call dword [sym.imp.Common.dll_public:_void___thiscall_CTXStringW::constructor_wchar_t_const__]
lea esi, [ebp - 0x21c]
call fcn.004122c0
add esp, 4
push str..tlg
mov ecx, esi
call dword [sym.imp.Common.dll_public:_class_CTXStringW____thiscall_CTXStringW::operator_wchar_t_const__]
push 0x206
lea ecx, [ebp - 0x216]
push ebx
push ecx
mov word [ebp - 0x218], bx
call sub.MSVCR80.dll_memset
add esp, 0xc
push 1
push 0x1a
lea edx, [ebp - 0x218]
push edx
call dword [sym.imp.USER32.dll_GetDesktopWindow]
push eax
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
cmp word [ebp + eax*2 - 0x21a], 0x5c
mov esi, dword [sym.imp.KERNEL32.dll_lstrcatW]
je 0x404c02
push 0x4189c0
lea ecx, [ebp - 0x218]
push ecx
call esi
push 0x4189c4
lea edx, [ebp - 0x218]
push edx
call esi
lea ecx, [ebp - 0x21c]
call dword [sym.imp.Common.dll_public:_wchar_t____thiscall_CTXStringW::GetBuffer_void_]
push eax
lea eax, [ebp - 0x218]
push eax
call esi
or esi, 0xffffffff
push esi
lea ecx, [ebp - 0x21c]
call dword [sym.imp.Common.dll_public:_void___thiscall_CTXStringW::ReleaseBuffer_int_]
lea ecx, [ebp - 0x218]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x404c5d
lea ecx, [ebp - 0x21c]
mov dword [ebp - 4], esi
call dword [sym.imp.Common.dll_public:_void___thiscall_CTXStringW::destructor_void_]
xor eax, eax
jmp 0x404d2b
lea edx, [ebp - 0x218]
push edx
mov ecx, 0x420694
call dword [sym.imp.Common.dll_public:_class_CTXStringW____thiscall_CTXStringW::operator_wchar_t__]
lea edi, [ebp - 0x220]
call fcn.00410750
mov ecx, edi
mov byte [ebp - 4], 1
call dword [sym.imp.Common.dll_public:_bool___thiscall_CTXStringW::IsEmpty_void_const]
test al, al
mov ecx, edi
je 0x404ca9
mov byte [ebp - 4], bl
mov edi, dword [sym.imp.Common.dll_public:_void___thiscall_CTXStringW::destructor_void_]
call edi
lea ecx, [ebp - 0x21c]
mov dword [ebp - 4], esi
call edi
xor eax, eax
jmp 0x404d2b
lea eax, [ebp - 0x21c]
push eax
push ecx
lea edx, [ebp - 0x224]
push edx
call dword [sym.imp.Common.dll_class_CTXStringW___cdecl_operator_class_CTXStringW_const___class_CTXStringW_const__]
add esp, 0xc
push eax
mov ecx, 0x420694
mov byte [ebp - 4], 2
call dword [sym.imp.Common.dll_public:_class_CTXStringW____thiscall_CTXStringW::operator_class_CTXStringW_const__]
mov byte [ebp - 4], 1
mov esi, dword [sym.imp.Common.dll_public:_void___thiscall_CTXStringW::destructor_void_]
lea ecx, [ebp - 0x224]
call esi
mov edi, dword [sym.imp.Common.dll_public:_wchar_t_const____thiscall_CTXStringW::operator_wchar_t_const__void_const]
mov ecx, 0x420694
call edi
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push ebx
mov ecx, 0x420694
call edi
push eax
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileW]
lea ecx, [ebp - 0x220]
mov edi, eax
mov byte [ebp - 4], bl
call esi
lea ecx, [ebp - 0x21c]
mov dword [ebp - 4], 0xffffffff
call esi
mov eax, edi
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.00413efc
mov esp, ebp
pop ebp
ret