the game uses toString to check if a function is proxied.
It seems that the the string representation of a proxied function is hardcoded here:
https://chromium.googlesource.com/v8/v8.git/+/f7d7b5c6a4a55baa8984525fba6d0d5e1355b3b0%5E%21/#F0
patch for the toString method that works:
Function.prototype.toString = new Proxy(Function.prototype.toString, {
apply(target, thisArg, args) {
const result = Reflect.apply(target, thisArg, args);
if(result === `function () { [native code] }` && thisArg.name?.length > 0) {
return `function ${thisArg.name}() { [native code] }`
}
return result;
}
});