Today I was reversing the structure of .cache files that Warhammer online uses to store the information that is sent by the server.
I Think that there are two types of .cache files, One that contains String and another one that contains binary data.
Here is the result of the struct that I investigated, If is a file that only contains strings, this is the structure type:
0x0 // INT32 allways 11 - File version .... 0xC // INT32 Number of rows ... 0x14 // ARRAY INT32 OFFSETS This points to strings, the array must be 0xC lenght
So knowing this I made a PHP Class that prints all data, here is the example of usage:
$MyCache = new WarCache(); $MyCache->Cache_Open("URLs.cache"); $MyCache->Cache_HeaderInfo(); $MyCache->Cache_Read_Data();
And the result:
http://www.warhammeronline.com http://help.warhammeronline.com/ https://accounts.eamythic.com/ http://www.warhammeronline.com/trial/upgrade.php http://mythicmktg.fileburst.com/war/us/home/flash/WAR_cinematic_08.html
All string are UNICODE so I made some changes at the hexToStr() function that will help us to convert HEX to UnicodeString.
And another interesting thing, to know the lenght of the string I substract the next offset of the actual position to the actual position, like this:
$Total_Bytes_To_Read = hexdec($this->Cache_Offsets[$x+1]) - hexdec($this->Cache_Offsets[$x]); //It's reversed!