Function at 0x40f8b0
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.00448ae0
mov eax, dword [0x5052a0]
xor eax, ebp
mov dword [ebp - 4], eax
push edi
mov dword [ebp - 0x3644], ecx
cmp dword [ebp + 8], 0
je 0x40f8da
cmp dword [ebp + 0xc], 0
jne 0x40f8e1
xor eax, eax
jmp 0x40feeb
push 1
lea ecx, [ebp - 0x1010]
call fcn.00415430
lea ecx, [ebp - 0x1010]
call fcn.00415480
push eax
mov eax, dword [ebp + 0xc]
push eax
lea ecx, [ebp - 0x1010]
call fcn.00415460
push eax
call fcn.00437963
add esp, 0xc
lea ecx, [ebp - 0x1010]
call fcn.00415460
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
lea ecx, [ebp - 0x1010]
call fcn.00415460
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHCreateDirectory]
push 1
lea ecx, [ebp - 0x808]
call fcn.00415430
lea ecx, [ebp - 0x808]
call fcn.00415460
push eax
push 0x400
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
mov dword [ebp - 0x181c], 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 - 0x181c], eax
cmp dword [ebp - 0x181c], 0
jne 0x40f99b
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 - 0x181c], eax
cmp dword [ebp - 0x181c], 0
je 0x40f9ae
mov eax, 1
jmp 0x40feeb
mov dword [ebp - 0x80c], 0
push 1
lea ecx, [ebp - 0x1818]
call fcn.00415430
lea ecx, [ebp - 0x1818]
call fcn.00415460
push eax
push 0
push 0x4dd174
lea ecx, [ebp - 0x808]
call fcn.00415460
push eax
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
mov dword [ebp - 0x1014], eax
cmp dword [ebp - 0x1014], 0
je 0x40fe61
xor edx, edx
mov word [ebp - 0x2c30], dx
push 0x206
push 0
lea eax, [ebp - 0x2c2e]
push eax
call fcn.0043ef50
add esp, 0xc
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 0x3648], ecx
lea edx, [ebp - 0x2c30]
mov dword [ebp - 0x364c], edx
mov eax, dword [ebp - 0x364c]
mov dword [ebp - 0x3650], eax
mov ecx, dword [ebp - 0x3648]
mov dx, word [ecx]
mov word [ebp - 0x3652], dx
mov eax, dword [ebp - 0x364c]
mov cx, word [ebp - 0x3652]
mov word [eax], cx
mov edx, dword [ebp - 0x3648]
add edx, 2
mov dword [ebp - 0x3648], edx
mov eax, dword [ebp - 0x364c]
add eax, 2
mov dword [ebp - 0x364c], eax
cmp word [ebp - 0x3652], 0
jne 0x40fa3d
lea ecx, [ebp - 0x2c30]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
lea edx, [ebp - 0x2c30]
add edx, 0xfffffffe
mov dword [ebp - 0x3658], edx
mov eax, dword [ebp - 0x3658]
mov cx, word [eax + 2]
mov word [ebp - 0x365a], cx
add dword [ebp - 0x3658], 2
cmp word [ebp - 0x365a], 0
jne 0x40faa1
mov edi, dword [ebp - 0x3658]
mov edx, dword [0x4dd188]
mov dword [edi], edx
push 1
lea ecx, [ebp - 0x2820]
call fcn.00415430
xor eax, eax
mov word [ebp - 0x2e40], ax
push 0x206
push 0
lea ecx, [ebp - 0x2e3e]
push ecx
call fcn.0043ef50
add esp, 0xc
lea edx, [ebp - 0x2e40]
push edx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
lea ecx, [ebp - 0x2820]
call fcn.00415460
push eax
push 0
push 0x4dd18c
lea eax, [ebp - 0x2e40]
push eax
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
lea ecx, [ebp - 0x2820]
call fcn.00415460
push eax
lea ecx, [ebp - 0x1820]
call fcn.00403da0
lea ecx, [ebp - 0x2c30]
push ecx
lea edx, [ebp - 0x2e40]
push edx
lea ecx, [ebp - 0x1820]
call fcn.0040bc30
lea ecx, [ebp - 0x1820]
call sym.Setup.exe_public:_wchar_t_const____thiscall_DuiLib::CDuiString::operator_wchar_t_const__void_const
push eax
mov eax, dword [ebp + 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileW]
xor ecx, ecx
mov word [ebp - 0x2a28], cx
push 0x206
push 0
lea edx, [ebp - 0x2a26]
push edx
call fcn.0043ef50
add esp, 0xc
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x3660], eax
lea ecx, [ebp - 0x2a28]
mov dword [ebp - 0x3664], ecx
mov edx, dword [ebp - 0x3664]
mov dword [ebp - 0x3668], edx
mov eax, dword [ebp - 0x3660]
mov cx, word [eax]
mov word [ebp - 0x366a], cx
mov edx, dword [ebp - 0x3664]
mov ax, word [ebp - 0x366a]
mov word [edx], ax
mov ecx, dword [ebp - 0x3660]
add ecx, 2
mov dword [ebp - 0x3660], ecx
mov edx, dword [ebp - 0x3664]
add edx, 2
mov dword [ebp - 0x3664], edx
cmp word [ebp - 0x366a], 0
jne 0x40fbb5
lea eax, [ebp - 0x2a28]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
lea ecx, [ebp - 0x2a28]
add ecx, 0xfffffffe
mov dword [ebp - 0x3670], ecx
mov edx, dword [ebp - 0x3670]
mov ax, word [edx + 2]
mov word [ebp - 0x3672], ax
add dword [ebp - 0x3670], 2
cmp word [ebp - 0x3672], 0
jne 0x40fc19
mov edi, dword [ebp - 0x3670]
mov ecx, dword [str.Temp_]
mov dword [edi], ecx
mov edx, dword [0x4dd1a4]
mov dword [edi + 4], edx
mov eax, dword [0x4dd1a8]
mov dword [edi + 8], eax
mov cx, word [0x4dd1ac]
mov word [edi + 0xc], cx
lea ecx, [ebp - 0x1818]
call fcn.00415460
push eax
lea ecx, [ebp - 0x2c34]
call fcn.00403da0
lea edx, [ebp - 0x2a28]
push edx
lea ecx, [ebp - 0x808]
call fcn.00415460
push eax
lea ecx, [ebp - 0x2c34]
call fcn.0040bc30
push 1
lea ecx, [ebp - 0x2020]
call fcn.00415430
lea ecx, [ebp - 0x2020]
call fcn.00415480
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.00415460
push eax
call fcn.00437963
add esp, 0xc
lea ecx, [ebp - 0x2020]
call fcn.00415460
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
lea ecx, [ebp - 0x2020]
call fcn.00415460
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 0x40fde5
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.0040f840
test eax, eax
jne 0x40fd5d
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 0x40fda4
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.0040f840
test eax, eax
jne 0x40fda4
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 eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_CopyFileW]
mov dword [ebp - 0x80c], eax
cmp dword [ebp - 0x80c], 0
jne 0x40fde3
push 3
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
mov dword [ebp - 0x80c], eax
jmp 0x40fe4b
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.0040f840
test eax, eax
jne 0x40fe16
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 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 0x40fe4b
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
lea ecx, [ebp - 0x2c34]
call fcn.00403e20
lea ecx, [ebp - 0x1820]
call fcn.00403e20
cmp dword [ebp - 0x80c], 0
jne 0x40fee5
push 1
lea ecx, [ebp - 0x3640]
call fcn.00415430
lea ecx, [ebp - 0x3640]
call fcn.00415460
push eax
push 0
push str.gamebuff
lea ecx, [ebp - 0x808]
call fcn.00415460
push eax
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
push 3
lea ecx, [ebp - 0x3640]
call fcn.00415460
push eax
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
mov dword [ebp - 0x80c], eax
push 5
mov eax, dword [ebp + 0xc]
push eax
lea ecx, [ebp - 0x3640]
call fcn.00415460
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
mov dword [ebp - 0x80c], eax
mov ecx, dword [ebp - 0x3644]
mov byte [ecx + 0x2084], 0
mov eax, dword [ebp - 0x80c]
pop edi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00434ee7
mov esp, ebp
pop ebp
ret 8