Beispiel #1
0
        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());
Beispiel #2
0
        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();
        }
Beispiel #3
0
        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();
        }