MCPcopy Create free account
hub / github.com/axhlzy/Il2CppHookScripts / calPointer

Function calPointer

Il2cppHook/_Ufunc.js:8301–8326  ·  view source on GitHub ↗
(mPtr)

Source from the content-addressed store, hash-verified

8299 }
8300 return ptr(0);
8301 function calPointer(mPtr) {
8302 if (mPtr.isNull() || !mPtr.compare(soAddr))
8303 return mPtr;
8304 try {
8305 let tmpValue = Process.findModuleByAddress(mPtr);
8306 if (tmpValue === null) {
8307 let addValue = Il2Cpp.module.base.add(mPtr);
8308 let tmpModule = Process.findModuleByAddress(addValue);
8309 if (tmpModule === null) {
8310 if (throwErr)
8311 throw new Error("checkPointer: can't find module");
8312 else
8313 return ptr(0);
8314 }
8315 else
8316 return addValue;
8317 }
8318 else
8319 return mPtr;
8320 }
8321 catch (error) {
8322 if (throwErr)
8323 throw error;
8324 return ptr(0);
8325 }
8326 }
8327 function checkValue(value) {
8328 if (value.length == 3) {
8329 if (typeof value[0] !== "string")

Callers 1

checkPointerFunction · 0.70

Calls 1

isNullMethod · 0.80

Tested by

no test coverage detected