Difference between revisions of "Language Files (ENGLISH.DAT and GERMAN.DAT)"

From WTFwiki
Jump to navigation Jump to search
(Added documentation for the language file format)
 
m (1 revision)
 
(No difference)

Latest revision as of 22:47, 4 January 2013

This file format was reverse engineered by bveina and this documentation is based on his notes

The language files (OMF ships with english and german translations) are structured as follows:

N String Blocks:
 String Offset: 1 DWORD
 String Description: 32 byte null padded string
Data Block extending to end of file.

The String offset from the string block tells you the start point of that particular string. The end point of the string is the start point of the next string. The string data is encrypted in a similar way to the CHR file data.

Decryption is as follows:

  • Obtain the length of the string (next string' start point - current string's start point)
  • Obtain the 'seed' value. This is the low byte of the length (length & 0xFF)
  • Loop over data character by character until the end point is met
  • At each loop iteration: XOR the result with the seed to obtain the decrypted character and increment the seed each iteration.

When you get to a block that has its string offset as a point after the end of the file, you're done.

External Links

--Andrew 00:48, 1 March 2007 (EST)