How can i open a file and write to it while it not running. Lets say to change a value at a specific offset. i dont like write process memory thingy cuz the rogram has to be running. i want to do the change when the program isnt running.

What im trying to do is test the security of a program i have. My friend is trying to teach me how to make it hard to break into. So im trying to see if its possible .