()
| 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 | }; |
| 5840 | exports.HookPlayerPrefs = HookPlayerPrefs; |
| 5841 | globalThis.SetInt = (key, value) => callFunction(find_method("UnityEngine.CoreModule", "PlayerPrefs", "SetInt", 2, true), allocUStr(key), value); |
no test coverage detected