Unless you know the format of the file contents there is not really any way to do it. You can try some guesswork and logical tests (I have done similar in the past) but it is really down to looking at the content, and figuring out what each byte or set of bytes is supposed to represent.
One of these days I'm going to think of a really clever signature.
What do you mean with getting the format? If it's a binary file and you don't know how to interpret its contents, I don't think you can get a format.
Regarding the reversion, thats quite easy, although I don't see the point in doing it. You could use the functions fread(), frwite() and the like to read it into a large enough char array, loop through it from back to front and write it byte by byte into a new file (assuming is is small enough to fit into memory).