benilla-re systems structs docs

ComputeTocDigest

function · unassigned · orchestration

Address
0x6f1200 · 108 bytes, up to 0x6f126b
Signature
void __fastcall (const char *toc, const char *file, uint8_t *digest)
Meaning
Computes the MD5 digest a toc's signature is checked against
Confidence
verified, proof two
Finding
ui/framexml#the-signature-digest

Finding: The signature digest in ui: loading the interface from toc and XML files

0x6f1200(toc, file, digest) makes the 16 bytes CheckTocSignature compares with a signature. It starts an MD5 context with MD5Init, passes it to 0x6f1270 with the toc and the empty string, and, when file is not null, loads that file with SFile::Load, adds it with 0x661dd0 and frees it with SFile::Unload; then it calls MD5Final with digest. 0x661dd0(context, input, length) is MD5's update: it adds 8·length to the 64-bit bit count at +0x10 with a carry into +0x14, fills the 64-byte block at +0x18 from index (count >> 3) & 63, runs the block transform 0x661f00 on it when full and then on each whole 64 bytes of the input in place, and keeps the rest.

The derivation is in the doc.

Callers 1

Callees 6

Calls and jumps by a bare address, from tables/calls.tsv.