Add measured offsets for known IL2CPP builds - #144
Conversation
9946591 to
5b3a9f2
Compare
5b3a9f2 to
7da194b
Compare
CryZe
left a comment
There was a problem hiding this comment.
The rebased profile-first/fallback structure is clear and the x64 consumer build succeeds, but two correctness gaps need addressing before the table can safely select measured layouts: the advertised 32-bit profiles cannot pass the still-x64-only attachment scanner, and the unbounded/coarsened floor lookup classifies unmeasured past and future Unity builds as known profiles instead of falling back.
7da194b to
80aac00
Compare
CryZe
left a comment
There was a problem hiding this comment.
Both requested changes are fully addressed. IL2CPP profiles now match exact metadata/full Unity-version/width identities and unknown players preserve the existing fallback. The x86 attach path has architecture-specific signatures, absolute operand decoding, bounds validation, corpus verification, and end-to-end tests. The Lunistice consumer builds against this head, and live tests exercised both the earlier measured-profile path and the corrected unknown-player classification. All checks pass.
Part of #141.
Adds a table of 22 measured IL2CPP players and attaches with a player's own offsets when a game runs exactly that Unity version at that width. Anything else falls back to version detection like before.
attach(version)is unchanged.UnityPlayer.dll's file version, and the width. Exact match only, sof1andf2are different players.GameAssembly.pdb.GameAssembly.dll, so a game on a measured player waits for it instead of attaching with the version table and keeping that.Il2CppClass::static_fieldsto 0xA0 and 6000.7 to 0x98. The entries carry the measured values.attach_auto_detectend to end.The existing x64 scanner fails on every 6000.3+ player in the corpus, because 6000.3 changed the count the table store follows. That's master's scanner and gets its own issue, so x64 games on those versions don't attach until then.
cargo test --all-featuresruns the suite. The new tests go throughattach_auto_detectfor a measured player, an unmeasured one, one without its metadata yet, and one whose metadata disagrees, plus the lookup, the x86 scanner shapes and bounds, and the statics divergence against the version table.