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

Function checkCtx

Il2cppHook/_Ufunc.js:8535–8548  ·  view source on GitHub ↗
(ctx, type = "LR")

Source from the content-addressed store, hash-verified

8533};
8534exports.getJclassName = getJclassName;
8535function checkCtx(ctx, type = "LR") {
8536 let TMP = getPlatformCtx(ctx);
8537 let lr = TMP.lr;
8538 let pc = TMP.pc;
8539 let md_lr = Process.findModuleByAddress(lr);
8540 if (type == "LR" && md_lr != null)
8541 return lr.sub(md_lr.base) + `|${md_lr.name}`;
8542 let md_pc = Process.findModuleByAddress(pc);
8543 if (type == "PC" && md_pc != null)
8544 return pc.sub(md_pc.base) + `|${md_pc.name}`;
8545 if (type == "SP")
8546 return String(TMP.sp).toString();
8547 return JSON.stringify(ctx);
8548}
8549exports.checkCtx = checkCtx;
8550const mapValueToArray = (map) => {
8551 var list = [];

Callers 5

onEnterMethod · 0.70
_Ufunc.jsFile · 0.70
HookDebugLogFunction · 0.70
InterceptorGetFunctionsFunction · 0.70
InterceptorSetFunctionsFunction · 0.70

Calls 1

toStringMethod · 0.65

Tested by

no test coverage detected