mirror of
https://github.com/morluto/rea
synced 2026-10-28 06:46:47 -04: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:
@@ -87,9 +87,16 @@ const statementPosition = (
|
||||
parents: WeakMap<t.Node, t.Node>,
|
||||
declarator?: t.VariableDeclarator,
|
||||
): StatementPosition | null => {
|
||||
const parent = parents.get(statement);
|
||||
const directParent = parents.get(statement);
|
||||
const enclosing =
|
||||
(t.isExportNamedDeclaration(directParent) ||
|
||||
t.isExportDefaultDeclaration(directParent)) &&
|
||||
directParent.declaration === statement
|
||||
? directParent
|
||||
: statement;
|
||||
const parent = parents.get(enclosing);
|
||||
if (!t.isProgram(parent) && !t.isBlockStatement(parent)) return null;
|
||||
const index = parent.body.indexOf(statement);
|
||||
const index = parent.body.indexOf(enclosing);
|
||||
return index < 0
|
||||
? null
|
||||
: {
|
||||
@@ -378,16 +385,8 @@ const computeDirectInitializerPosition = (
|
||||
node: t.Node,
|
||||
parents: WeakMap<t.Node, t.Node>,
|
||||
): StatementPosition | null => {
|
||||
if (t.isClassDeclaration(node) && node.id !== null) {
|
||||
const parent = parents.get(node);
|
||||
const statement =
|
||||
(t.isExportNamedDeclaration(parent) ||
|
||||
t.isExportDefaultDeclaration(parent)) &&
|
||||
parent.declaration === node
|
||||
? parent
|
||||
: node;
|
||||
return statementPosition(statement, parents);
|
||||
}
|
||||
if (t.isClassDeclaration(node) && node.id !== null)
|
||||
return statementPosition(node, parents);
|
||||
if (
|
||||
(t.isAssignmentExpression(node) &&
|
||||
t.isIdentifier(unwrapJavaScriptExpression(node.left).node)) ||
|
||||
|
||||
Reference in New Issue
Block a user