Function at 0x408da0
Capabilities:
Check if file exists
Get common file path
Print debug messages

Disassembly:
push 0xffffffffffffffff
push 0x45dd7c
mov eax, dword fs:[0]
push eax
sub esp, 0x228
mov eax, dword [0x4754f4]
xor eax, esp
mov dword [esp + 0x224], eax
push esi
push edi
mov eax, dword [0x4754f4]
xor eax, esp
push eax
lea eax, [esp + 0x234]
mov dword fs:[0], eax
push 0x103
lea eax, [esp + 0x25]
push 0
push eax
mov byte [esp + 0x2c], 0
call fcn.004314b0
add esp, 0xc
push 0x104
lea ecx, [esp + 0x24]
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea edx, [esp + 0x20]
push edx
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecA]
lea eax, [esp + 0x20]
push eax
lea ecx, [esp + 0x1c]
call fcn.00402eb0
push str.GameInfoMy_Documents
push eax
lea ecx, [esp + 0x18]
push ecx
mov dword [esp + 0x248], 0
call fcn.00402300
add esp, 0xc
mov byte [esp + 0x23c], 2
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
or edi, 0xffffffff
lea edx, [eax + 0xc]
mov ecx, edi
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x408e65
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push 0x103
lea ecx, [esp + 0x12d]
push 0
push ecx
mov byte [esp + 0x134], 0
call fcn.004314b0
add esp, 0xc
push 0
push 5
lea edx, [esp + 0x130]
push edx
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathA]
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
je 0x408fa6
push ecx
lea edx, [esp + 0x12c]
mov ecx, esp
mov dword [esp + 0x18], esp
push edx
call fcn.00402eb0
mov byte [esp + 0x240], 3
mov eax, dword [esp + 0x14]
push ecx
add eax, 0xfffffff0
mov dword [esp + 0x24], esp
mov esi, esp
push eax
call fcn.004028c0
mov ecx, dword [esp + 0x250]
add eax, 0x10
mov dword [esi], eax
add esp, 4
mov byte [esp + 0x244], 2
call fcn.0040a1e0
cmp al, 1
jne 0x408fa6
call fcn.00410db9
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x408f19
push 0x80004005
call fcn.00402d50
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x14], eax
lea ecx, [esp + 0x128]
push ecx
mov byte [esp + 0x240], 4
mov edx, dword [esp + 0x14]
push edx
lea eax, [esp + 0x1c]
push str.CopyFile__:_s_to__s__r_n
push eax
call fcn.00402870
mov esi, dword [esp + 0x24]
add esp, 0x10
push esi
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
lea eax, [esi - 0x10]
mov byte [esp + 0x23c], 2
lea ecx, [eax + 0xc]
mov edx, edi
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x408f7e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [esp + 0x23c], edi
mov eax, dword [esp + 0x10]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
lock xadd dword [ecx], edi
dec edi
test edi, edi
jg 0x408fa2
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov al, 1
jmp 0x408fcc
mov dword [esp + 0x23c], edi
mov eax, dword [esp + 0x10]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
lock xadd dword [ecx], edi
dec edi
test edi, edi
jg 0x408fca
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor al, al
mov ecx, dword [esp + 0x234]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [esp + 0x224]
xor ecx, esp
call fcn.0042d298
add esp, 0x234
ret 4