If you need to replace all occurrences of text in a file that isn't a text file, XVI32 is a free hex editor that provides that capability. To use the program, download the zip file xvi32.zip and unzip the file to whatever directory you wish to place it in. There is no installation procedure, you simply run the xvi32.exe file from the directory where you placed it. To search for a string you wish to replace throughout a file, make sure you are at the beginning of the file (position 0), then click on Search on the program's toolbar then choose Replace.
Then put the text you wish to replace in the Find field (you may also need to check "as Unicode Latin (UTF-16LE)" if the file uses Unicode encoding, which is likely. Then put the replacement text in the Replace with field. Again you may need to check the box for "as Unicode Latin (UTF-16LR)". UTF-16 is a 16-bit Unicode Transformation Format.
Then click on the Replace all button. The program will tell you how many occurrences of the searched for text was replaced.
Choose File then Save to save the file you've edited with the changes you made.