Changing value(s) in hex editor

5.5k views Asked by At

I was in HxD, the hex editor to edit the data in the .dat files of my program. After done some research, I've found out that

8000000 = 00 12 7A 00,
1000000 = 40 42 0F 00,
800000 = 00 35 0C 00,
100000 = A0 86 01 00,
80000 = 80 38 01 00,
70000 = 70 11 01 00,
and 65536 = 00 00 01 00.

I tried changing the value from... let's say, 8000000 to 80000. It worked but when I tried to change the value to less than 65536, the hex editor warned me that

This replace operation changes the file size.

What should I do to prevent changing the file size and at the same time, change the value to

2500 = ?
250 = ?

Any help would be much appreciated.

1

There are 1 answers

0
KillPinguin On BEST ANSWER

As it seems the values are shown with Least Significant Byte first. Which means that

2500 = c4 09 00 00
250 = 8a 01 00 00 

(example: WolframAlpha: "250 to hex" -> 0x18a => reverse all bytes in groups of 2. Then add zeroes to fill up 4 Bytes)