MCPcopy Create free account
hub / github.com/GrowthEase/GameSentry / resend_function

Function resend_function

lib/cli/module/hook-function.js:80–110  ·  view source on GitHub ↗
(method_handle, args_param)

Source from the content-addressed store, hash-verified

78}
79
80function resend_function(method_handle, args_param) {
81 const method = new Il2Cpp.Method(new NativePointer(method_handle));
82 const nativeFunction = new NativeFunction(method.virtualAddress, method.returnType.fridaAlias, method.fridaSignature);
83 const args = [];
84 for (let param in args_param) {
85 args[args_param[param].index] = parseFloat(args_param[param].value) == 'NaN' ? args_param[param].value : parseFloat(args_param[param].value);
86 }
87 if (method.isStatic) {
88 if (Il2Cpp.unityVersionIsBelow201830) {
89 const env = Java.vm.tryGetEnv();
90 if (args.length == 0) {
91 nativeFunction(env);
92 } else {
93 nativeFunction(env, ...args);
94 }
95 } else {
96 if (args.length == 0) {
97 nativeFunction();
98 } else {
99 nativeFunction(...args);
100 }
101 }
102 } else {
103 const env = Java.vm.tryGetEnv();
104 if (args.length == 0) {
105 nativeFunction(env);
106 } else {
107 nativeFunction(env, ...args);
108 }
109 }
110}
111
112function send_function(method_handle, function_return_value, args_param) {
113 const method = new Il2Cpp.Method(new NativePointer(method_handle));

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected