Live data from Hacker News

Reverse Engineering Unknown File Formats with ImHex

werwolv.net

41–50 of 55 posts

Re: Reverse Engineering Unknown File Formats with ImHex

#41

- stupid question: do you have any ideas how to go about doing this on a .unr file - it comes from a game called splinter cell conviction made in custom unreal 2.5 - I have neither been able to get UE-Explorer or UEViewer to work with it - I can send you the file, I just want to know how to change enemy AI spawn types on it

Might want to look into FModel (https://fmodel.app/) and how the Star Wars Republic Commando modders do things [1][2].

[1] https://www.moddb.com/games/star-wars-republic-commando/tuto...

[2] https://github.com/SWRC-Modding/CT

Re: Reverse Engineering Unknown File Formats with ImHex

#45
The DSL (domain specific language) for defining data formats in ImHex seems really cool. I have never seen a language that mixes logic into definitions of data structures quite like that before.

It wouldn't at all suit a general purpose compiled programming language (the best you can do there is templates or similar), but here it seems really neat. I haven't looked into it (maybe this exists), but I would love to see this DSL as a library or a code generator, to help with parsing custom binary formats in my own programs. This is much easier for this specific purpose than even parser combinators (which is what I would typically use, e.g. winnow in Rust).

Re: Reverse Engineering Unknown File Formats with ImHex

#47

The DSL (domain specific language) for defining data formats in ImHex seems really cool. I have never seen a language that mixes logic into definitions of data structures quite like that before. It wouldn't at all suit a general purpose compiled programming language (the best you can do there is templates or similar), but here it seems really neat. I haven't looked into it (maybe this exists), but I would love to see…

Kaitai Struct is also pretty good and will generate code in several languages.

Re: Reverse Engineering Unknown File Formats with ImHex

#48

The DSL (domain specific language) for defining data formats in ImHex seems really cool. I have never seen a language that mixes logic into definitions of data structures quite like that before. It wouldn't at all suit a general purpose compiled programming language (the best you can do there is templates or similar), but here it seems really neat. I haven't looked into it (maybe this exists), but I would love to see…

Kaitai Struct is also pretty good and will generate code in several languages.

Interesting. Though after looking at the examples on their home page and skimming the examples it looks more limited than the imhex format. But that could just be because I don't know this library well enough.

Re: Reverse Engineering Unknown File Formats with ImHex

#49
post #19

I finally dipped into using ImHex when doing some reversing of the PS2 memory card format for https://ps2iodb.com . The program is so good, and has enough of a reputation that I knew to reach for it even though I know nothing about reversing, and that was 3-4 years ago now! Also shoutout to the awesome GUI library is uses; https://github.com/ocornut/imgui

A few attempts using it over the years has usually resulted in frustration and giving up after determining it to be a non-starter.

Past attempts to use after downloading and running it natively have revealed it to be very crashy. Trying the browser-based demo today and doing the first thing that comes to mind (loading a ZIP) produces an error that the pattern language interpreter can't resolve the "import std.mem" line, for which there seem to be no hits on Google.

The poor font rendering is also not ideal, nor the fact that the "immediate mode" approach to the GUI (perversely favored by the kinds who tend to identify with software craftsmanship, including ostensible focus on performance, including opposition to bloat and unnecessary resource use) also means fans are constantly spinning up. Running these kinds of apps is basically the same as running a game...

Post reply on HN