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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x22c
push edi
push esi
push ebx
add esp, 0xfffffff8
push 0x401452
push dword [ebp + 0xc]
call sub.msvcrt.dll_fopen
mov dword [ebp - 0x214], eax
mov eax, dword [ebp + 8]
mov dword [eax + 0x3f54], 0
mov dword [eax + 0x3f50], 0
mov dword [eax + 0x3f4c], 0x3d090
add esp, 0xfffffff4
push 0x401455
call sub.msvcrt.dll_printf
add esp, 0x20
add esp, 0xfffffff4
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x3f4c]
add eax, eax
push eax
call fcn.00408b94
mov ecx, dword [ebp + 8]
mov dword [ecx + 0x3f48], eax
add esp, 0x10
lea eax, [ebp - 0x20c]
mov dword [ebp - 0x21c], eax
jmp 0x4016f0
add esp, 0xfffffff8
push eax
push 0x40146d
call sub.msvcrt.dll_printf
lea edx, [ebp - 0x200]
mov dword [ebp - 0x218], edx
push edx
lea ebx, [ebp - 0x100]
push ebx
push 0x401471
mov ecx, dword [ebp - 0x214]
push ecx
call sub.msvcrt.dll_fscanf
add esp, 0x20
add esp, 0xfffffff8
push ebx
mov eax, dword [ebp - 0x20c]
lea eax, [eax + eax*4]
lea eax, [eax + eax*4]
mov edx, dword [ebp + 8]
lea eax, [edx + eax*4 + 0x12c]
push eax
call sub.msvcrt.dll_strcpy
mov esi, 0x401476
mov edi, dword [ebp - 0x218]
mov ecx, 2
cld
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
je 0x401581
sbb eax, eax
or al, 1
add esp, 0x10
test eax, eax
jne 0x401599
mov eax, dword [ebp - 0x20c]
mov ecx, dword [ebp + 8]
mov byte [eax + ecx + 0x96], 0
mov esi, 0x401478
mov edi, dword [ebp - 0x218]
mov ecx, 2
cld
test al, 0
repe cmpsb byte [esi], byte es:[edi]
jne 0x40162b
mov eax, dword [ebp - 0x20c]
mov edx, dword [ebp + 8]
mov byte [eax + edx + 0x96], 1
lea eax, [ebp - 0x204]
push eax
lea eax, [ebp - 0x208]
push eax
push 0x40147a
mov ecx, dword [ebp - 0x214]
push ecx
call sub.msvcrt.dll_fscanf
add esp, 0x10
mov eax, dword [ebp + 8]
cmp dword [eax + 0x2a4ec], 0
jle 0x401600
mov edx, dword [ebp - 0x20c]
mov al, byte [eax + 0x2a4ec]
jmp 0x40160c
mov edx, dword [ebp - 0x20c]
mov al, byte [ebp - 0x208]
mov ecx, dword [ebp + 8]
mov byte [edx + ecx], al
mov eax, dword [ebp - 0x20c]
shl eax, 2
mov edx, dword [ebp + 8]
fld dword [ebp - 0x204]
fstp dword [eax + edx + 0x3cf0]
add esp, 0xfffffff8
push 0x401410
push ebx
call sub.msvcrt.dll_fopen
mov dword [ebp - 0x210], eax
push eax
push 0x2c
push 1
mov esi, dword [ebp + 8]
add esi, 0x5dd0
push esi
call sub.msvcrt.dll_fread
mov eax, dword [ebp - 0x20c]
lea edx, [eax + eax*4]
lea edx, [eax + edx*2]
mov ecx, dword [ebp + 8]
lea edi, [ecx + edx*4 + 0x3f58]
cld
mov ecx, 0xb
rep movsd dword es:[edi], dword [esi]
mov eax, dword [ebp + 8]
mov ebx, dword [eax + 0x5df8]
shr ebx, 1
add esp, 0x20
mov edx, dword [ebp - 0x210]
push edx
push 2
push ebx
mov eax, dword [eax + 0x3f50]
add eax, eax
mov ecx, dword [ebp + 8]
add eax, dword [ecx + 0x3f48]
push eax
call sub.msvcrt.dll_fread
mov edx, dword [ebp - 0x20c]
shl edx, 2
mov ecx, dword [ebp + 8]
mov eax, dword [ecx + 0x3f50]
mov dword [edx + ecx + 0x5920], eax
mov dword [edx + ecx + 0x5b78], ebx
add ebx, dword [ecx + 0x3f50]
mov dword [ecx + 0x3f50], ebx
add esp, 0xfffffff8
push ebx
push 0x40147f
call sub.msvcrt.dll_printf
add esp, 0x20
add esp, 0xfffffff4
mov eax, dword [ebp - 0x210]
push eax
call sub.msvcrt.dll_fclose
add esp, 0x10
add esp, 0xfffffffc
mov edx, dword [ebp - 0x21c]
push edx
push 0x40146a
mov ecx, dword [ebp - 0x214]
push ecx
call sub.msvcrt.dll_fscanf
mov eax, dword [ebp - 0x20c]
add esp, 0x10
test eax, eax
jge 0x401510
mov eax, dword [ebp + 8]
mov dword [eax + 0x3f54], 0x96
add esp, 0xfffffff4
mov edx, dword [ebp - 0x214]
push edx
call sub.msvcrt.dll_fclose
add esp, 0x10
mov ecx, dword [ebp + 8]
cmp dword [ecx + 0x2a418], 0
je 0x4017be
add esp, 0xfffffff8
push 0x401489
mov eax, ecx
add eax, 0x2a488
push eax
call sub.msvcrt.dll_fopen
mov dword [ebp - 0x214], eax
push eax
push 1
push 0x5dd0
mov eax, dword [ebp + 8]
push eax
call sub.msvcrt.dll_fwrite
add esp, 0x20
mov edx, dword [ebp - 0x214]
push edx
push 1
push 4
mov eax, dword [ebp + 8]
add eax, 0x3f50
push eax
call sub.msvcrt.dll_fwrite
mov ecx, dword [ebp - 0x214]
push ecx
push 2
mov eax, dword [ebp + 8]
push dword [eax + 0x3f50]
push dword [eax + 0x3f48]
call sub.msvcrt.dll_fwrite
add esp, 0x20
add esp, 0xfffffff4
mov edx, dword [ebp - 0x214]
push edx
call sub.msvcrt.dll_fclose
lea esp, [ebp - 0x238]
pop ebx
pop esi
pop edi
leave
ret