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

Function InterceptorSetFunctions

Il2cppHook/_Ufunc.js:5807–5838  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

5805 });
5806 }
5807 function InterceptorSetFunctions() {
5808 A(Il2Cpp.Api.PlayerPrefs._SetFloat, (args, ctx, pass) => {
5809 pass.set("arg0", readU16(args[0]));
5810 pass.set("arg1", (args[1].isNull() ? 0 : readSingle(args[1])));
5811 }, (retval, ctx, pass) => {
5812 LOGD("\n[*] SetFloat('" + pass.get("arg0") + "'," + pass.get("arg1") + ")");
5813 if (needLRInfo)
5814 LOGZ("\t\t { LR:" + checkCtx(ctx) + " } | { PC:" + checkCtx(ctx, "PC") + " }");
5815 if (isShowPrintStack)
5816 LOGZ((GetStackTraceN(ctx)));
5817 });
5818 A(Il2Cpp.Api.PlayerPrefs._SetInt, (args, ctx, pass) => {
5819 pass.set("arg0", readU16(args[0]));
5820 pass.set("arg1", args[1]);
5821 }, (retval, ctx, pass) => {
5822 LOGD("\n[*] SetInt('" + pass.get("arg0") + "'," + pass.get("arg1") + ")");
5823 if (needLRInfo)
5824 LOGZ("\t\t { LR:" + checkCtx(ctx) + " } | { PC:" + checkCtx(ctx, "PC") + " }");
5825 if (isShowPrintStack)
5826 LOGZ((GetStackTraceN(ctx)));
5827 });
5828 A(Il2Cpp.Api.PlayerPrefs._SetString, (args, ctx, pass) => {
5829 pass.set("arg0", readU16(args[0]));
5830 pass.set("arg1", readU16(args[1]));
5831 }, (retval, ctx, pass) => {
5832 LOGD("\n[*] SetString('" + pass.get("arg0") + "','" + pass.get("arg1") + "')");
5833 if (needLRInfo)
5834 LOGZ("\t\t { LR:" + checkCtx(ctx) + " } | { PC:" + checkCtx(ctx, "PC") + " }");
5835 if (isShowPrintStack)
5836 LOGZ((GetStackTraceN(ctx)));
5837 });
5838 }
5839};
5840exports.HookPlayerPrefs = HookPlayerPrefs;
5841globalThis.SetInt = (key, value) => callFunction(find_method("UnityEngine.CoreModule", "PlayerPrefs", "SetInt", 2, true), allocUStr(key), value);

Callers 1

HookPlayerPrefsFunction · 0.70

Calls 9

isNullMethod · 0.80
readU16Function · 0.70
readSingleFunction · 0.70
LOGDFunction · 0.70
LOGZFunction · 0.70
checkCtxFunction · 0.70
GetStackTraceNFunction · 0.70
setMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected