the WDF files contain the same type of contents as the c3 and data folders, they are just like working dirctories, except the individual files are accessed differently, not through windows.
The packed WDFs have a very simple structure, it just contains all the files from a particular directory in order of their filename. The file header contains the number of files, and a pointer to the location after all the files are packed.
The data at this offset contains the location, size and ID for each packed file. The structure of the file data is this
to retrieve a paticulur file, just go to its offset and count <size> bytes after it, then copy into a new file. Maybe set space to a non-zero value to show its already been extracted, but thats not neccesary.
Now the only question left is where the filename is, and I'm still quite lost with it myself. I figure, filenames are actually stored in a seperate file, and we arent sent that file with the client.
The unique IDs are made via a hash algorithm, and the client makes use of this algorithm to find a file as its needed. All the filenames are stored in ini/ani files, and are accessed when they are needed. The client passes them through the algorithm, then it searched for the unique ID in the WDF file.
*EDIT* Forgot to mention, all filenames should be converted to all lowercase letters before being passed to the algorithm.
If anyone has the time to go through ani and ini files, and generate a list of filenames for data.wdf and c3.wdf, I'td be handy to make a fully functional extractor. The only exctractor I have now is passing a filename as an argument, and it generates the file 1 at a time. slow considering the 2 .wdfs contain about 25,000 files.
The packed WDFs have a very simple structure, it just contains all the files from a particular directory in order of their filename. The file header contains the number of files, and a pointer to the location after all the files are packed.
Code:
struct HEADER {
ULONG identifier; // = "PDFW"
ULONG fileamount
ULONG dataoffset;
}
Code:
struct FILEDATA {
ULONG uid //unique IDs
ULONG offset
ULONG size
ULONG space //always zero, probably meant for some flags.
}
Now the only question left is where the filename is, and I'm still quite lost with it myself. I figure, filenames are actually stored in a seperate file, and we arent sent that file with the client.
The unique IDs are made via a hash algorithm, and the client makes use of this algorithm to find a file as its needed. All the filenames are stored in ini/ani files, and are accessed when they are needed. The client passes them through the algorithm, then it searched for the unique ID in the WDF file.
*EDIT* Forgot to mention, all filenames should be converted to all lowercase letters before being passed to the algorithm.
If anyone has the time to go through ani and ini files, and generate a list of filenames for data.wdf and c3.wdf, I'td be handy to make a fully functional extractor. The only exctractor I have now is passing a filename as an argument, and it generates the file 1 at a time. slow considering the 2 .wdfs contain about 25,000 files.