schluppo Guest

Posts: n/a





All that's needed now, is a program which replaces the correct parts of the stream-files with the entries from the conversion table



Edit: The conversion table that is generated by the newest version of the debugger coincides with the values from the comparison file in posting



Edit 2: I figured out three of the four remaining unknown bytes of an entry in the conversion table. Also I figured out the indexing.



Code: The first indexing value in the table is: 0x9900A. The first entry is: 4A 1A A0 53 64 B1 AA 2D 40 8E 4A 4D EF 4B 6B E5 (0x9900A+0x1AA)*0xC0 + 0x64 = 0x72D4764 // offset in the big file where the first 5 bytes are put to (0x9900A+0x1AA+0x053)*0xC0 + 0xB1 = 0x72D85F1 // offset in the big file where the second 5 bytes are put to ----- The second indexing value in the table is: 0x99C85. The second entry is: 8F 20 C0 11 AA 98 B6 F7 76 EC CB 7E 61 A3 C6 C1 (0x99C85+0x20C)*0xC0 + 0xAA = 0x736ED6A // offset in the big file where the third 5 bytes are put to (0x99C85+0x20C+0x011)*0xC0 + 0x98 = 0x736FA18 // offset in the big file where the fourth 5 bytes are put to



I don't know the meaning of the first 8 bits of the entries yet (checksum over the other 15 bytes?).



Anyway, it is now possible to code a program which takes a conversion table as input and then goes through a list of .m2ts files, repairing them. The debugger is now automatically XORing the entries from the correct segment of the conversion table with the current segment key whenever an event 0x220 is finished. Also it will now take the total number of segments from the conversion table and then invoke event 0x220 as often as necessary, until the complete table is decrypted. Once you press 'run' now, it will run until the conversion table is completely decrypted. The table is only dumped once, when the last event 0x220 was finished. The whole process takes around 30 seconds on my machine.All that's needed now, is a program which replaces the correct parts of the stream-files with the entries from the conversion tableEdit: The conversion table that is generated by the newest version of the debugger coincides with the values from the comparison file in posting #282 Edit 2: I figured out three of the four remaining unknown bytes of an entry in the conversion table. Also I figured out the indexing.So, the whole big file is cut down in blocks of 0xC0 bytes. The indexing value points to a section of around 0x300 of these small blocks. Bits 9-20 of the entry select one of the first ~0x26D of these blocks. Bits 21-32 select one of the remaining blocks. The sum of both numbers usually is around 0x1FF except for some cases where the first number is bigger than 0x200. Finally bytes 5 and 6 give the exact position inside the selected blocks.I don't know the meaning of the first 8 bits of the entries yet (checksum over the other 15 bytes?).Anyway, it is now possible to code a program which takes a conversion table as input and then goes through a list of .m2ts files, repairing them. Last edited by schluppo; 28th October 2008 at 14:43 .