Hi,
At first, I don't know how to search for this thing and where to turn regarding the topic. I tried to google it out, but had no success, this is why I'm turning here.
I'm trying to write an application that reads binary file data as input and puts this read data into a e.g. tree representation based on a descriptor file that defines which position and what quantity defines a specific field. The right descriptor file is chosen based on the name of the source input file.
The descriptor files are given, which are following standard C format and can point/link to other descriptor files if e.g. an unknown struct is used inside.
How could I implement an application that could show the right representation of a data file based on the logic of these descriptors instead of showing just the meaningless lines of hexa values?
I already implemented the solution for one of these data files, and it is represented well in this tree view, but I don't want to do the same for hundreds of like this, because it would be much nicer and quicker to have the code automatically match them.
I just would like to have the basic idea/suggestion, not the full explanation, so thanks for any ideas in advance!
Example:
xyz.bin:
00 21 AF 23 39 29 C4 ...
xyz_desc.c:
struct {
dword something;
byte secret_code;
byte gate_code;
byte explanation [20];
} some_struct;
representation based on descriptor:
something is 2207523.
secret code is 57.
etc....
Bookmarks