I thought of an interesting alternative to registry, but I'm not sure how to pull it off.
The idea is declare an empty global variable, somehow get it's position in the .exe file and then edit the content remotely with another program.
Is there a way to get the variables position? And if there is, would it work?
|Is there a way to get the variables position?|
You can search for the value in the data segment using a hex editor. Give it some distinct value to make this easier (e.g. 1163019592 if it is a 32-bit integer).
|And if there is, would it work?|
Yes, certainly. Be aware of optimizations, though.
Last edited on
You can write any content to the end of the executable file itself. Windows loader does not have any problems running such executables.
You can also make space with a custom resource and find it at runtime with FindResource.