Skip to content

[Bug] Missing edge case for script embedded in Tmr-Hiro .pac file #188

@StardustGogeta

Description

@StardustGogeta

In the srp.pac taken from this Tmr-Hiro visual novel by Lune, the embedded script file 00_00 is not recognized as a .srp script file.

In particular, the magic number checks at

else if (6 == file.View.ReadInt16 (entry.Offset+4) && 0x140050 == file.View.ReadUInt32 (entry.Offset+6))
and
|| 6 != arc.File.View.ReadInt16 (entry.Offset+4)
|| 0x140050 != arc.File.View.ReadUInt32 (entry.Offset+6))
fail to detect/extract the file correctly. In this script alone, it seems the Int16 value of 6 is replaced with 4 and the UInt32 magic number 0x140050 is replaced with 0x000050 instead, for reasons unknown.

To be clear, the 00_00 file is indeed a script file. Bypassing the checks above and exporting as a .srp file yields segments of readable text, as expected.

(There is another file, view06_04_02, that appears to be a potentially undetected .srp file as well, but the file contents are so short and so different from the others that it's hard to say.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions