I made such a tool a long time ago, see the attachment. You have to have Java (>=11, I think) installed, and you can run it via the command line with
Code:
java -jar map_crop.jar INPUT_FILE OUTPUT_FILE X Y WIDTH HEIGHT
If the output map crashes, you may have to convert the line endings to windows/CR-LF. Notepad++, for example, can do that. I couldn't find an easy way to enforce them in java, but if you run the program on windows it should work anyway.