Giter VIP home page Giter VIP logo

Comments (5)

WizzardMaker avatar WizzardMaker commented on June 30, 2024

It looks like the files seem to have a ~2346 byte header
All Files start with the same sequence

The first word (starting at 2495, going to 2508) seems to be the same in English as in American.

from game-file-formats.

RyanfaeScotland avatar RyanfaeScotland commented on June 30, 2024

Not sure how much this is being worked on these days WizzardMaker but thanks for the additional info!

from game-file-formats.

shlainn avatar shlainn commented on June 30, 2024

I have no idea where the original pseudocode came from, but it is obviously wrong. After a surprisingly short bit of brute forcing, I arrived at the following correct parameters for decrypting the text files:

        counter = 171
        operand = 0
        for each byte:
            byte += counter
            byte ^= 58
            byte += (131 - operand)
            operand = byte
            counter += 1
        }

Tested on the GOG.com version, seems fine to me.

The header observed by WizzardMaker is actually a block of instructions for the translators ;)

from game-file-formats.

shlainn avatar shlainn commented on June 30, 2024

A neat trick I found to save a lot of effort in determining the parameters of this decryption (should this ever be necessary again) is to check if after the decryption of any byte the byte value is still in the ASCII range (< 128). If it isn't, abort this attempt and try different parameters.

from game-file-formats.

shlainn avatar shlainn commented on June 30, 2024

Another interesting observation, which is sort of obvious in hindsight: In addition to the 171 / 58 / 131 combination described above, there are other combinations of parameters that work (thanks, brute force):

  • 107 186 67
  • 171 186 3
  • 107 58 195
  • 235 58 67
  • and certainly more.

from game-file-formats.

Related Issues (7)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.