Function at 0x4137f0
Capabilities:
Check if file exists
Copy file
Delete file
Get common file path
Move file

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x3674
call fcn.00439910
mov eax, dword [0x4f62a0]
xor eax, ebp
mov dword [ebp - 4], eax
push edi
mov dword [ebp - 0x3644], ecx
push str.SafeCopyFile2_Enter.
push str.CModuleAidManger::SafeCopyFile2
push 0x30e
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push eax
push 0x4cecec
push 1
mov eax, dword [0x4fb18c]
push eax
call fcn.00406b40
add esp, 0x1c
cmp dword [ebp + 8], 0
je 0x413845
cmp dword [ebp + 0xc], 0
jne 0x41384c
xor eax, eax
jmp 0x413e55
push 1
lea ecx, [ebp - 0x1010]
call fcn.004177c0
lea ecx, [ebp - 0x1010]
call fcn.00417810
push eax
mov ecx, dword [ebp + 0xc]
push ecx
lea ecx, [ebp - 0x1010]
call fcn.004177f0
push eax
call fcn.00428630
add esp, 0xc
lea ecx, [ebp - 0x1010]
call fcn.004177f0
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
lea ecx, [ebp - 0x1010]
call fcn.004177f0
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHCreateDirectory]
push 1
lea ecx, [ebp - 0x808]
call fcn.004177c0
lea ecx, [ebp - 0x808]
call fcn.004177f0
push eax
push 0x400
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
mov dword [ebp - 0x181c], 0
push 0
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileW]
mov dword [ebp - 0x181c], eax
cmp dword [ebp - 0x181c], 0
jne 0x413906
push 3
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
mov dword [ebp - 0x181c], eax
cmp dword [ebp - 0x181c], 0
je 0x413919
mov eax, 1
jmp 0x413e55
mov dword [ebp - 0x80c], 0
push 1
lea ecx, [ebp - 0x1818]
call fcn.004177c0
lea ecx, [ebp - 0x1818]
call fcn.004177f0
push eax
push 0
push 0x4ced48
lea ecx, [ebp - 0x808]
call fcn.004177f0
push eax
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
mov dword [ebp - 0x1014], eax
cmp dword [ebp - 0x1014], 0
je 0x413dcb
xor eax, eax
mov word [ebp - 0x2c30], ax
push 0x206
push 0
lea ecx, [ebp - 0x2c2e]
push ecx
call fcn.0042efe0
add esp, 0xc
mov edx, dword [ebp + 0xc]
mov dword [ebp - 0x3648], edx
lea eax, [ebp - 0x2c30]
mov dword [ebp - 0x364c], eax
mov ecx, dword [ebp - 0x364c]
mov dword [ebp - 0x3650], ecx
mov edx, dword [ebp - 0x3648]
mov ax, word [edx]
mov word [ebp - 0x3652], ax
mov ecx, dword [ebp - 0x364c]
mov dx, word [ebp - 0x3652]
mov word [ecx], dx
mov eax, dword [ebp - 0x3648]
add eax, 2
mov dword [ebp - 0x3648], eax
mov ecx, dword [ebp - 0x364c]
add ecx, 2
mov dword [ebp - 0x364c], ecx
cmp word [ebp - 0x3652], 0
jne 0x4139a8
lea edx, [ebp - 0x2c30]
push edx
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
lea eax, [ebp - 0x2c30]
add eax, 0xfffffffe
mov dword [ebp - 0x3658], eax
mov ecx, dword [ebp - 0x3658]
mov dx, word [ecx + 2]
mov word [ebp - 0x365a], dx
add dword [ebp - 0x3658], 2
cmp word [ebp - 0x365a], 0
jne 0x413a0c
mov edi, dword [ebp - 0x3658]
mov eax, dword [0x4ced58]
mov dword [edi], eax
push 1
lea ecx, [ebp - 0x2820]
call fcn.004177c0
xor ecx, ecx
mov word [ebp - 0x2e40], cx
push 0x206
push 0
lea edx, [ebp - 0x2e3e]
push edx
call fcn.0042efe0
add esp, 0xc
lea eax, [ebp - 0x2e40]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
lea ecx, [ebp - 0x2820]
call fcn.004177f0
push eax
push 0
push 0x4ced5c
lea ecx, [ebp - 0x2e40]
push ecx
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
lea ecx, [ebp - 0x2820]
call fcn.004177f0
push eax
lea ecx, [ebp - 0x1820]
call fcn.00405d00
lea edx, [ebp - 0x2c30]
push edx
lea eax, [ebp - 0x2e40]
push eax
lea ecx, [ebp - 0x1820]
call fcn.00417480
lea ecx, [ebp - 0x1820]
call sym.Setup.exe_public:_wchar_t_const____thiscall_DuiLib::CDuiString::operator_wchar_t_const__void_const
push eax
mov ecx, dword [ebp + 0xc]
push ecx
call dword [sym.imp.KERNEL32.dll_MoveFileW]
xor edx, edx
mov word [ebp - 0x2a28], dx
push 0x206
push 0
lea eax, [ebp - 0x2a26]
push eax
call fcn.0042efe0
add esp, 0xc
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 0x3660], ecx
lea edx, [ebp - 0x2a28]
mov dword [ebp - 0x3664], edx
mov eax, dword [ebp - 0x3664]
mov dword [ebp - 0x3668], eax
mov ecx, dword [ebp - 0x3660]
mov dx, word [ecx]
mov word [ebp - 0x366a], dx
mov eax, dword [ebp - 0x3664]
mov cx, word [ebp - 0x366a]
mov word [eax], cx
mov edx, dword [ebp - 0x3660]
add edx, 2
mov dword [ebp - 0x3660], edx
mov eax, dword [ebp - 0x3664]
add eax, 2
mov dword [ebp - 0x3664], eax
cmp word [ebp - 0x366a], 0
jne 0x413b1f
lea ecx, [ebp - 0x2a28]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
lea edx, [ebp - 0x2a28]
add edx, 0xfffffffe
mov dword [ebp - 0x3670], edx
mov eax, dword [ebp - 0x3670]
mov cx, word [eax + 2]
mov word [ebp - 0x3672], cx
add dword [ebp - 0x3670], 2
cmp word [ebp - 0x3672], 0
jne 0x413b83
mov edi, dword [ebp - 0x3670]
mov edx, dword [str.Temp_]
mov dword [edi], edx
mov eax, dword [0x4ced70]
mov dword [edi + 4], eax
mov ecx, dword [0x4ced74]
mov dword [edi + 8], ecx
mov dx, word [0x4ced78]
mov word [edi + 0xc], dx
lea ecx, [ebp - 0x1818]
call fcn.004177f0
push eax
lea ecx, [ebp - 0x2c34]
call fcn.00405d00
lea eax, [ebp - 0x2a28]
push eax
lea ecx, [ebp - 0x808]
call fcn.004177f0
push eax
lea ecx, [ebp - 0x2c34]
call fcn.00417480
push 1
lea ecx, [ebp - 0x2020]
call fcn.004177c0
lea ecx, [ebp - 0x2020]
call fcn.00417810
push eax
lea ecx, [ebp - 0x2c34]
call sym.Setup.exe_public:_wchar_t_const____thiscall_DuiLib::CDuiString::operator_wchar_t_const__void_const
push eax
lea ecx, [ebp - 0x2020]
call fcn.004177f0
push eax
call fcn.00428630
add esp, 0xc
lea ecx, [ebp - 0x2020]
call fcn.004177f0
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
lea ecx, [ebp - 0x2020]
call fcn.004177f0
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHCreateDirectory]
push 3
lea ecx, [ebp - 0x2c34]
call sym.Setup.exe_public:_wchar_t_const____thiscall_DuiLib::CDuiString::operator_wchar_t_const__void_const
push eax
lea ecx, [ebp - 0x1820]
call sym.Setup.exe_public:_wchar_t_const____thiscall_DuiLib::CDuiString::operator_wchar_t_const__void_const
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
mov dword [ebp - 0x80c], eax
cmp dword [ebp - 0x80c], 0
je 0x413d4f
lea ecx, [ebp - 0x2c34]
call sym.Setup.exe_public:_wchar_t_const____thiscall_DuiLib::CDuiString::operator_wchar_t_const__void_const
push eax
mov ecx, dword [ebp - 0x3644]
call fcn.00413780
test eax, eax
jne 0x413cc7
push 4
push 0
lea ecx, [ebp - 0x2c34]
call sym.Setup.exe_public:_wchar_t_const____thiscall_DuiLib::CDuiString::operator_wchar_t_const__void_const
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
lea ecx, [ebp - 0x1820]
call sym.Setup.exe_public:_wchar_t_const____thiscall_DuiLib::CDuiString::operator_wchar_t_const__void_const
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x413d0e
lea ecx, [ebp - 0x1820]
call sym.Setup.exe_public:_wchar_t_const____thiscall_DuiLib::CDuiString::operator_wchar_t_const__void_const
push eax
mov ecx, dword [ebp - 0x3644]
call fcn.00413780
test eax, eax
jne 0x413d0e
push 4
push 0
lea ecx, [ebp - 0x1820]
call sym.Setup.exe_public:_wchar_t_const____thiscall_DuiLib::CDuiString::operator_wchar_t_const__void_const
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
mov dword [ebp - 0x80c], 0
push 0
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_CopyFileW]
mov dword [ebp - 0x80c], eax
cmp dword [ebp - 0x80c], 0
jne 0x413d4d
push 3
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
mov dword [ebp - 0x80c], eax
jmp 0x413db5
lea ecx, [ebp - 0x1820]
call sym.Setup.exe_public:_wchar_t_const____thiscall_DuiLib::CDuiString::operator_wchar_t_const__void_const
push eax
mov ecx, dword [ebp - 0x3644]
call fcn.00413780
test eax, eax
jne 0x413d80
push 4
push 0
lea ecx, [ebp - 0x1820]
call sym.Setup.exe_public:_wchar_t_const____thiscall_DuiLib::CDuiString::operator_wchar_t_const__void_const
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
push 0
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileW]
mov dword [ebp - 0x80c], eax
cmp dword [ebp - 0x80c], 0
jne 0x413db5
push 3
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
mov dword [ebp - 0x80c], eax
lea ecx, [ebp - 0x2c34]
call fcn.00405d40
lea ecx, [ebp - 0x1820]
call fcn.00405d40
cmp dword [ebp - 0x80c], 0
jne 0x413e4f
push 1
lea ecx, [ebp - 0x3640]
call fcn.004177c0
lea ecx, [ebp - 0x3640]
call fcn.004177f0
push eax
push 0
push str.gamepp
lea ecx, [ebp - 0x808]
call fcn.004177f0
push eax
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
push 3
lea ecx, [ebp - 0x3640]
call fcn.004177f0
push eax
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
mov dword [ebp - 0x80c], eax
push 5
mov ecx, dword [ebp + 0xc]
push ecx
lea ecx, [ebp - 0x3640]
call fcn.004177f0
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
mov dword [ebp - 0x80c], eax
mov edx, dword [ebp - 0x3644]
mov byte [edx + 0x1e7c], 0
mov eax, dword [ebp - 0x80c]
pop edi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00425912
mov esp, ebp
pop ebp
ret 8