Closed n1ce0n3 closed 11 months ago
Tried compiling both with frida-compile and esbuild - the same issue occurs. Replacing arrow functions for normal functions didn't help either.
Thanks for reporting. What's the app name and steps to reproduce so that I can debug it on my own?
@vfsfitvnm I can send you the app details (and the instructions how to launch it without anti-cheat, so you can actually attach frida ;) ), but AFAIK there is no "private messages" on github, so please, leave your discord here so I can add you (if you don't mind), I wouldn't really want the apps' developers' spies to notice this post and make it even harder for us to dump the damn game :) Though, you will still have to download a 35GB client to launch the game, I doubt that sending the binaries would do it, right? Also, if you want - we can share screen via discord/teamviewer so you don't have to go through the downloading process.
@n1ce0n3 Sure, it's vfsfitvnm on discord
It turns out frida-il2cpp-bridge
is working correctly.
It looks like there are many methods (in different classes, but with the same signature) that have the same offset (and so the same virtual address). Hence, it is a many-to-one relationship, and re-implementing one of those methods ends up overriding the implementation for the others as well.
In practice, the object instance can belong to different (unrelated) classes, hence the couldn't find method error.
I don't know if there's something I can do to handle this scenario, but you could add a check like this:
const Method: Il2Cpp.Method = ...;
Method.implementation = function (...args) {
if (Method.class.isAssignableFrom((this as Il2Cpp.Object).class)) {
// your code here
} else {
return (Method as any).invokeRaw(this, ...args);
}
};
Thanks, sir. Keep up the good work <3
I am currently trying to inspect arguments that are sent to a function, since I'm debugging in the runtime, I don't really enjoy compiling a script each time a make a change, so I use a compiled .js script instead via frida's REPL.
So the issue I am currently experiencing is this:
What I get as an output:
So apparently, it is considering "this" every instance of a class, instead of doing a check whether the current class is an instance of a required class.
Am I doing something wrong? Can it be caused by me using a compiled module within a REPL? Please, halp. Thanks in advance. <3