Function at 0x1005c64
Capabilities:
Check if file exists
Copy file
Get file size
Write file on windows

Disassembly:
mov eax, 0x1008832
call fcn.01008318
sub esp, 0x640
mov eax, dword [0x100a1c4]
mov ecx, dword [ebp + 0xc]
push esi
push edi
mov esi, 0x1002c9c
lea edi, [ebp - 0x18]
movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp + 8]
push eax
mov dword [ebp - 0x640], eax
mov dword [ebp - 0x63c], ecx
movsb byte es:[edi], byte [esi]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x1005cae
xor al, al
jmp 0x1005df9
mov esi, dword [ebp - 0x63c]
push ebx
xor ebx, ebx
cmp dword [esi + 0x10], ebx
je 0x1005df6
cmp dword [esi + 4], ebx
je 0x1005df6
mov edx, 0x81
xor eax, eax
mov word [ebp - 0x630], bx
mov ecx, edx
lea edi, [ebp - 0x62e]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov word [ebp - 0x220], bx
mov ecx, edx
xor eax, eax
lea edi, [ebp - 0x21e]
rep stosd dword es:[edi], eax
mov dword [ebp - 0x648], ebx
mov byte [ebp - 0x635], bl
stosw word es:[edi], ax
call fcn.0100508f
test al, al
je 0x1005d1a
push 1
push dword [ebp - 0x640]
call fcn.0100546e
call fcn.01005071
test al, al
je 0x1005d2e
push dword [ebp - 0x640]
call fcn.010057ed
push 0xc8
call dword [sym.imp.KERNEL32.dll_Sleep]
push dword [ebp - 0x640]
mov edi, dword [sym.imp.KERNEL32.dll_lstrcpyW]
lea eax, [ebp - 0x630]
push eax
call edi
push 0x1001ca8
lea eax, [ebp - 0x630]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatW]
push ebx
lea eax, [ebp - 0x630]
push eax
push dword [ebp - 0x640]
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
jne 0x1005d84
push ebx
push ebx
push 0x1002c70
call sub.MFC42u.dll_AfxMessageBox
push dword [ebp - 0x640]
lea eax, [ebp - 0x220]
push eax
call edi
push 0x1001cf4
lea eax, [ebp - 0x220]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatW]
push ebx
lea eax, [ebp - 0x220]
push eax
push dword [ebp - 0x640]
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
push ebx
push ebx
jne 0x1005dc6
push 0x1002c3c
jmp 0x1005df1
push 3
push ebx
push 1
push 0xc0000000
lea eax, [ebp - 0x220]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
mov dword [ebp - 0x634], edi
push ebx
jne 0x1005e11
push ebx
push 0x1002c14
call sub.MFC42u.dll_AfxMessageBox
xor al, al
pop ebx
mov ecx, dword [ebp - 0xc]
pop edi
mov dword fs:[0], ecx
mov ecx, dword [ebp - 0x10]
pop esi
call fcn.01007a24
leave
ret 8
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp dword [esi + 4], eax
jbe 0x1005e30
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
push ebx
push 0x1002be0
jmp 0x10060ab
push ebx
push ebx
add eax, 0xfffffff9
push eax
push edi
mov edi, dword [sym.imp.KERNEL32.dll_SetFilePointer]
call edi
push ebx
lea eax, [ebp - 0x648]
push eax
push 6
lea eax, [ebp - 0x18]
push eax
push dword [ebp - 0x634]
call dword [sym.imp.KERNEL32.dll_WriteFile]
push ebx
push ebx
push dword [esi + 4]
push dword [ebp - 0x634]
call edi
push ebx
lea eax, [ebp - 0x648]
push eax
push dword [esi + 0x10]
lea eax, [esi + 0x18]
push eax
push dword [ebp - 0x634]
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp eax, ebx
mov dword [ebp - 0x63c], eax
je 0x1005ec3
mov eax, dword [esi + 8]
cmp eax, ebx
jbe 0x1005ec3
cmp dword [esi + 0x14], ebx
jbe 0x1005ec3
push ebx
push ebx
push eax
push dword [ebp - 0x634]
call edi
push ebx
lea eax, [ebp - 0x648]
push eax
push dword [esi + 0x14]
add esi, 0x38
push esi
push dword [ebp - 0x634]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov dword [ebp - 0x63c], eax
push dword [ebp - 0x634]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x63c], ebx
je 0x10060a4
lea eax, [ebp - 0x220]
push eax
call fcn.01005afd
test eax, eax
jne 0x100609b
lea ecx, [ebp - 0x634]
call fcn.01007fb0
lea ecx, [ebp - 0x63c]
mov dword [ebp - 4], ebx
call fcn.01007fb0
lea ecx, [ebp - 0x644]
mov byte [ebp - 4], 1
call fcn.01007fb0
push dword [ebp - 0x640]
mov word [ebp - 0x428], bx
xor eax, eax
mov ecx, 0x81
lea edi, [ebp - 0x426]
rep stosd dword es:[edi], eax
lea ecx, [ebp - 0x634]
mov byte [ebp - 4], 2
stosw word es:[edi], ax
call fcn.01007ea8
push 0x5c
lea ecx, [ebp - 0x634]
call sub.MFC42u.dll_CString::ReverseFind
mov esi, eax
push esi
lea eax, [ebp - 0x64c]
push eax
lea ecx, [ebp - 0x634]
call sub.MFC42u.dll_CString::Left
push eax
lea ecx, [ebp - 0x63c]
mov byte [ebp - 4], 3
call sub.MFC42u.dll_CString::operator_1
lea ecx, [ebp - 0x64c]
mov byte [ebp - 4], 2
call sub.MFC42u.dll_CString::CString
mov eax, dword [ebp - 0x634]
mov eax, dword [eax - 8]
sub eax, esi
push eax
lea eax, [ebp - 0x64c]
push eax
lea ecx, [ebp - 0x634]
call sub.MFC42u.dll_CString::Right
push eax
lea ecx, [ebp - 0x644]
mov byte [ebp - 4], 4
call sub.MFC42u.dll_CString::operator_1
lea ecx, [ebp - 0x64c]
mov byte [ebp - 4], 2
call sub.MFC42u.dll_CString::CString
push dword [ebp - 0x63c]
lea eax, [ebp - 0x428]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
mov esi, dword [sym.imp.KERNEL32.dll_lstrcatW]
push 0x1002bcc
lea eax, [ebp - 0x428]
push eax
call esi
push dword [ebp - 0x644]
lea eax, [ebp - 0x428]
push eax
call esi
lea eax, [ebp - 0x428]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x1006033
call fcn.01005071
test al, al
je 0x100601e
lea eax, [ebp - 0x428]
push eax
call fcn.010057ed
push ebx
lea eax, [ebp - 0x428]
push eax
lea eax, [ebp - 0x220]
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileW]
push dword [ebp - 0x640]
lea eax, [ebp - 0x220]
push eax
call fcn.01005305
test al, al
je 0x1006061
cmp dword [0x100a6a4], ebx
mov byte [ebp - 0x635], 1
jne 0x100606d
push ebx
push ebx
push 0x1002bac
jmp 0x1006068
push ebx
push ebx
push 0x1002b68
call sub.MFC42u.dll_AfxMessageBox
lea ecx, [ebp - 0x644]
mov byte [ebp - 4], 1
call sub.MFC42u.dll_CString::CString
lea ecx, [ebp - 0x63c]
mov byte [ebp - 4], bl
call sub.MFC42u.dll_CString::CString
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x634]
call sub.MFC42u.dll_CString::CString
jmp 0x10060b0
push ebx
push ebx
push 0x1002b38
jmp 0x10060ab
push ebx
push ebx
push 0x1002b08
call sub.MFC42u.dll_AfxMessageBox
mov al, byte [ebp - 0x635]
jmp 0x1005df8