Closed commonuserlol closed 1 year ago
but methods cannot be overloaded by return value... why is this happening then?
Exactly, this is why I don't take the return value into account. This is how you should retrieve it:
const ParseJson = JsonExtensions.methods.find(_ => _.name == "ParseJson" && _.isGeneric)!;
i was able to get the method but now another error
il2cpp: cannot implement method ParseJson: it has a NULL virtual address
That method is generic and thus doesn't have an actual address. You have to call inflate
on it to possibly get a real method instance.
ok but now i can't invoke method... Error: expected a pointer
const User = AssemblyCSharp.class("User");
const ParseJson = AssemblyCSharp.class("JsonExtensions").methods.find(_ => _.name == "ParseJson" && _.isGeneric)!.inflate(User);
ParseJson.implementation = function(json: Il2Cpp.Object) {
console.log(json)
ParseJson.invoke(json);
}
You forgot the return
keyword (you are returning undefined
but Frida expects a NativePointerValue
, i.e. the object returned by ParseJson
)
stupid mistake, sorry. thanks for the help, i'm closing this issue
hello again, I found that the frida-il2cpp-bridge bugs when the method has a return value overload (also overloaded method dont have offset)
il2cpp inspector dump
in ida (with the script from il2cpp dumper applied) the method is displayed as
JsonExtensions__ParseJson
andJsonExtensions__ParseJson_User_
but methods cannot be overloaded by return value... why is this happening then? game: https://stumble-guys.en.uptodown.com/android/download/3202957 (v0.22)