Exemple #1
0
        private void injectOpCodesBtn_Click(object sender, EventArgs e)
        {
            uint offset = Convert.ToUInt32(textBox21.Text.StartsWith("0x", StringComparison.CurrentCultureIgnoreCase) ? textBox21.Text.Substring(2) : textBox21.Text, 16);

            byte[] buffer = StringToByteArray(richTextBox2.Text.Replace(" ", ""));
            PS3.SetMemory(offset, buffer);

            MessageBox.Show("PPC Injected");
        }
Exemple #2
0
 private void SetBytes(uint offset, byte[] bytes)
 {
     Target.SetMemory(offset, bytes);
 }
Exemple #3
0
        public static bool Install()
        {
            try {
                if (PS3.Ext.ReadUInt64(INSTALL_ADDR) == 0x3C600001606300C8)
                {
                    RPC_STACK_ADDR = PS3.Ext.ReadUInt32(RPC_STACK_ADDR_PTR);
                    return(true);
                }

                PS3.SetMemory(RPC_BASE, new byte[0x1B0]);

                ulong   PC        = 0;
                ulong[] Registers = new ulong[0x49];

                PS3.Ext.WriteString(RPC_THREAD_NAME_ADDR, RPC_THREAD_NAME);
                PS3.SetMemory(INSTALL_ADDR, RPC_INSTRUCTIONS);

                PS3.MainThreadStop();

                for (uint i = 0; i < 0x49; i++)
                {
                    Registers[i] = PS3.GetSingleRegister(i);
                }

                PC = PS3.GetSingleRegister((uint)TMAPI.SPRegisters.SNPS3_pc);
                PS3.SetSingleRegister((uint)TMAPI.SPRegisters.SNPS3_pc, INSTALL_ADDR);

                PS3.MainThreadContinue();

                while (PS3.Ext.ReadUInt64(INSTALL_ADDR) == 0)
                {
                    Thread.Sleep(1);
                }

                PS3.MainThreadStop();

                for (uint i = 0; i < 0x49; i++)
                {
                    PS3.SetSingleRegister(i, Registers[i]);
                }

                PS3.SetSingleRegister((uint)TMAPI.SPRegisters.SNPS3_pc, PC);
                PS3.MainThreadContinue();

                PS3TMAPI.PPUThreadInfo ThreadInfo = new PS3TMAPI.PPUThreadInfo();

                if (PS3.GetThreadByName("RPC", ref ThreadInfo))
                {
                    PS3.StopThreadyID(ThreadInfo.ThreadID);
                    PS3.SetSingleRegisterByThreadID(ThreadInfo.ThreadID, (uint)TMAPI.GPRegisters.SNPS3_gpr_13, Registers[13]);
                    PS3.ContinueThreadByID(ThreadInfo.ThreadID);
                }

                while (PS3.Ext.ReadUInt32(RPC_STACK_ADDR_PTR) == 0)
                {
                    Thread.Sleep(1);
                }

                RPC_STACK_ADDR = PS3.Ext.ReadUInt32(RPC_STACK_ADDR_PTR);

                return(true);
            }
            catch {
                return(false);
            }
        }