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

Disassembly:
push ebp
mov ebp, esp
push ebx
sub esp, 0x64
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov eax, dword [ebp + 8]
mov dword [esp], eax
call sym._fseek
mov eax, dword [ebp + 8]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 1
mov dword [esp + 4], 0xa
lea eax, [ebp - 0x42]
mov dword [esp], eax
call sym._fread
mov eax, dword [ebp + 0xc]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 1
mov dword [esp + 4], 0xa
lea eax, [ebp - 0x42]
mov dword [esp], eax
call sym._fwrite
mov eax, dword [ebp + 0x14]
mov dword [esp], eax
call sym._strlen
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x42]
add eax, 6
mov dword [esp], eax
call sym._getFrameSize
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0xc], 0
mov dword [ebp - 0x20], 0
jmp 0x401d66
mov eax, dword [ebp + 8]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 1
mov dword [esp + 4], 0xa
lea eax, [ebp - 0x4c]
mov dword [esp], eax
call sym._fread
lea eax, [ebp - 0x4c]
add eax, 4
mov dword [esp], eax
call sym._getFrameSize
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x20]
add eax, 0xa
add dword [ebp - 0xc], eax
mov eax, dword [ebp + 0x10]
mov dword [esp + 4], eax
lea eax, [ebp - 0x4c]
mov dword [esp], eax
call sym._isEqual
xor eax, 1
test al, al
je 0x401afb
cmp dword [ebp - 0x20], 0
js 0x401afb
cmp dword [ebp - 0x20], 0x186a0
jg 0x401afb
mov eax, esp
mov ebx, eax
mov eax, dword [ebp + 0xc]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0xa
mov dword [esp + 4], 1
lea eax, [ebp - 0x4c]
mov dword [esp], eax
call sym._fwrite
mov eax, dword [ebp - 0x20]
lea edx, [eax - 1]
mov dword [ebp - 0x24], edx
mov edx, eax
mov eax, 0x10
sub eax, 1
add eax, edx
mov ecx, 0x10
mov edx, 0
div ecx
imul eax, eax, 0x10
call fcn.00402d00
sub esp, eax
lea eax, [esp + 0x10]
add eax, 0
mov dword [ebp - 0x28], eax
mov edx, dword [ebp - 0x20]
mov eax, dword [ebp - 0x28]
mov ecx, dword [ebp + 8]
mov dword [esp + 0xc], ecx
mov dword [esp + 8], 1
mov dword [esp + 4], edx
mov dword [esp], eax
call sym._fread
mov edx, dword [ebp - 0x20]
mov eax, dword [ebp - 0x28]
mov ecx, dword [ebp + 0xc]
mov dword [esp + 0xc], ecx
mov dword [esp + 8], 1
mov dword [esp + 4], edx
mov dword [esp], eax
call sym._fwrite
mov esp, ebx
jmp 0x401d66
mov eax, dword [ebp + 0x10]
mov dword [esp + 4], eax
lea eax, [ebp - 0x4c]
mov dword [esp], eax
call sym._isEqual
test al, al
je 0x401d66
cmp dword [ebp - 0x20], 0
js 0x401d66
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x2c], eax
lea eax, [ebp - 0x42]
add eax, 6
mov dword [esp], eax
call sym._getFrameSize
sub eax, dword [ebp - 0x20]
mov edx, eax
mov eax, dword [ebp - 0x18]
add eax, edx
mov dword [esp + 4], eax
lea eax, [ebp - 0x42]
add eax, 6
mov dword [esp], eax
call sym._setFrameSize
mov eax, dword [ebp + 0xc]
mov dword [esp], eax
call sym._ftell
mov dword [ebp - 0x30], eax
mov dword [esp + 8], 0
mov dword [esp + 4], 6
mov eax, dword [ebp + 0xc]
mov dword [esp], eax
call sym._fseek
mov eax, dword [ebp + 0xc]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 1
mov dword [esp + 4], 4
lea eax, [ebp - 0x42]
add eax, 6
mov dword [esp], eax
call sym._fwrite
mov dword [esp + 8], 0
mov eax, dword [ebp - 0x30]
mov dword [esp + 4], eax
mov eax, dword [ebp + 0xc]
mov dword [esp], eax
call sym._fseek
mov dword [esp + 4], str.COMM
lea eax, [ebp - 0x4c]
mov dword [esp], eax
call sym._isEqual
test al, al
je 0x401be8
mov eax, dword [ebp - 0x18]
add eax, 4
mov dword [esp + 4], eax
lea eax, [ebp - 0x4c]
add eax, 4
mov dword [esp], eax
call sym._setFrameSize
jmp 0x401c2e
mov dword [esp + 4], str.TXXX
lea eax, [ebp - 0x4c]
mov dword [esp], eax
call sym._isEqual
test al, al
je 0x401c19
mov eax, dword [ebp - 0x18]
add eax, 2
mov dword [esp + 4], eax
lea eax, [ebp - 0x4c]
add eax, 4
mov dword [esp], eax
call sym._setFrameSize
jmp 0x401c2e
mov eax, dword [ebp - 0x18]
mov dword [esp + 4], eax
lea eax, [ebp - 0x4c]
add eax, 4
mov dword [esp], eax
call sym._setFrameSize
lea eax, [ebp - 0x4c]
add eax, 4
mov dword [esp], eax
call sym._getFrameSize
mov dword [ebp - 0x34], eax
mov eax, dword [ebp + 0xc]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 1
mov dword [esp + 4], 0xa
lea eax, [ebp - 0x4c]
mov dword [esp], eax
call sym._fwrite
mov dword [esp + 4], str.COMM
lea eax, [ebp - 0x4c]
mov dword [esp], eax
call sym._isEqual
test al, al
je 0x401cc6
mov dword [ebp - 0x10], 0
jmp 0x401ca1
mov eax, dword [ebp + 8]
mov dword [esp], eax
call sym._fgetc
mov edx, eax
mov eax, dword [ebp + 0xc]
mov dword [esp + 4], eax
mov dword [esp], edx
call sym._fputc
add dword [ebp - 0x10], 1
cmp dword [ebp - 0x10], 3
jle 0x401c81
mov eax, dword [ebp - 0x2c]
sub eax, 4
mov dword [esp + 8], 1
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov dword [esp], eax
call sym._fseek
jmp 0x401d45
mov dword [esp + 4], str.TXXX
lea eax, [ebp - 0x4c]
mov dword [esp], eax
call sym._isEqual
test al, al
je 0x401d2b
mov dword [ebp - 0x14], 0
jmp 0x401d06
mov eax, dword [ebp + 8]
mov dword [esp], eax
call sym._fgetc
mov edx, eax
mov eax, dword [ebp + 0xc]
mov dword [esp + 4], eax
mov dword [esp], edx
call sym._fputc
add dword [ebp - 0x14], 1
cmp dword [ebp - 0x14], 1
jle 0x401ce6
mov eax, dword [ebp - 0x2c]
sub eax, 2
mov dword [esp + 8], 1
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov dword [esp], eax
call sym._fseek
jmp 0x401d45
mov dword [esp + 8], 1
mov eax, dword [ebp - 0x2c]
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov dword [esp], eax
call sym._fseek
mov eax, dword [ebp - 0x18]
mov edx, dword [ebp + 0xc]
mov dword [esp + 0xc], edx
mov dword [esp + 8], 1
mov dword [esp + 4], eax
mov eax, dword [ebp + 0x14]
mov dword [esp], eax
call sym._fwrite
mov eax, dword [ebp - 0xc]
cmp eax, dword [ebp - 0x1c]
jle 0x4019e7
jmp 0x401d86
mov eax, dword [ebp + 0xc]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x38]
mov dword [esp], eax
call sym._fputc
mov eax, dword [ebp + 8]
mov dword [esp], eax
call sym._fgetc
mov dword [ebp - 0x38], eax
cmp dword [ebp - 0x38], 0xffffffff
jne 0x401d74
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov eax, dword [ebp + 0xc]
mov dword [esp], eax
call sym._fseek
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov eax, dword [ebp + 8]
mov dword [esp], eax
call sym._fseek
jmp 0x401de4
mov eax, dword [ebp + 8]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x38]
mov dword [esp], eax
call sym._fputc
mov eax, dword [ebp + 0xc]
mov dword [esp], eax
call sym._getc
mov dword [ebp - 0x38], eax
cmp dword [ebp - 0x38], 0xffffffff
jne 0x401dd2
nop
mov ebx, dword [ebp - 4]
leave
ret