-I play a low-grade game called Conquer Online.
-My system can easily run 10+ clients, so I can play on many characters interchangeably.
-The .exe limits you to two clients running at a time.
-This can be changed by opening the .exe in a hex editor and changing a few bytes.
-Every time the game patches (multiple times a week) I have to make this edit and a few others again. It's getting kind of old.
-The bytes that need to be changed are always the same, so I'd like to automate this process by making a program that will change these bytes when I run it.
Is there a way to hex edit a file in this way that is simple, like standard fstream and binary fstream? I'd really appreciate it if someone could muster up a quick sample code for me if they have the time. Here's an example of a change that needs to be made:
-byte 15B3A0 needs to be changed from 'E'(45) to 'e'(65).
One solution is to open the file like a normal file. Then you can use the seekp() function to go to the position you want. There you write the char you want and then the remaining of the file.
I could be wrong, but I don't think that approach will work. I'm pretty sure if you use seekp() and then call write() or put(), you will end up deleting everything in the file and merely putting the one character in. If it works, then great, but if it doesn't, you may have to read the entire file in, alter the byte in memory, the write the whole thing out to file again. I would be interested to know if the above method works though.