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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10106a2e
mov eax, dword fs:[0]
push eax
mov eax, 0x2828
call fcn.10073a60
mov eax, dword [0x10150440]
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 dword [ebp - 0x2818], ecx
mov eax, dword [ebp + 0x14]
mov edi, dword [ebp + 8]
mov esi, dword [ebp + 0xc]
mov ebx, dword [ebp + 0x18]
mov dword [ebp - 0x2814], eax
push ebx
push dword [ebx + 4]
mov dword [ebp - 4], 0
push dword [ebx]
call fcn.10022270
mov eax, dword [ebx]
add esp, 0xc
mov dword [ebx + 4], eax
mov dword [ebp - 4], 0xffffffff
test edi, edi
je 0x1002495d
test esi, esi
je 0x1002495d
push 3
push esi
push edi
call fcn.100ade5d
add esp, 0xc
push 0x800
push 0
test eax, eax
je 0x100249ae
lea eax, [ebp - 0x1810]
push eax
call fcn.1008e9b0
push 0x800
lea eax, [ebp - 0x810]
push 0
push eax
call fcn.1008e9b0
push 0x400
lea eax, [ebp - 0x1810]
push esi
push eax
call fcn.100adde0
add esp, 0x24
lea eax, [ebp - 0x1810]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
lea eax, [ebp - 0x1810]
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHCreateDirectory]
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x10024949
push esi
call fcn.10005140
add esp, 4
test eax, eax
jne 0x10024949
lea eax, [ebp - 0x810]
push eax
push 0
push 0x1011cfa0
lea eax, [ebp - 0x1810]
push eax
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
lea eax, [ebp - 0x810]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
lea eax, [ebp - 0x810]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_MoveFileW]
test eax, eax
lea eax, [ebp - 0x810]
je 0x1002497d
push 4
push 0
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
mov eax, dword [ebp - 0x2814]
test eax, eax
je 0x10024949
mov dword [eax], 4
push 0
push esi
push edi
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
jne 0x100249a7
call dword [sym.imp.KERNEL32.dll_GetLastError]
xor eax, eax
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.10073638
mov esp, ebp
pop ebp
ret 0x14
push 0
push eax
push edi
call dword [sym.imp.KERNEL32.dll_CopyFileW]
push 5
push esi
lea eax, [ebp - 0x810]
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
mov eax, dword [ebp - 0x2814]
test eax, eax
je 0x100249a7
mov dword [eax], 5
mov eax, 1
jmp 0x1002495f
lea eax, [ebp - 0x1010]
push eax
call fcn.1008e9b0
push 0x400
lea eax, [ebp - 0x1010]
push esi
push eax
call fcn.100adde0
add esp, 0x18
lea eax, [ebp - 0x1010]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
lea eax, [ebp - 0x1010]
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHCreateDirectory]
push 3
push esi
push edi
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
test eax, eax
jne 0x1002495f
push str.move_file_fail
lea ecx, [ebp - 0x2814]
call fcn.100044e0
mov dword [ebp - 4], 1
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp - 0x2814]
push eax
lea ecx, [ebp - 0x2828]
call fcn.10022c20
push eax
mov ecx, ebx
mov byte [ebp - 4], 2
call fcn.10025ca0
lea ecx, [ebp - 0x2828]
call fcn.10023160
mov edx, dword [ebp - 0x2814]
or eax, 0xffffffff
mov dword [ebp - 4], 0xffffffff
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x10024a69
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push 0x800
lea eax, [ebp - 0x2010]
push 0
push eax
call fcn.1008e9b0
add esp, 0xc
lea eax, [ebp - 0x2010]
push eax
push 0
push 0x1011ceec
lea eax, [ebp - 0x1010]
push eax
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
test eax, eax
jne 0x10024ad8
push str.get_temp_file_name_fail
lea ecx, [ebp - 0x2814]
call fcn.100044e0
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 4], 3
call eax
push eax
lea eax, [ebp - 0x2814]
push eax
lea ecx, [ebp - 0x2828]
call fcn.10022c20
mov byte [ebp - 4], 4
jmp 0x10024b92
push 3
lea eax, [ebp - 0x2010]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
test eax, eax
je 0x10024b5d
lea eax, [ebp - 0x2010]
push eax
call fcn.10005140
add esp, 4
test eax, eax
jne 0x10024b14
mov ecx, dword [ebp - 0x2818]
push 4
push eax
lea eax, [ebp - 0x2010]
push eax
call fcn.10023d40
push 3
push esi
push edi
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
test eax, eax
jne 0x1002495f
push str.try_move_file_fail
lea ecx, [ebp - 0x2814]
call fcn.100044e0
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 4], 5
call eax
push eax
lea eax, [ebp - 0x2814]
push eax
lea ecx, [ebp - 0x2828]
call fcn.10022c20
mov byte [ebp - 4], 6
jmp 0x10024b92
push str.rename_old_file_fail
lea ecx, [ebp - 0x2814]
call fcn.100044e0
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 4], 7
call eax
push eax
lea eax, [ebp - 0x2814]
push eax
lea ecx, [ebp - 0x2828]
call fcn.10022c20
mov byte [ebp - 4], 8
push eax
mov ecx, ebx
call fcn.10025ca0
lea ecx, [ebp - 0x2828]
call fcn.10023160
lea ecx, [ebp - 0x2814]
mov dword [ebp - 4], 0xffffffff
call fcn.100045e0
push 0x800
lea eax, [ebp - 0x2810]
push 0
push eax
call fcn.1008e9b0
add esp, 0xc
lea eax, [ebp - 0x2810]
push eax
push 0
push 0x1011ceec
lea eax, [ebp - 0x1010]
push eax
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
push 3
lea eax, [ebp - 0x2810]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
mov ecx, dword [ebp - 0x2818]
lea eax, [ebp - 0x2810]
push 5
push esi
push eax
call fcn.10023d40
mov dword [ebp - 0x2818], eax
test eax, eax
jne 0x1002495f
push str.write_pending_fail
lea ecx, [ebp - 0x281c]
call fcn.100044e0
mov dword [ebp - 4], 9
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp - 0x281c]
push eax
lea ecx, [ebp - 0x2834]
call fcn.10022c20
push eax
mov ecx, ebx
mov byte [ebp - 4], 0xa
call fcn.10025ca0
lea ecx, [ebp - 0x2834]
call fcn.10023160
lea ecx, [ebp - 0x281c]
call fcn.100045e0
mov eax, dword [ebp - 0x2818]
jmp 0x1002495f