Function at 0x40105a
Capabilities:
Read file on windows
Write file on windows

Disassembly:
jmp 0x401f80
sub esp, 0x208
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp]
push ebx
push ebp
push esi
push edi
mov edi, 0x406a04
xor ebx, ebx
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
shr ecx, 2
mov edi, edx
lea edx, [esp + 0x10]
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
or ecx, 0xffffffff
mov edi, str._temp1.exe
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebp, ecx
or ecx, 0xffffffff
mov edi, edx
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 edx, [esp + 0x114]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, 0x406a04
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x114]
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, str._temp2.exe
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 eax, dword [0x406624]
mov ecx, ebp
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.MSVCRT.dll_malloc]
mov edi, dword [sym.imp.MSVCRT.dll_fopen]
push 0x406650
push 0x406900
mov dword [0x406b0c], eax
call edi
mov esi, eax
add esp, 0xc
test esi, esi
je 0x4021cf
lea edx, [esp + 0x10]
push 0x40664c
push edx
call edi
mov ebp, eax
add esp, 8
test ebp, ebp
jne 0x402097
mov eax, dword [0x406b0c]
push eax
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x208
ret
mov ecx, dword [0x406624]
push 0
push ecx
push esi
call dword [sym.imp.MSVCRT.dll_fseek]
mov edi, dword [sym.imp.MSVCRT.dll_fread]
push esi
push 1
push 4
push 0x406b08
call edi
add esp, 0x1c
test eax, eax
jne 0x4020db
mov edx, dword [0x406b0c]
push edx
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x208
ret
mov eax, dword [0x406b0c]
push esi
push 4
push 1
push eax
call edi
add esp, 0x10
test eax, eax
je 0x402127
mov ecx, dword [0x406b08]
lea edx, [eax + ebx]
cmp edx, ecx
jle 0x402100
sub ecx, ebx
mov eax, ecx
push ebp
push eax
mov eax, dword [0x406b0c]
push 1
push eax
call dword [sym.imp.MSVCRT.dll_fwrite]
mov ecx, dword [0x406b0c]
push esi
push 4
push 1
push ecx
add ebx, eax
call edi
add esp, 0x20
test eax, eax
jne 0x4020ef
push ebp
call dword [sym.imp.MSVCRT.dll_fclose]
lea edx, [esp + 0x118]
push 0x40664c
push edx
xor ebp, ebp
call dword [sym.imp.MSVCRT.dll_fopen]
mov ebx, eax
add esp, 0xc
test ebx, ebx
jne 0x402166
mov eax, dword [0x406b0c]
push eax
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x208
ret
mov ecx, dword [0x406624]
mov edx, dword [0x406b08]
push 0
lea eax, [edx + ecx + 4]
push eax
push esi
call dword [sym.imp.MSVCRT.dll_fseek]
mov ecx, dword [0x406b0c]
push esi
push 4
push 1
push ecx
call edi
add esp, 0x1c
test eax, eax
je 0x4021bc
mov edx, dword [0x406b0c]
push ebx
push eax
push 1
push edx
call dword [sym.imp.MSVCRT.dll_fwrite]
add ebp, eax
mov eax, dword [0x406b0c]
push esi
push 4
push 1
push eax
call edi
add esp, 0x20
test eax, eax
jne 0x402195
mov edi, dword [sym.imp.MSVCRT.dll_fclose]
push ebx
call edi
push esi
call edi
add esp, 8
test ebp, ebp
jne 0x4021ea
mov ecx, dword [0x406b0c]
push ecx
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x208
ret
mov edx, dword [0x406b0c]
push edx
call dword [sym.imp.MSVCRT.dll_free]
lea eax, [esp + 0x14]
push 1
push eax
call fcn.00401087
lea ecx, [esp + 0x120]
push 1
push ecx
call fcn.00401087
add esp, 0x14
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x208
ret