Your problem is easily solved with nearly any programming language... except Windows batch :(
It is nearly impossible with Windows batch if your file is longer than 8192 bytes because batch variables are limited to 8192 characters. There is a complicated method that uses FC /B to effectively read one byte at a time, expressed as hex. It would be relatively easy to do the counting. But then each hex code would need to be converted back into the character value. You do not want to go through all that pain, except for maybe academic interest.
You could use PowerShell, VBScript, or JScript to easily do what you want.
But if you want to stick with batch, then you will need a non-standard utility to help you.
There are free utilities you could download that would make the solution trivial. For example, sed for Windows could make short work of this problem.
I have written a hybrid JScript/batch utility called REPL.BAT that performs regular expression search and replace on stdin, and writes the result to stdout. The utility is pure script that works on any Windows machine from XP onward - no exe download required. REPL.BAT is available here. Complete documentation is embedded within the script.
Assuming REPL.BAT is either in your current directory, or better yet, somewhere within your PATH, then the following simple batch script should do the trick. The script takes the name of the file to modify as the first and only argument. The file spec can include path information. Be sure to enclose the file in quotes if it contains spaces or other special characters.
@echo off
type %1|repl "^.{240}(.*).{82}$" "$1"|repl ".{100}" "$&\r\n" x >"%~1.mod"
move /y "%~1.mod" %1 >nul