Function at 0x40acd2
Capabilities:
Check if file exists
Copy file
Delete file
Get common file path
Get file attributes
Move file
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x250
push ebx
push esi
push edi
mov byte [ebp - 0x84], 0
cmp dword [ebp + 8], 0
je 0x40ad40
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
mov dword [ebp - 0x88], eax
cmp dword [ebp - 0x88], 0xffffffff
je 0x40ad40
test byte [ebp - 0x88], 0x10
je 0x40ad40
mov eax, dword [ebp + 8]
push eax
lea eax, [ebp - 0x84]
push eax
call fcn.0041a850
add esp, 8
push 0x454984
lea eax, [ebp - 0x84]
push eax
call fcn.0041a84c
add esp, 8
movsx eax, byte [ebp - 0x84]
test eax, eax
jne 0x40ad72
push 0x64
lea eax, [ebp - 0x84]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
push 0x454988
lea eax, [ebp - 0x84]
push eax
call fcn.0041a84c
add esp, 8
push 0x454994
lea eax, [ebp - 0x84]
push eax
call fcn.0041a84c
add esp, 8
push 0x45499c
lea eax, [ebp - 0x84]
push eax
call fcn.0041a84c
add esp, 8
lea eax, [ebp - 0x84]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
jne 0x40ae20
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x40ae20
push 0x64
push 0x422ee0
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
push 0x4549a4
push 0x422ee0
call fcn.0041a84c
add esp, 8
push 0x4549b8
push 0x422ee0
call fcn.0041a84c
add esp, 8
push 0x4549c0
push 0x422ee0
call fcn.0041a84c
add esp, 8
push 0x422ee0
lea eax, [ebp - 0x84]
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileA]
lea eax, [ebp - 0x84]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
cmp dword [ebp + 0xc], 0
je 0x40aef6
mov eax, dword [ebp + 0xc]
push eax
lea eax, [ebp - 0x24c]
push eax
call fcn.0041a850
add esp, 8
push 0x4549c8
lea eax, [ebp - 0x24c]
push eax
call fcn.0041a84c
add esp, 8
push 0x4549cc
lea eax, [ebp - 0x24c]
push eax
call fcn.0041a84c
add esp, 8
push str..sys
lea eax, [ebp - 0x24c]
push eax
call fcn.0041a84c
add esp, 8
lea eax, [ebp - 0x1c8]
push eax
lea eax, [ebp - 0x24c]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov dword [ebp - 0x1cc], eax
cmp dword [ebp - 0x1cc], 0xffffffff
je 0x40aef6
push 0
lea eax, [ebp - 0x84]
push eax
lea eax, [ebp - 0x24c]
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileA]
test eax, eax
jne 0x40aee2
push 0x4000c
call fcn.004054a2
add esp, 4
mov eax, dword [ebp - 0x1cc]
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
mov eax, 0xffffffff
jmp 0x40afbb
mov eax, dword [ebp - 0x1cc]
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
xor eax, eax
jmp 0x40afbb
push 0
push pe_nt_image_headers32
push 2
push 0x423140
push 0
push 0xc0000000
lea eax, [ebp - 0x84]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [0x422ed4], eax
cmp dword [0x422ed4], 0xffffffff
jne 0x40af41
push 0x40003
call fcn.004054a2
add esp, 4
mov eax, 0xffffffff
jmp 0x40afbb
push 0
lea eax, [ebp - 0x250]
push eax
push 0xcc00
push 0x42a310
mov eax, dword [0x422ed4]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
jne 0x40af84
push 0x40004
call fcn.004054a2
add esp, 4
mov eax, 0xffffffff
jmp 0x40afbb
mov eax, dword [0x422ed4]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
jne 0x40afb4
push 0x40005
call fcn.004054a2
add esp, 4
mov eax, 0xffffffff
jmp 0x40afbb
xor eax, eax
jmp 0x40afbb
pop edi
pop esi
pop ebx
leave
ret