public static bool LoadNsos(KernelContext context, out ProcessTamperInfo tamperInfo, Npdm metaData, byte[] arguments = null, params IExecutable[] executables) { ulong argsStart = 0; uint argsSize = 0; ulong codeStart = metaData.Is64Bit ? 0x8000000UL : 0x200000UL; uint codeSize = 0; var buildIds = executables.Select(e => (e switch { NsoExecutable nso => BitConverter.ToString(nso.BuildId.Bytes.ToArray()), NroExecutable nro => BitConverter.ToString(nro.Header.BuildId), _ => "" }).Replace("-", "").ToUpper());
internal void InstallAtmosphereCheat(IEnumerable <string> rawInstructions, ProcessTamperInfo info, ulong exeAddress) { if (!CanInstallOnPid(info.Process.Pid)) { return; } ITamperedProcess tamperedProcess = new TamperedKProcess(info.Process); AtmosphereCompiler compiler = new AtmosphereCompiler(); ITamperProgram program = compiler.Compile(rawInstructions, exeAddress, info.HeapAddress, tamperedProcess); if (program != null) { _programs.Enqueue(program); } Activate(); }
internal void InstallAtmosphereCheat(string name, string buildId, IEnumerable <string> rawInstructions, ProcessTamperInfo info, ulong exeAddress) { if (!CanInstallOnPid(info.Process.Pid)) { return; } ITamperedProcess tamperedProcess = new TamperedKProcess(info.Process); AtmosphereCompiler compiler = new AtmosphereCompiler(exeAddress, info.HeapAddress, info.AliasAddress, info.AslrAddress, tamperedProcess); ITamperProgram program = compiler.Compile(name, rawInstructions); if (program != null) { program.TampersCodeMemory = false; _programs.Enqueue(program); _programDictionary.TryAdd($"{buildId}-{name}", program); } Activate(); }