I'm reverse engineering a proprietary file format that contains a set of points to construct a curve (FL Studio's .fnv format). What i have trouble with in particular is how the Y-coordinates are saved in the file. The Y-coordinate of a point is represented between 0 and 1, inclusively, although i doubt it's a fixed-point encoding. HxD didn't recognize it and the float values were seemingly garbage. Here's what I've found currently:
Let's say the point we have has the coordinate of 0.0124069480225444
. If we look into it's .fnv file we would observe in that place these bits:
01100000 11010000 01101000 10001001
What I've tried doing was to take the binary representation of that float using this handy tool and seeing what was similar:
00111100 01001011 01000110 10000011
Then, bitshift three to the right
00000111 10001001 01101000 11010000
And reverse the order of the last three bytes:
00000111 110100000 1101000 10001001
The last tree bytes do match up with the original value found on all of the files that I've tested, but the first byte always seems to be 00000111
, which hasn't showed up in any of the files I've seen. It must be something related to the exponent part of IEEE-754 but I'm unsure.
So my question is - am i missing something obvious? I'm a bit new to the world of reverse engineering so i'd appreciate your help
File examples - see 4 bytes at 0x17-0x1B