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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10106a1e
mov eax, dword fs:[0]
push eax
mov eax, 0x2828
call fcn.10073a60
mov eax, dword [0x1015050c]
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.10022260
mov eax, dword [ebx]
add esp, 0xc
mov dword [ebx + 4], eax
mov dword [ebp - 4], 0xffffffff
test edi, edi
je 0x1002498d
test esi, esi
je 0x1002498d
push 3
push esi
push edi
call fcn.100ade5d
add esp, 0xc
push 0x800
push 0
test eax, eax
je 0x100249de
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 0x10024979
push esi
call fcn.10005140
add esp, 4
test eax, eax
jne 0x10024979
lea eax, [ebp - 0x810]
push eax
push 0
push 0x1011d180
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 0x100249ad
push 4
push 0
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
mov eax, dword [ebp - 0x2814]
test eax, eax
je 0x10024979
mov dword [eax], 4
push 0
push esi
push edi
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
jne 0x100249d7
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 0x100249d7
mov dword [eax], 5
mov eax, 1
jmp 0x1002498f
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 0x1002498f
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.10022c10
push eax
mov ecx, ebx
mov byte [ebp - 4], 2
call fcn.10025d10
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 0x10024a99
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 0x1011d0cc
lea eax, [ebp - 0x1010]
push eax
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
test eax, eax
jne 0x10024b08
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.10022c10
mov byte [ebp - 4], 4
jmp 0x10024bc2
push 3
lea eax, [ebp - 0x2010]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
test eax, eax
je 0x10024b8d
lea eax, [ebp - 0x2010]
push eax
call fcn.10005140
add esp, 4
test eax, eax
jne 0x10024b44
mov ecx, dword [ebp - 0x2818]
push 4
push eax
lea eax, [ebp - 0x2010]
push eax
call fcn.10023d70
push 3
push esi
push edi
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
test eax, eax
jne 0x1002498f
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.10022c10
mov byte [ebp - 4], 6
jmp 0x10024bc2
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.10022c10
mov byte [ebp - 4], 8
push eax
mov ecx, ebx
call fcn.10025d10
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 0x1011d0cc
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.10023d70
mov dword [ebp - 0x2818], eax
test eax, eax
jne 0x1002498f
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.10022c10
push eax
mov ecx, ebx
mov byte [ebp - 4], 0xa
call fcn.10025d10
lea ecx, [ebp - 0x2834]
call fcn.10023160
lea ecx, [ebp - 0x281c]
call fcn.100045e0
mov eax, dword [ebp - 0x2818]
jmp 0x1002498f