3 ms·
Earlier today, I was playing around with doing some video game save file editing, and any of the tools that would have been useful in that endeavor is what I th
by jcranmer 5y ago
Earlier today, I was playing around with doing some video game save file editing, and any of the tools that would have been useful in that endeavor is what I think they would be looking for. That is to say:
* Start with a hex editor--you need to read and write (but mostly read) the binary data of a file.
* Fast exploratory decoding: this sequence of bytes might be a uint8_t, int64_t, null-terminated string, double, etc... tell me all of the possible values that might be lurking there, so that I can guess where precisely a value is stored.
* Structure editing: binary files are usually structured, so I want to be able to say what the structure is for this data. Like maybe there's an int count of entries, and the entries are variably sized (so grab the full size from the middle of the struct), and let me code that into the editor so I can see where entry #342 is. Notably, this also lets me check if what I think is a size is actually a size.
* Structure guessing: of course, part of the issue with reverse engineering the format is that you're often unsure of much of the data, so you also need to be able to fill on only small sections of the struct. I know that a struct is, say, 540 bytes, and that byte 148 was something I was interested, but I don't know what's going on for the preceding 100 bytes, so don't make me fill anything in. Or when I do find something interesting in there, make it easy for me to designate something there without trying too hard.
One of the issues you run into is there's not really any good way to convey the structure format of binary data--C structs are just way, way too underpowered (as they are fixed size, so there's no way to convey "this array has <field #5> elements in it" or worse "this array has as many elements until <end-of-stream>").