Function at 0x401200
Capabilities:
Copy file
Read file on windows
Write file on windows

Disassembly:
mov eax, 0x24a0
call fcn.00401610
push ebx
mov ebx, dword [esp + 0x24a8]
push ebp
push esi
push edi
mov edi, ebx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x20]
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x20]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
mov edi, str..sav
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebp, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebp
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebp
lea eax, [esp + 0x24]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
push ebx
call dword [sym.imp.KERNEL32.dll_CopyFileA]
mov edi, dword [sym.imp.KERNEL32.dll_CreateFileA]
push 0
push 0x80
push 3
push 0
push 0
lea ecx, [esp + 0x34]
push 0x80000000
push ecx
call edi
mov esi, eax
test esi, esi
mov dword [esp + 0x18], esi
jne 0x4012b9
lea edx, [esp + 0x20]
push edx
push str.cant_openfile__s
call fcn.00401450
add esp, 8
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x24a0
ret
push 0
push 0x80
push 2
push 0
push 0
push 0x40000000
push ebx
call edi
test eax, eax
mov dword [esp + 0x14], eax
jne 0x4012f6
push ebx
push str.cant_openfile__s
call fcn.00401450
add esp, 8
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x24a0
ret
mov ecx, 0x400
xor eax, eax
lea edi, [esp + 0x124]
push 0
rep stosd dword es:[edi], eax
stosb byte es:[edi], al
lea eax, [esp + 0x14]
lea ecx, [esp + 0x128]
push eax
push 0x1000
push ecx
push esi
mov dword [esp + 0x24], 0
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jle 0x40141b
lea ebp, [esp + 0x124]
lea ebx, [esp + 0x1128]
mov edx, dword [esp + 0x24b8]
push edx
push ebp
call fcn.00401590
add esp, 8
test eax, eax
je 0x4013b9
sub eax, ebp
mov esi, eax
push esi
push ebp
push ebx
mov dword [esp + 0x28], esi
call fcn.00401490
mov edx, dword [esp + 0x24c8]
or ecx, 0xffffffff
mov edi, edx
xor eax, eax
add esp, 0xc
add ebx, esi
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [esp + 0x24b8]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov eax, dword [esp + 0x1c]
mov edi, edx
not ecx
dec ecx
add ecx, eax
xor eax, eax
add ebp, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
add ebx, ecx
jmp 0x401340
mov edi, ebp
or ecx, 0xffffffff
xor eax, eax
push 2
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push eax
mov edx, ecx
mov esi, edi
mov edi, ebx
push eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [esp + 0x20]
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
lea eax, [esp + 0x10]
push 0
push eax
lea edi, [esp + 0x1130]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov dword [esp + 0x18], 0
push ecx
lea ecx, [esp + 0x1134]
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov esi, dword [esp + 0x18]
cmp dword [esp + 0x10], 0x1000
je 0x4012f6
mov edx, dword [esp + 0x14]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push edx
call edi
push esi
call edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x24a0
ret