I've got my own Data Editor and the SAH/SAF Format is pretty simple..
First, we need 2 Method's, 1 for reading Files & 1 for reading Directories
ReadFiles
Code:
4 Byte - Filecount
for( i = 0; i < Filecount, i++ ) {
N Byte - Filename (until \0)
8 Byte - Offset (the absolute Offset for SAF, to find the File Data)
4 Byte - Filedata Length
4 Byte - Unknown Data (just read it & put it back on writing ;p)
}
ReadDirs
Code:
4 Byte - Filecount
for( i = 0; i < Filecount, i++ ) {
4 Byte - Namelength (includes \0)
N Byte - Filename (Namelength Bytes)
// thats all for this Dir
// but here comes the "Tree-like" thing
ReadFiles(); // we read all Files in this Dir
ReadDirs(); // and we read all sub-Dirs in this Dir, which again reads all Files & sub-Dirs in it..
}
Thats for the Struct itself..
After opening the SAH File, start at Offset 56 for reading the File-"Tree"-Struct.
The first 56 Bytes are the Header, which includs some Keydata. This key will be checked by the GameGuard on startup!
So you need an GG bypass to use your own packed SAH File =|
On Offset 56, start ReadFiles() and then ReadDirs().
So you got all Files in the head-dir, call it "data", and then all sub-dirs in it... and so on.
Pseudo:
Code:
handle = OpenFile( "path/to/data.sah" );
SetOffset( handle, 56 );
ReadFiles();
ReadDirs();
CloseFile( handle );
Thats for SAH... SAF is pretty more simpe.. just read at the Offset you got on the ReadFiles() Method.
Read <Filelength> Bytes & save it to the <Filename>.. no Compression oder Encryption are used here ;p
Thats all i got in 1-2 Days of Hex analys, never checked the 4 unknow bytes or Algo for head-key.. its simple enough to bypass the GG, so noone need that shit. =)
PS: Yes, this Conent may be used for free, CENSORED.. its a shame to request money for that shit... f*ck it up..