Пример #1
0
    private void _Enable()
    {
        //Inject the ppc code into an hookable address.
        if (IsEnabled)
        {
            return;
        }
        _DestroyAll();
        _parametersPointer = _parametersPointer & 0xFFFF0000;
        uint _16bit     = _parametersPointer >> 16;
        byte firstByte  = (byte)(_16bit >> 8);
        byte secondByte = (byte)(_16bit & 0x00FF);

        #region ppcOpcode
        byte[] ppc_code =
        {
            0xF8, 0x21,      0xFF, 0x91,       //stdu %r1, -0x70(%r1)
            0x7C, 0x08,      0x02, 0xA6,       //mfspr %r0, %lr
            0xF8, 0x01,      0x00, 0x80,       //std %r0, 0x80(%r1)
            0x3C, 0x60, firstByte, secondByte, //lis %r3, _parametersPointer
            0x81, 0x83,      0x00, 0x4C,       //lwz %r12, 0x4C(%r3)
            0x2C, 0x0C,      0x00, 0x00,       //cmpwi %r12, 0
            0x41, 0x82,      0x00, 0x64,       //beq 0x64
            0x80, 0x83,      0x00, 0x04,       //lwz %r4, 0x4(%r3)
            0x80, 0xA3,      0x00, 0x08,       //lwz %r5, 0x8(%r3)
            0x80, 0xC3,      0x00, 0x0C,       //lwz %r6, 0xC(%r3)
            0x80, 0xE3,      0x00, 0x10,       //lwz %r7, 0x10(%r3)
            0x81, 0x03,      0x00, 0x14,       //lwz %r8, 0x14(%r3)
            0x81, 0x23,      0x00, 0x18,       //lwz %r9, 0x18(%r3)
            0x81, 0x43,      0x00, 0x1C,       //lwz %r10, 0x1C(%r3)
            0x81, 0x63,      0x00, 0x20,       //lwz %r11, 0x20(%r3)
            0xC0, 0x23,      0x00, 0x24,       //lfs %f1, 0x24(%r3)
            0xC0, 0x43,      0x00, 0x28,       //lfs %f2, 0x28(%r3)
            0xC0, 0x63,      0x00, 0x2C,       //lfs %f3, 0x2C(%r3)
            0xC0, 0x83,      0x00, 0x30,       //lfs %f4, 0x30(%r3)
            0xC0, 0xA3,      0x00, 0x34,       //lfs %f5, 0x34(%r3)
            0xC0, 0xC3,      0x00, 0x38,       //lfs %f6, 0x38(%r3)
            0xC0, 0xE3,      0x00, 0x3C,       //lfs %f7, 0x3C(%r3)
            0xC1, 0x03,      0x00, 0x40,       //lfs %f8, 0x40(%r3)
            0xC1, 0x23,      0x00, 0x44,       //lfs %f9, 0x44(%r3)
            0x80, 0x63,      0x00, 0x00,       //lwz %r3, 0x0(%r3)
            0x7D, 0x89,      0x03, 0xA6,       //mtctr %r12
            0x4E, 0x80,      0x04, 0x21,       //bctrl
            0x3C, 0x80,      0x10, 0x07,       //lis %r4, 0x1007
            0x38, 0xA0,      0x00, 0x00,       //li %r5, 0x00
            0x90, 0xA4,      0x00, 0x4C,       //stw %r5, 0x4C(%r4)
            0x90, 0x64,      0x00, 0x50,       //stw %r3, 0x50(%r4)
            0xE8, 0x01,      0x00, 0x80,       //ld %r0, 0x80(%r1)
            0x7C, 0x08,      0x03, 0xA6,       //mtspr %lr, %r0
            0x38, 0x21,      0x00, 0x70,       //addi %r1, %r1, 0x70
            0x4E, 0x80,      0x00, 0x20
        };                                     //blr
        #endregion
        PS3.SetMemory(_callerFunctionAddress, ppc_code);
        if (_branchFrom != null)
        {
            uint branchFrom = (uint)_branchFrom;
            PS3.Extension.WriteUInt32(branchFrom, _Branch(branchFrom, _callerFunctionAddress));
        }
    }
Пример #2
0
 public static void setlicene(string licensetext, uint carnumber)
 {
     if (connected && updating == false)
     {
         byte[] lplate = Encoding.ASCII.GetBytes(licensetext);
         PS3.SetMemory(garageoffset + (carnumber * GARAGEITEMLENGTH) + LICENSE, lplate);
     }
 }
Пример #3
0
 private void btnSetRand_Click(object sender, EventArgs e)
 {
     byte[] buffer = new byte[4];
     for (int i = 0; i < 4; i++)
     {
         buffer[i] = (byte)rand.Next(0x10, 0x7E);
     }
     PS3.SetMemory(0x10045000, buffer);
 }
Пример #4
0
        public static void WriteSingle(uint address, float[] input)
        {
            int length = input.Length;

            byte[] array = new byte[length * 4];
            for (int i = 0; i < length; i++)
            {
                ReverseBytes(BitConverter.GetBytes(input[i])).CopyTo(array, (int)(i * 4));
            }
            PS3.SetMemory(address, array);
        }
Пример #5
0
 public static void Enable()
 {
     byte[] buffer = new byte[] { 0xf8, 0x21, 0xff, 0x91, 0x7c, 8, 2, 0xa6, 0xf8, 1, 0, 0x80, 60, 0x60, 0x10, 2, 0x81, 0x83, 0, 0x4c, 0x2c, 12, 0, 0, 0x41, 130, 0, 100, 0x80, 0x83, 0, 4, 0x80, 0xa3, 0, 8, 0x80, 0xc3, 0, 12, 0x80, 0xe3, 0, 0x10, 0x81, 3, 0, 20, 0x81, 0x23, 0, 0x18, 0x81, 0x43, 0, 0x1c, 0x81, 0x63, 0, 0x20, 0xc0, 0x23, 0, 0x24, 0xc0, 0x43, 0, 40, 0xc0, 0x63, 0, 0x2c, 0xc0, 0x83, 0, 0x30, 0xc0, 0xa3, 0, 0x34, 0xc0, 0xc3, 0, 0x38, 0xc0, 0xe3, 0, 60, 0xc1, 3, 0, 0x40, 0xc1, 0x23, 0, 0x48, 0x80, 0x63, 0, 0, 0x7d, 0x89, 3, 0xa6, 0x4e, 0x80, 4, 0x21, 60, 0x80, 0x10, 2, 0x38, 160, 0, 0, 0x90, 0xa4, 0, 0x4c, 0x90, 100, 0, 80, 0xe8, 1, 0, 0x80, 0x7c, 8, 3, 0xa6, 0x38, 0x21, 0, 0x70 };
     PS3.SetMemory(SFA1, buffer);
     PS3.SetMemory(SFA2, buffer);
     PS3.SetMemory(SFA3, buffer);
     PS3.Extension.WriteUInt32(EFA1, CBAB(EFA1, BAB1));
     PS3.Extension.WriteUInt32(BFA1, CBAB(BFA1, SFA1));
     PS3.Extension.WriteUInt32(EFA2, CBAB(EFA2, BAB2));
     PS3.Extension.WriteUInt32(BFA2, CBAB(BFA2, SFA2));
     PS3.Extension.WriteUInt32(EFA3, CBAB(EFA3, BAB3));
     PS3.Extension.WriteUInt32(BFA3, CBAB(BFA3, SFA3));
 }
Пример #6
0
 private void monoFlat_Button27_Click(object sender, EventArgs e)
 {
     byte[] array = Encoding.ASCII.GetBytes(logInNormalTextBox4.Text);
     Array.Resize(ref array, array.Length + 1);
     PS3.SetMemory(24667244u, array);
     PS3.SetMemory(24667244u, array);
 }
Пример #7
0
 static void InjectScript(uint ptrAddr, uint buffAddr, byte[] buffer)
 {
     // Update rawfile table
     UpdateRawfileTable(ptrAddr, buffAddr, (uint)buffer.Length);
     // Write buffer to memory
     _PS3.SetMemory(buffAddr, buffer);
 }
        public static void SetGlow(int elemIndex, int r1, int g1, int b1, int a1)
        {
            uint elem = OffsetsHUD.G_HudElems + ((Convert.ToUInt32(elemIndex)) * 0x88);

            PS3.SetMemory(elem + HElems.glowColor, RGBA(r1, g1, b1, a1));
            System.Threading.Thread.Sleep(20);
        }
Пример #9
0
 private void setBbtn_Click(object sender, EventArgs e)
 {
     try
     {
         if (bytesCh.Checked)
         {
             string BIS    = this.byteBox.Text.Replace(" ", "");
             int    num    = BIS.Length / 2;
             byte[] buffer = new byte[num];
             using (StringReader reader = new StringReader(BIS))
             {
                 for (int i = 0; i < num; i++)
                 {
                     char[] chArray = new char[] { (char)reader.Read(), (char)reader.Read() };
                     buffer[i] = Convert.ToByte(new string(chArray), 0x10);
                 }
             }
             PS3.SetMemory(uint.Parse(this.offsetBox.Text.Remove(0, 2), NumberStyles.HexNumber), buffer);
         }
         if (strCh.Checked)
         {
             PS3.Extension.WriteString(uint.Parse(offsetBox.Text.Remove(0, 2), NumberStyles.HexNumber), byteBox.Text);
         }
     }
     catch { }
 }
Пример #10
0
 public static void Init()
 {
     PS3.SetMemory(function_address, new byte[] { 0x4e, 0x80, 0, 0x20 });
     System.Threading.Thread.Sleep(20);
     byte[] memory = new byte[] {
         0x7c, 8, 2, 0xa6, 0xf8, 1, 0, 0x80, 60, 0x60, 0x10, 5, 0x81, 0x83, 0, 0x4c,
         0x2c, 12, 0, 0, 0x41, 130, 0, 100, 0x80, 0x83, 0, 4, 0x80, 0xa3, 0, 8,
         0x80, 0xc3, 0, 12, 0x80, 0xe3, 0, 0x10, 0x81, 3, 0, 20, 0x81, 0x23, 0, 0x18,
         0x81, 0x43, 0, 0x1c, 0x81, 0x63, 0, 0x20, 0xc0, 0x23, 0, 0x24, 0xc0, 0x43, 0, 40,
         0xc0, 0x63, 0, 0x2c, 0xc0, 0x83, 0, 0x30, 0xc0, 0xa3, 0, 0x34, 0xc0, 0xc3, 0, 0x38,
         0xc0, 0xe3, 0, 60, 0xc1, 3, 0, 0x40, 0xc1, 0x23, 0, 0x48, 0x80, 0x63, 0, 0,
         0x7d, 0x89, 3, 0xa6, 0x4e, 0x80, 4, 0x21, 60, 0x80, 0x10, 5, 0x38, 160, 0, 0,
         0x90, 0xa4, 0, 0x4c, 0x90, 100, 0, 80, 0xe8, 1, 0, 0x80, 0x7c, 8, 3, 0xa6,
         0x38, 0x21, 0, 0x70, 0x4e, 0x80, 0, 0x20
     };
     PS3.SetMemory(function_address + 4, memory);
     PS3.SetMemory(0x10050000, new byte[0x2854]);
     PS3.SetMemory(function_address, new byte[] { 0xf8, 0x21, 0xff, 0x91 });
 }
Пример #11
0
 private void monoFlat_Button1_Click(object sender, EventArgs e)
 {
     try
     {
         if (PS3.ConnectTarget() && PS3.AttachProcess())
         {
             RPC.Enable_RPC();
             byte[] buffer  = new byte[0x530];
             byte[] buffer2 = buffer;
             byte[] buffer3 = new byte[] {
                 0x38, 0x60, 0, 0, 60, 0x80, 2, 0, 0x30, 0x84, 80, 0, 0x4b, 0xf3, 0x35, 9,
                 0x4b, 0xff, 0xfb, 0x7c
             };
             byte[] buffer4 = new byte[] {
                 130, 0xb9, 0, 0, 60, 0xe0, 0, 0xd7, 0x3d, 0x80, 0, 0x92, 0x56, 0xa4, 0x38, 0x30,
                 0x56, 0xbb, 0x18, 0x38
             };
             byte[] buffer5 = new byte[] {
                 0x73, 0x65, 0x74, 0x20, 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x20, 0x31,
                 0x3b, 0x6f, 110, 0x6c, 0x69, 110, 0x65, 0x67, 0x61, 0x6d, 0x65, 0x20, 0x31, 0x3b, 0x6f, 110,
                 0x6c, 0x69, 110, 0x65, 0x67, 0x61, 0x6d, 0x65, 0x61, 110, 100, 0x68, 0x6f, 0x73, 0x74, 0x20,
                 0x31, 0x3b, 0x6f, 110, 0x6c, 0x69, 110, 0x65, 0x75, 110, 0x72, 0x61, 110, 0x6b, 0x65, 100,
                 0x67, 0x61, 0x6d, 0x65, 0x61, 110, 100, 0x68, 0x6f, 0x73, 0x74, 0x20, 0x30, 0x3b, 0x6d, 0x69,
                 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 110, 0x5f, 0x6d, 0x73, 0x67, 0x74, 0x69, 0x6d, 0x65, 0x6f,
                 0x75, 0x74, 0x20, 0x30, 0x3b, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 110, 0x5f, 0x74,
                 0x69, 0x6d, 0x65, 0x42, 0x65, 0x74, 0x77, 0x65, 0x65, 110, 0x20, 0x39, 0x39, 0x39, 0x39, 0x39,
                 0x39, 0x3b, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 110, 80, 0x69, 110, 0x67, 0x54,
                 0x69, 0x6d, 0x65, 0x20, 0x30, 0x3b, 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, 0x6d, 0x69, 110, 0x70,
                 0x6c, 0x61, 0x79, 0x65, 0x72, 0x73, 0x20, 0x31, 0x3b, 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, 0x6d,
                 0x61, 0x74, 0x63, 0x68, 0x65, 100, 80, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x43, 0x6f, 0x75, 110,
                 0x74, 0x20, 0x30, 0x3b, 0x70, 0x61, 0x72, 0x74, 0x79, 0x5f, 0x63, 0x6f, 110, 110, 0x65, 0x63,
                 0x74, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x20, 0x31, 0x30, 0x30, 0x30, 0x3b, 0x70, 0x61,
                 0x72, 0x74, 0x79, 0x5f, 0x63, 0x6f, 110, 110, 0x65, 0x63, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x6f,
                 0x75, 0x74, 0x20, 0x31, 0x22, 0
             };
             buffer = new byte[] { 0x41 };
             byte[] buffer6 = buffer;
             buffer = new byte[] { 0x40 };
             byte[] buffer7 = buffer;
             PS3.SetMemory(0x2005000, buffer5);
             PS3.SetMemory(0x466298, buffer6);
             PS3.SetMemory(0x4667b4, buffer3);
             Thread.Sleep(15);
             PS3.SetMemory(0x466298, buffer7);
             PS3.SetMemory(0x4667b4, buffer4);
             PS3.SetMemory(0x2005000, buffer2);
             MessageBox.Show("Connected !", "Success", MessageBoxButtons.OK, MessageBoxIcon.Information);
         }
         else
         {
             MessageBox.Show("Not Connected !", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
         }
     }
     catch (Exception)
     {
         MessageBox.Show("Not Connected !", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
Пример #12
0
 private void B1_Tick(object sender, EventArgs e)
 {
     PS3.Extension.WriteString(0x004eb39c, "^5S^7pec Ops ^5M^7od Menu ^5B^7y ^5M^7rNiato - ^5H^7ost ^5M^7enu\n\n^2-->^5God Mode\nMax Ammo\nAll Perks\nRapide Fire\nLock Controller");
     if (Key_IsDown((uint)0) == "R1")
     {
         B1.Stop();
         B2.Start();
     }
     if (Key_IsDown((uint)0) == "X")
     {
         byte[] buffer = new byte[] { 0x00, 0x15 };
         PS3.SetMemory(0x012272ea, buffer);
     }
     if (Key_IsDown((uint)0) == "R3")
     {
         B1.Stop();
         HostMenuMain.Start();
     }
     if (Key_IsDown((uint)0) == "L1")
     {
         B1.Stop();
         B4.Start();
     }
 }
Пример #13
0
 private void button1_Click(object sender, EventArgs e)
 {
     if (!label2.Text.Contains("Not Attached"))
     {
         menu.Stop();
         PS3.SetMemory(0x31d9a5c0, new byte[] { 0x3F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x80 });                                                       //hint shader size
         PS3.SetMemory(0x31d9a360, new byte[] { 0x3F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x80, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00 }); //FJ_Label_SmallWhite Size and pos
         closeMenu();
         closeMenu();
     }
     Environment.Exit(0);
 }
Пример #14
0
        public static void Enable(uint is_player_online)
        {
            byte[] buffer2 = new byte[] { 0xf8, 0x21, 0xfd, 0xA1, 0x7c, 8, 2, 0xa6, 0xf8, 1, 0x02, 0x70, 60, 0x60, 0x10, 2, 0x81, 0x83, 0, 0x4c, 0x2c, 12, 0, 0, 0x41, 130, 0, 100, 0x80, 0x83, 0, 4, 0x80, 0xa3, 0, 8, 0x80, 0xc3, 0, 12, 0x80, 0xe3, 0, 0x10, 0x81, 3, 0, 20, 0x81, 0x23, 0, 0x18, 0x81, 0x43, 0, 0x1c, 0x81, 0x63, 0, 0x20, 0xc0, 0x23, 0, 0x24, 0xc0, 0x43, 0, 40, 0xc0, 0x63, 0, 0x2c, 0xc0, 0x83, 0, 0x30, 0xc0, 0xa3, 0, 0x34, 0xc0, 0xc3, 0, 0x38, 0xc0, 0xe3, 0, 60, 0xc1, 3, 0, 0x40, 0xc1, 0x23, 0, 0x48, 0x80, 0x63, 0, 0, 0x7d, 0x89, 3, 0xa6, 0x4e, 0x80, 4, 0x21, 60, 0x80, 0x10, 2, 0x38, 160, 0, 0, 0x90, 0xa4, 0, 0x4c, 0x90, 100, 0, 80, 0xe8, 1, 0x02, 0x70, 0x7c, 8, 3, 0xa6, 0x38, 0x21, 0x02, 0x60, 0x38, 0x60, 0x00, 0x03, 0x4E, 0x80, 0x00, 0x20 };

            PS3.SetMemory(a, new byte[] { 0x3D, 0x60, 0x10, 0x05, 0x81, 0x6B, 0x00, 0x00, 0x7D, 0x69, 0x03, 0xA6, 0x4E, 0x80, 0x04, 0x20 });
            PS3.SetMemory(SFA4, buffer2);
            PS3.Extension.WriteUInt32(0x10050000, SFA4);
            byte[] on = patchjmp(is_player_online);
            PS3.SetMemory(is_player_online, new byte[] { 0xF8, 0x21, 0xFF, 0x91, 0x7C, 0x08, 0x02, 0xA6, 0xF8, 0x01, 0x00, 0x80, on[0], on[1], on[2], on[3] });
            PS3.SetMemory(is_player_online + 0x18, new byte[] { 0x7C, 0x08, 0x03, 0xA6, 0x38, 0x21, 0x00, 0x70, 0x4E, 0x80, 0x00, 0x20 });
        }
Пример #15
0
 private void giveToolStripMenuItem_Click(object sender, EventArgs e)
 {
     for (int i = 0; i < 0x12; i++)
     {
         PS3.SetMemory((0x18C4418 + (uint)Players.SelectedIndex * 0x61E0), new byte[] { 0x01, 0x01, 0x01, 0x01 });
     }
 }
Пример #16
0
 private void mainform_FormClosed(object sender, FormClosedEventArgs e)
 {
     PS3.SetMemory(0x00407554, new byte[] { 0x40, 0x9A });//turn off the fps just for consistency
     MenuLoop_Thread.Abort();
 }
Пример #17
0
 private void weapons_CheckedChanged(object sender, EventArgs e)
 {
     if (weapons.Checked)
     {
         PS3.SetMemory(weapon1, wepon1);
         PS3.SetMemory(weapon2, wepon1);
         PS3.SetMemory(weapon3, wepon2);
     }
     else
     {
         PS3.SetMemory(weapon1, wepoff1);
         PS3.SetMemory(weapon2, wepoff2);
         PS3.SetMemory(weapon3, wepoff3);
     }
 }
Пример #18
0
 public static void Enable()
 {
     Ar.SetMemory(function_address, new byte[4]
     {
         78,
         128,
         0,
         32
     });
     Thread.Sleep(20);
     byte[] buffer = new byte[136]
     {
         124,
         8,
         2,
         166,
         248,
         1,
         0,
         128,
         60,
         96,
         16,
         2,
         129,
         131,
         0,
         76,
         44,
         12,
         0,
         0,
         65,
         130,
         0,
         100,
         128,
         131,
         0,
         4,
         128,
         163,
         0,
         8,
         128,
         195,
         0,
         12,
         128,
         227,
         0,
         16,
         129,
         3,
         0,
         20,
         129,
         35,
         0,
         24,
         129,
         67,
         0,
         28,
         129,
         99,
         0,
         32,
         192,
         35,
         0,
         36,
         192,
         67,
         0,
         40,
         192,
         99,
         0,
         44,
         192,
         131,
         0,
         48,
         192,
         163,
         0,
         52,
         192,
         195,
         0,
         56,
         192,
         227,
         0,
         60,
         193,
         3,
         0,
         64,
         193,
         35,
         0,
         72,
         128,
         99,
         0,
         0,
         125,
         137,
         3,
         166,
         78,
         128,
         4,
         33,
         60,
         128,
         16,
         2,
         56,
         160,
         0,
         0,
         144,
         164,
         0,
         76,
         144,
         100,
         0,
         80,
         232,
         1,
         0,
         128,
         124,
         8,
         3,
         166,
         56,
         33,
         0,
         112,
         78,
         128,
         0,
         32
     };
     Ar.SetMemory(function_address + 4, buffer);
     Ar.SetMemory(268566528u, new byte[10324]);
     Ar.SetMemory(function_address, new byte[4]
     {
         248,
         33,
         255,
         145
     });
 }
Пример #19
0
 private void button7_Click(object sender, EventArgs e)
 {
     byte[] buffer = new byte[] { 0xD3, 0xE3, 0x01, 0x60 };
     PS3.SetMemory(0x00596D44, buffer);
 }
Пример #20
0
        private void flatButton2_Click(object sender, EventArgs e)
        {
            string API   = PS3.GetCurrentAPIName();
            string Check = flatTextBox1.Text;

            if (PS3.AttachProcess())
            {
                int MsgC = (int)MessageBox.Show("Black Ops 2 Has been attached", "Success", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
                if (API == "Control Console")
                {
                    PS3.CCAPI.RingBuzzer(CCAPI.BuzzerMode.Double);
                    PS3.CCAPI.Notify(CCAPI.NotifyIcon.INFO, "Thanks For Using My Tool <3");
                }
                flatStatusBar1.Text = "Welcome To The Tool - " + PS3.Extension.ReadString(0x26c067f);
                nameBox.Text        = PS3.Extension.ReadString(0x26c067f);
                storedName          = nameBox.Text;
                PS3.SetMemory(0x8E3590, new byte[] { 0x94, 50, 0, 0, 0, 0, 0, 32, 32, 32, 32, 32, 32 });
                PS3.SetMemory(0x37FEC, new byte[] { 0x60, 0x00, 0x00, 0x00 });
                if (Check == "Custom Text")
                {
                    WriteFPS("TehMerkMods Menu");
                }
                else
                {
                    WriteFPS(Check);
                }
                CallInjector();
            }
            else
            {
                int MsgE = (int)MessageBox.Show("No Game Process Found", "Error!", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
            }
        }
Пример #21
0
        public int CallFunction(uint func_address, params object[] parameters)
        {
            int  length = parameters.Length;
            uint num2   = 0;

            for (uint i = 0; i < length; i++)
            {
                byte[] buffer;
                if (parameters[i] is int)
                {
                    buffer = BitConverter.GetBytes((int)parameters[i]);
                    Array.Reverse(buffer);
                    PS3.SetMemory(0x10050000 + ((i + num2) * 4), buffer);
                }
                else if (parameters[i] is uint)
                {
                    buffer = BitConverter.GetBytes((uint)parameters[i]);
                    Array.Reverse(buffer);
                    PS3.SetMemory(0x10050000 + ((i + num2) * 4), buffer);
                }
                else if (parameters[i] is string)
                {
                    byte[] buffer2 = Encoding.UTF8.GetBytes(Convert.ToString(parameters[i]) + "\0");
                    PS3.SetMemory(0x10050054 + (i * 0x400), buffer2);
                    uint   num4  = 0x10050054 + (i * 0x400);
                    byte[] array = BitConverter.GetBytes(num4);
                    Array.Reverse(array);
                    PS3.SetMemory(0x10050000 + ((i + num2) * 4), array);
                }
                else if (parameters[i] is float)
                {
                    num2++;
                    buffer = BitConverter.GetBytes((float)parameters[i]);
                    Array.Reverse(buffer);
                    PS3.SetMemory(0x10050024 + ((num2 - 1) * 4), buffer);
                }
            }
            byte[] bytes = BitConverter.GetBytes(func_address);
            Array.Reverse(bytes);
            PS3.SetMemory(0x1005004c, bytes);
            Thread.Sleep(20);
            byte[] buffer5 = new byte[4];
            PS3.GetMemory(0x10050050, buffer5);
            Array.Reverse(buffer5);
            return(BitConverter.ToInt32(buffer5, 0));
        }
Пример #22
0
 public static void SetMemory(uint Offset, byte[] _byte)
 {
     API.SetMemory(Offset, _byte);
 }
Пример #23
0
        private void btnStartMenu_ClickButtonArea(object Sender, MouseEventArgs e)
        {
            try
            {
                if (useZombies == true)
                {
                    if (cmboItemsGscMenusZM.SelectedIndex == -1)
                    {
                    }
                    else
                    {
                        cButton2_ClickButtonArea(Sender, e);
                        lastUsedPointers.Clear();
                        string[] gscPaths = Directory.GetFiles(cmboItemsGscMenusPathsZM.GetItemText(cmboItemsGscMenusPathsZM.SelectedItem), "*", SearchOption.AllDirectories);

                        foreach (string gsc in gscPaths)
                        {
                            int countItem = 0;
                            foreach (object item in cmboItemsGscNameZM.Items)
                            {
                                countItem = countItem + 1;
                                if (item.ToString().Contains(gsc.Remove(0, cmboItemsGscMenusPathsZM.GetItemText(cmboItemsGscMenusPathsZM.SelectedItem).Length + 1)))
                                {
                                    cmboItemsGscNameZM.SelectedIndex = countItem - 1;
                                    lastUsedPointers.Add(cmboItemsGscPointerZM.GetItemText(cmboItemsGscPointerZM.SelectedItem));

                                    gscPointer = Convert.ToUInt32(cmboItemsGscPointerZM.GetItemText(cmboItemsGscPointerZM.SelectedItem), 16);

                                    byte[] gscModsFile = File.ReadAllBytes(gsc);

                                    PS3.SetMemory(gscPointer, new byte[] { 0x10, 0x04, 0x00, 0x00 });
                                    PS3.SetMemory(0x140C4F8, gscModsFile);
                                }
                            }
                        }

                        notifyBlackOps2("^2GSC Injected", "Loaded " + cmboItemsGscMenusZM.SelectedItem.ToString(), "party_ready");

                        PopupBox.lblStatus.Text = "Injected Mods (ZM): " + cmboItemsGscMenusZM.GetItemText(cmboItemsGscMenusZM.SelectedItem) + "\nTime: " + DateTime.Now.ToString("HH:mm:ss");
                        PopupBox.Text           = "Success";
                        PopupBox.ShowDialog(this);
                    }
                }
                else
                {
                    if (cmboItemsGscMenus.SelectedIndex == -1)
                    {
                    }
                    else
                    {
                        //cButton2_ClickButtonArea(Sender, e);
                        lastUsedPointers.Clear();
                        string[] gscPaths = Directory.GetFiles(cmboItemsGscMenusPaths.GetItemText(cmboItemsGscMenusPaths.SelectedItem), "*", SearchOption.AllDirectories);

                        foreach (string gsc in gscPaths)
                        {
                            int countItem = 0;
                            foreach (object item in cmboItemsGscNameMP.Items)
                            {
                                countItem = countItem + 1;
                                if (item.ToString().Contains(gsc.Remove(0, cmboItemsGscMenusPaths.GetItemText(cmboItemsGscMenusPaths.SelectedItem).Length + 1)))
                                {
                                    cmboItemsGscNameMP.SelectedIndex = countItem - 1;
                                    lastUsedPointers.Add(cmboItemsGscPointerMP.GetItemText(cmboItemsGscPointerMP.SelectedItem));

                                    gscPointer = Convert.ToUInt32(cmboItemsGscPointerMP.GetItemText(cmboItemsGscPointerMP.SelectedItem), 16);

                                    byte[] gscModsFile = File.ReadAllBytes(gsc);

                                    PS3.SetMemory(gscPointer, new byte[] { 0x10, 0x04, 0x00, 0x00 });
                                    PS3.SetMemory(0x10040000, gscModsFile);
                                }
                            }
                        }

                        notifyBlackOps2("^2GSC Injected", "Loaded " + cmboItemsGscMenus.SelectedItem.ToString(), "party_ready");

                        PopupBox.lblStatus.Text = "Injected Mods: " + cmboItemsGscMenus.GetItemText(cmboItemsGscMenus.SelectedItem) + "\nTime: " + DateTime.Now.ToString("HH:mm:ss");
                        PopupBox.Text           = "Success";
                        PopupBox.ShowDialog(this);
                    }

                    if (cmboItemsGscModes.SelectedIndex == -1)
                    {
                    }
                    else
                    {
                        cButton2_ClickButtonArea(Sender, e);
                        lastUsedPointers.Clear();
                        string[] gscPaths = Directory.GetFiles(cmboItemsGscModesPaths.GetItemText(cmboItemsGscModesPaths.SelectedItem), "*", SearchOption.AllDirectories);

                        foreach (string gsc in gscPaths)
                        {
                            int countItem = 0;
                            foreach (object item in cmboItemsGscNameMP.Items)
                            {
                                countItem = countItem + 1;
                                if (item.ToString().Contains(gsc.Remove(0, cmboItemsGscModesPaths.GetItemText(cmboItemsGscModesPaths.SelectedItem).Length + 1)))
                                {
                                    cmboItemsGscNameMP.SelectedIndex = countItem - 1;
                                    lastUsedPointers.Add(cmboItemsGscPointerMP.GetItemText(cmboItemsGscPointerMP.SelectedItem));

                                    gscPointer = Convert.ToUInt32(cmboItemsGscPointerMP.GetItemText(cmboItemsGscPointerMP.SelectedItem), 16);

                                    byte[] gscModsFile = File.ReadAllBytes(gsc);

                                    PS3.SetMemory(gscPointer, new byte[] { 0x10, 0x04, 0x00, 0x00 });
                                    PS3.SetMemory(0x10040000, gscModsFile);
                                }
                            }
                        }

                        notifyBlackOps2("^2GSC Injected", "Loaded " + cmboItemsGscModes.SelectedItem.ToString(), "party_ready");

                        PopupBox.lblStatus.Text = "Injected Mods: " + cmboItemsGscModes.SelectedItem.ToString() + "\n" + "Time: " + DateTime.Now.ToString("HH:mm:ss");
                        PopupBox.Text           = "Success";
                        PopupBox.ShowDialog(this);
                    }
                }

                btnRestoreGsc.Enabled   = true;
                btnRestoreGsc.ForeColor = Color.White;
            }
            catch
            {
                notifyBlackOps2("^1No GSC Injected", "Unable to load " + cmboItemsGscMenus.SelectedItem.ToString(), "party_notready");

                PopupBox.lblStatus.Text = "Unable to inject gsc mods";
                PopupBox.Text           = "Error";
                PopupBox.ShowDialog(this);
            }
        }
Пример #24
0
 public static void SetText(string txt)
 {
     PS3.SetMemory(FPS.Text, Encoding.ASCII.GetBytes("" + txt + "\0"));
 }
Пример #25
0
 public static void SetMemory(uint Address, byte[] Bytes)
 {
     DEX.SetMemory(Address, Bytes);
     CEX.SetMemory(Address, Bytes);
 }
Пример #26
0
        public static int Call(uint func_address, params object[] parameters)
        {
            uint num;
            int  length = parameters.Length;
            uint num3   = 0;

            for (uint i = 0; i < length; i = num + 1)
            {
                if (parameters[i] is int)
                {
                    byte[] buffer3 = BitConverter.GetBytes((int)parameters[i]);
                    Array.Reverse(buffer3);
                    PS3.SetMemory(0x10050000 + ((i + num3) * 4), buffer3);
                }
                else if (parameters[i] is uint)
                {
                    byte[] buffer4 = BitConverter.GetBytes((uint)parameters[i]);
                    Array.Reverse(buffer4);
                    PS3.SetMemory(0x10050000 + ((i + num3) * 4), buffer4);
                }
                else if (parameters[i] is string)
                {
                    byte[] buffer = Encoding.UTF8.GetBytes(Convert.ToString(parameters[i]) + "\0");
                    PS3.SetMemory(0x10050054 + (i * 0x400), buffer);
                    uint   num5    = 0x10050054 + (i * 0x400);
                    byte[] buffer6 = BitConverter.GetBytes(num5);
                    Array.Reverse(buffer6);
                    PS3.SetMemory(0x10050000 + ((i + num3) * 4), buffer6);
                }
                else if (parameters[i] is float)
                {
                    num  = num3;
                    num3 = num + 1;
                    byte[] buffer7 = BitConverter.GetBytes((float)parameters[i]);
                    Array.Reverse(buffer7);
                    PS3.SetMemory(0x10050024 + ((num3 - 1) * 4), buffer7);
                }
                num = i;
            }
            byte[] bytes = BitConverter.GetBytes(func_address);
            Array.Reverse(bytes);
            PS3.SetMemory(0x1005004c, bytes);
            Thread.Sleep(20);
            byte[] array = PS3.Extension.ReadBytes(0x10050050, 4);
            Array.Reverse(array);
            return(BitConverter.ToInt32(array, 0));
        }
Пример #27
0
        private void skyDarkButton1_Click(object sender, EventArgs e)
        {
            try
            {
                if (PS3.ConnectTarget() && PS3.AttachProcess())
                {
                    if (skyDarkCheck1.Checked)
                    {
                        PS3.SetMemory(0x5bc86c, new byte[1]);
                        PS3.Extension.ReadUInt32(0x5bedc4);
                        PS3.Extension.ReadUInt32(0x5bcdbc);
                        PS3.Extension.ReadUInt32(0x668960);
                        PS3.Extension.ReadUInt32(0x668fa0);
                        PS3.Extension.ReadUInt32(0x7ec434);
                        PS3.Extension.ReadUInt32(0x678f68);
                        PS3.Extension.ReadUInt32(0x5bcd24);
                        PS3.Extension.ReadUInt32(0x79542c);
                        PS3.Extension.ReadUInt32(0x795444);

                        toolStripStatusLabel5.Text      = "Enable !";
                        toolStripStatusLabel5.ForeColor = Color.Lime;
                    }
                    toolStripStatusLabel2.Text      = "Linked !";
                    toolStripStatusLabel2.ForeColor = Color.Lime;
                    byte[] FPSOn = new byte[] { 0x2C, 0x03, 0x01 };
                    PS3.SetMemory(FPSEnable, FPSOn);
                    byte[] FPSXs = new byte[] { 0x43, 0x62 };
                    PS3.SetMemory(FPSX, FPSXs);
                    byte[] FPSYs = new byte[] { 0x41, 0xD8 };
                    PS3.SetMemory(FPSY, FPSYs);
                    WriteText("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n^1-- ^5P^7ress ^2Start Menu ^5T^7o ^5I^7nitialise ^5M^7enu ^1--");
                }
                else
                {
                    toolStripStatusLabel2.Text      = "Failed to link PS3 !";
                    toolStripStatusLabel2.ForeColor = Color.Red;
                }
            }
            catch (Exception)
            {
                toolStripStatusLabel2.Text      = "Failed to link PS3 !";
                toolStripStatusLabel2.ForeColor = Color.Red;
            }
        }
        /// <summary>
        /// Creative mode GUI toggle.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void CreativeMode_Click(object sender, RoutedEventArgs e)
        {
            clickSound.Play();
            if (mainPS3.GetBytes(creativeModeGUI, 4).SequenceEqual(new byte[] { 0x38, 0x80, 0x00, 0x00 }))
            {
                mainPS3.SetMemory(creativeModeGUI, new byte[] { 0x38, 0x80, 0x00, 0x01 });
            }

            else
            {
                mainPS3.SetMemory(creativeModeGUI, new byte[] { 0x38, 0x80, 0x00, 0x00 });
            }
        }