<commit_before>tip-toi-reveng
==============

Trying to understand the file format of Tip Toi

What we know
============

All offsets are from the beginning of the file.
 * At offset 4 is a 32bit offset of an ogg file table
 * The ogg file table consists of pairs of offsets and length, and ends with zeros
 * The ogg file is encrypted using a simple scheme, using a magic XOR value:
   - 0 is left alone
   - the XOR value is left alone
   - everything else is XORed bytewise by the value

What we have
============

OGG files with correct OGG header, Vorbis metadata, but do not play, and has “holes”. Encryption scheme incomplete?


XOR-Values:
===========

(Find with findxor.hs)

 * WWW_Bauernhof.gme: 0xAD
 * WWW_Feuerwehr.gme: 0x3B
 * Leserabe_een.gme: 0xDD<commit_msg>Firmware hints<commit_after>tip-toi-reveng
==============

Trying to understand the file format of Tip Toi

What we know
============

All offsets are from the beginning of the file.
 * At offset 4 is a 32bit offset of an ogg file table
 * The ogg file table consists of pairs of offsets and length, and ends with zeros
 * The ogg file is encrypted using a simple scheme, using a magic XOR value:
   - 0 is left alone
   - the XOR value is left alone
   - everything else is XORed bytewise by the value

What we have
============

OGG files with correct OGG header, Vorbis metadata, but do not play, and has “holes”. Encryption scheme incomplete?

Some OGG files have the XOR value in the header and still have a correct checksum, so the scheme above seems to be on the right track.


XOR-Values:
===========

(Find with findxor.hs)

 * WWW_Bauernhof.gme: 0xAD
 * WWW_Feuerwehr.gme: 0x3B
 * Leserabe_een.gme: 0xDD

Firmware decoding
=================

Running `arm-linux-gnueabi-objdump --architecture=arm -b binary -D Update3202.upd` disassembles the ARM firmware. At 0x6db0 begins a function that *might* do the XOR decoding. Another candidate is 0x29518.
{'fraction_non_alphanumeric': 0.10605276771857217, 'fraction_numerical': 0.015002586652871184, 'mean_word_length': 3.921119592875318, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5021550', 'n_tokens_mistral': 637, 'n_tokens_neox': 588, 'n_words': 279}