mirror of
https://github.com/morluto/rea.git
synced 2026-11-14 10:43:30 +00:00
feat(il2cpp): link native methods and export Ghidra seeds
Link IL2CPP metadata names to native addresses and types through shared CLI/MCP workflows, with bounded queries and atomic Ghidra seed export. Preserve the original implementation by 8rulerstar and follow-up correctness, resource, provenance, and CI dependency repairs. Verified against real Windows/Android artifacts, independent references, actual Ghidra, and focused CLI/MCP tests. Fixes #5112.
This commit is contained in:
1 parent
e50a271c72
commit
52d1a72af0
43 files changed
+5060
-368
No files matched your search
@@ -29,6 +29,7 @@ const emptyRows = {
|
||||
export const createIl2cppMetadataAdmission = (
|
||||
limit: number,
|
||||
exceed: () => never,
|
||||
linked = false,
|
||||
): Required<Il2cppMetadataReadOptions> => {
|
||||
let used = 0;
|
||||
// Keys/decoded names/literal spans are immutable within this one decoder run.
|
||||
@@ -45,6 +46,14 @@ export const createIl2cppMetadataAdmission = (
|
||||
let minimum = 0;
|
||||
for (const key of Object.keys(emptyRows) as (keyof typeof emptyRows)[])
|
||||
minimum += counts[key] * JSON.stringify(emptyRows[key]).length;
|
||||
if (linked)
|
||||
minimum +=
|
||||
counts.methods *
|
||||
(JSON.stringify({ state: "code", address: null, rva: null })
|
||||
.length +
|
||||
JSON.stringify({ type: 0, name: "" }).length) +
|
||||
(counts.fields + counts.parameters) *
|
||||
JSON.stringify({ type: 0, name: "" }).length;
|
||||
if (minimum > limit) exceed();
|
||||
},
|
||||
beforeText(bytes) {
|
||||
|
||||
Reference in new issue
Block a user