DVV wrote: ↑
20 Jun 2012 00:10
There's a tiny command-line tool which can do this: bincmp 2.2 (http://sourceforge.net/projects/bincmp/files/bincmp2/
For your example, create a text file named "patch.txt" with the following lines:
Code: Select all
0004AE: 00 00
0004AF: 00 00
0004B0: 80 40
0004B1: 3F 3F
and execute "bincmp -patch patch.txt etc.exe". (Actually, just one byte at offset 0004B0 needs to be patched, so other lines are not necessary and will be ignored during patching.)
Probably im about 7 years late! but i just register to say thanks! this post, and the tool was very useful.
In order to demostrate my grateful im gonna explain (more clearly) about this process and i hope this help anyone else, like me, and dont have to spent a couple of hours testing and resereaching about this.
sorry if my english is not very good, im not american or british!
0.-For test this process create a folder called TEST in C:\ and paste the contents of bincmp zip inside.
after that open command line and type CD C:\TEST after that CD:\TEST\bincmp to open it.
this an example of how to insert bytes without patch file, probably in 2012, bincmp will not support that feature but now, actually does.
remember to follow the syntax order of the demo below
bincmp "file.exe" -patchstr "FA6238A: 8B 31; FA6238B: 87 C0; FA6238C: 3C 90; FA6238D: 01 90; FA6238E: 00 90; FA6238F: 00 90"
"file.exe" = the file that u want to insert bytes or replace hex values.
FA6238A: = is the offset, in HxD could appear like this: 0FA62380 just remove the 1st 0 and last 0, the A is talking about the block, 0,1,2,3,4,5,6,A,B,C,D,E,F in other words FA6238 its the row, and A its the column (represented with 0A in HxD)
8B= its the value that u want to change (old value) and the program will looking for.
31=its the value that u want to insert (new value) and the program will insert it.
Other values are examples.
i hope this help anyone else and become useful