Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- GTA V
- public static void Enable() // CLL 0xfa638911
- {
- byte[] memory = new byte[] { 0x7C, 0x08, 0x02, 0xA6, 0xF8, 0x01, 0x00, 0x80, 0x3C, 0x60, 0x10, 0x02, 0x81, 0x83, 0x00,
- 0x4C, 0x2C, 0x0C, 0x00, 0x00, 0x41, 0x82, 0x00, 0x64, 0x80, 0x83, 0x00, 0x04, 0x80, 0xA3, 0x00, 0x08, 0x80, 0xC3, 0x00,
- 0x0C, 0x80, 0xE3, 0x00, 0x10, 0x81, 0x03, 0x00, 0x14, 0x81, 0x23, 0x00, 0x18, 0x81, 0x43, 0x00, 0x1C, 0x81, 0x63, 0x00,
- 0x20, 0xC0, 0x23, 0x00, 0x24, 0xc0, 0x43, 0x00, 0x28, 0xC0, 0x63, 0x00, 0x2C, 0xC0, 0x83, 0x00, 0x30, 0xC0, 0xA3, 0x00,
- 0x34, 0xc0, 0xC3, 0x00, 0x38, 0xC0, 0xE3, 0x00, 0x3C, 0xC1, 0x03, 0x00, 0x40, 0xC1, 0x23, 0x00, 0x48, 0x80, 0x63, 0x00,
- 0x00, 0x7D, 0x89, 0x03, 0xA6, 0x4E, 0x80, 0x04, 0x21, 0x3C, 0x80, 0x10, 0x02, 0x38, 0xA0, 0x00, 0x00, 0x90, 0xA4, 0x00,
- 0x4C, 0x90, 0x64, 0x00, 0x50, 0xE8, 0x01, 0x00, 0x80, 0x7C, 0x08, 0x03, 0xA6, 0x38, 0x21, 0x00, 0x70
- };
- PS3.SetMemory(function_address, new byte[] { 0x4E, 0x80, 0x00, 0x20 });
- Thread.Sleep(20);
- PS3.SetMemory(function_address + 4, memory);
- PS3.SetMemory(0x10020000, new byte[0x2854]);
- PS3.SetMemory(function_address, new byte[] { 0xF8, 0x21, 0xFF, 0x91 });
- PS3.Extension.WriteUInt32(one_from_address, one_from_bytes);
- PS3.Extension.WriteUInt32(one_to_address, one_to_bytes);
- PS3.SetMemory(function2_address, new byte[] { 0x4E, 0x80, 0x00, 0x20 });
- Thread.Sleep(20);
- PS3.SetMemory(function2_address + 4, memory);
- PS3.SetMemory(function2_address, new byte[] { 0xF8, 0x21, 0xFF, 0x91 });
- PS3.Extension.WriteUInt32(two_from_address, two_from_bytes);
- PS3.Extension.WriteUInt32(two_to_address, two_to_bytes);
- PS3.SetMemory(function3_address, new byte[] { 0x4E, 0x80, 0x00, 0x20 });
- Thread.Sleep(20);
- PS3.SetMemory(function3_address + 4, memory);
- PS3.SetMemory(function3_address, new byte[] { 0xF8, 0x21, 0xFF, 0x91 });
- PS3.Extension.WriteUInt32(three_from_address, three_from_bytes);
- PS3.Extension.WriteUInt32(three_to_address, three_to_bytes);
- }
- Ghosts
- public static void Enable_RPC()
- {
- PS3.SetMemory(function_address, new byte[] { 0x4E, 0x80, 0x00, 0x20 });
- System.Threading.Thread.Sleep(20);
- byte[] func = new byte[] { 0x7C, 0x08, 0x02, 0xA6, 0xF8, 0x01, 0x00, 0x80, 0x3C, 0x60, 0x10, 0x05, 0x81, 0x83, 0x00, 0x4C,
- 0x2C, 0x0C, 0x00, 0x00, 0x41, 0x82, 0x00, 0x64, 0x80, 0x83, 0x00, 0x04, 0x80, 0xA3, 0x00, 0x08, 0x80, 0xC3, 0x00, 0x0C,
- 0x80, 0xE3, 0x00, 0x10, 0x81, 0x03, 0x00, 0x14, 0x81, 0x23, 0x00, 0x18, 0x81, 0x43, 0x00, 0x1C, 0x81, 0x63, 0x00, 0x20,
- 0xC0, 0x23, 0x00, 0x24, 0xC0, 0x43, 0x00, 0x28, 0xC0, 0x63, 0x00, 0x2C, 0xC0, 0x83, 0x00, 0x30, 0xC0, 0xA3, 0x00, 0x34,
- 0xC0, 0xC3, 0x00, 0x38, 0xC0, 0xE3, 0x00, 0x3C, 0xC1, 0x03, 0x00, 0x40, 0xC1, 0x23, 0x00, 0x48, 0x80, 0x63, 0x00, 0x00,
- 0x7D, 0x89, 0x03, 0xA6, 0x4E, 0x80, 0x04, 0x21, 0x3C, 0x80, 0x10, 0x05, 0x38, 0xA0, 0x00, 0x00, 0x90, 0xA4, 0x00, 0x4C,
- 0x80, 0x64, 0x00, 0x50, 0xE8, 0x01, 0x00, 0x80, 0x7C, 0x08, 0x03, 0xA6, 0x38, 0x21, 0x00, 0x70, 0x4E, 0x80, 0x00, 0x20 };
- PS3.SetMemory(function_address + 0x4, func);
- PS3.SetMemory(0x10050000, new byte[0x2854]);
- PS3.SetMemory(function_address, new byte[] { 0xF8, 0x21, 0xFF, 0x91 });
- }
- GTA V
- public static void Enable()
- {
- byte[] buffer = new byte[] {
- 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(function_address, new byte[] { 0x4e, 0x80, 0, 0x20 });
- Thread.Sleep(20);
- PS3.SetMemory(function_address + 4, buffer);
- PS3.SetMemory(0x10020000, new byte[0x2854]);
- PS3.SetMemory(function_address, new byte[] { 0xf8, 0x21, 0xff, 0x91 });
- PS3.Extension.WriteUInt32(one_from_address, one_from_bytes);
- PS3.Extension.WriteUInt32(one_to_address, one_to_bytes);
- PS3.SetMemory(function2_address, new byte[] { 0x4e, 0x80, 0, 0x20 });
- Thread.Sleep(20);
- PS3.SetMemory(function2_address + 4, buffer);
- PS3.SetMemory(function2_address, new byte[] { 0xf8, 0x21, 0xff, 0x91 });
- PS3.Extension.WriteUInt32(two_from_address, two_from_bytes);
- PS3.Extension.WriteUInt32(two_to_address, two_to_bytes);
- PS3.SetMemory(function3_address, new byte[] { 0x4e, 0x80, 0, 0x20 });
- Thread.Sleep(20);
- PS3.SetMemory(function3_address + 4, buffer);
- PS3.SetMemory(function3_address, new byte[] { 0xf8, 0x21, 0xff, 0x91 });
- PS3.Extension.WriteUInt32(three_from_address, three_from_bytes);
- PS3.Extension.WriteUInt32(three_to_address, three_to_bytes);
- }
- //the rpc still enables using one function like this:
- public static void Enable()
- {
- byte[] mem = new byte[] { 0xF8, 0x21, 0xFF, 0x91, 0x7C, 0x08, 0x02, 0xA6, 0xF8, 0x01, 0x00, 0x80, 0x3C,
- 0x60, 0x10, 0x02, 0x81, 0x83, 0x00, 0x4C, 0x2C, 0x0C, 0x00, 0x00, 0x41, 0x82, 0x00, 0x64, 0x80, 0x83, 0x00, 0x04,
- 0x80, 0xA3, 0x00, 0x08, 0x80, 0xC3, 0x00, 0x0C, 0x80, 0xE3, 0x00, 0x10, 0x81, 0x03, 0x00, 0x14, 0x81, 0x23, 0x00,
- 0x18, 0x81, 0x43, 0x00, 0x1C, 0x81, 0x63, 0x00, 0x20, 0xC0, 0x23, 0x00, 0x24, 0xc0, 0x43, 0x00, 0x28, 0xC0, 0x63,
- 0x00, 0x2C, 0xC0, 0x83, 0x00, 0x30, 0xC0, 0xA3, 0x00, 0x34, 0xc0, 0xC3, 0x00, 0x38, 0xC0, 0xE3, 0x00, 0x3C, 0xC1,
- 0x03, 0x00, 0x40, 0xC1, 0x23, 0x00, 0x48, 0x80, 0x63, 0x00, 0x00, 0x7D, 0x89, 0x03, 0xA6, 0x4E, 0x80, 0x04, 0x21,
- 0x3C, 0x80, 0x10, 0x02, 0x38, 0xA0, 0x00, 0x00, 0x90, 0xA4, 0x00, 0x4C, 0x90, 0x64, 0x00, 0x50, 0xE8, 0x01, 0x00,
- 0x80, 0x7C, 0x08, 0x03, 0xA6, 0x38, 0x21, 0x00, 0x70 };
- PS3.SetMemory(SFA1, mem);
- //PS3.SetMemory(SFA2, mem);
- //PS3.SetMemory(SFA3, mem);
- 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));
- }
- PPC
- ------------------------
- mfspr r0, LR
- std r0, 0x0080(r1)
- lis r3, 0x1002
- lwz r12, 0x004C(r3)
- cmpwi r12, 0x0000
- beq 0x64
- lwz r4, 0x0004(r3)
- lwz r5, 0x0008(r3)
- lwz r6, 0x000C(r3)
- lwz r7, 0x0010(r3)
- lwz r8, 0x0014(r3)
- lwz r9, 0x0018(r3)
- lwz r10, 0x001C(r3)
- lwz r11, 0x0020(r3)
- lfs f1, 0x0024(r3)
- lfs f2, 0x0028(r3)
- lfs f3, 0x002C(r3)
- lfs f4, 0x0030(r3)
- lfs f5, 0x0034(r3)
- lfs f6, 0x0038(r3)
- lfs f7, 0x003C(r3)
- lfs f8, 0x0040(r3)
- lfs f9, 0x0048(r3)
- lwz r3, 0x0000(r3)
- mtspr CTR, r12
- hexcode 0x4E800421
- lis r4, 0x1002
- li r5, 0x0000
- stw r5, 0x004C(r4)
- lwz r3, 0x0050(r4)
- ld r0, 0x0080(r1)
- mtspr LR, r0
- addi r1, r1, 0x0070
- now complie it
- --------------------
- 0x7C, 0x08, 0x02, 0xA6, 0xF8, 0x01, 0x00, 0x80, 0x3C,
- 0x60, 0x10, 0x02, 0x81, 0x83, 0x00, 0x4C, 0x2C, 0x0C, 0x00, 0x00, 0x41, 0x82, 0x00, 0x64, 0x80, 0x83, 0x00, 0x04,
- 0x80, 0xA3, 0x00, 0x08, 0x80, 0xC3, 0x00, 0x0C, 0x80, 0xE3, 0x00, 0x10, 0x81, 0x03, 0x00, 0x14, 0x81, 0x23, 0x00,
- 0x18, 0x81, 0x43, 0x00, 0x1C, 0x81, 0x63, 0x00, 0x20, 0xC0, 0x23, 0x00, 0x24, 0xc0, 0x43, 0x00, 0x28, 0xC0, 0x63,
- 0x00, 0x2C, 0xC0, 0x83, 0x00, 0x30, 0xC0, 0xA3, 0x00, 0x34, 0xc0, 0xC3, 0x00, 0x38, 0xC0, 0xE3, 0x00, 0x3C, 0xC1,
- 0x03, 0x00, 0x40, 0xC1, 0x23, 0x00, 0x48, 0x80, 0x63, 0x00, 0x00, 0x7D, 0x89, 0x03, 0xA6, 0x4E, 0x80, 0x04, 0x21,
- 0x3C, 0x80, 0x10, 0x02, 0x38, 0xA0, 0x00, 0x00, 0x90, 0xA4, 0x00, 0x4C, 0x90, 0x64, 0x00, 0x50, 0xE8, 0x01, 0x00,
- 0x80, 0x7C, 0x08, 0x03, 0xA6, 0x38, 0x21, 0x00, 0x70
- -----------------------------------------------------------------------------------------------
- ---------------------------------------------------------------------------------------------------------------------
- Choco RPC from gta eboot:
- 01883150 F821FF91 stdu r1,-0x70(r1)
- 01883154 7C0802A6 mfspr r0,lr
- 01883158 F8010080 std r0,0x80(r1)
- 0188315C 3C601006 lis r3,0x1006
- 01883160 8183004C lwz r12,0x4C(r3)
- 01883164 2C0C0000 cmpwi r12,0x0
- 01883168 41820064 beq 0x018831CC
- 0188316C 80830004 lwz r4,0x4(r3)
- 01883170 80A30008 lwz r5,0x8(r3)
- 01883174 80C3000C lwz r6,0xC(r3)
- 01883178 80E30010 lwz r7,0x10(r3)
- 0188317C 81030014 lwz r8,0x14(r3)
- 01883180 81230018 lwz r9,0x18(r3)
- 01883184 8143001C lwz r10,0x1C(r3)
- 01883188 81630020 lwz r11,0x20(r3)
- 0188318C C0230024 lfs f1,0x24(r3)
- 01883190 C0430028 lfs f2,0x28(r3)
- 01883194 C063002C lfs f3,0x2C(r3)
- 01883198 C0830030 lfs f4,0x30(r3)
- 0188319C C0A30034 lfs f5,0x34(r3)
- 018831A0 C0C30038 lfs f6,0x38(r3)
- 018831A4 C0E3003C lfs f7,0x3C(r3)
- 018831A8 C1030040 lfs f8,0x40(r3)
- 018831AC C1230048 lfs f9,0x48(r3)
- 018831B0 80630000 lwz r3,0x0(r3)
- 018831B4 7D8903A6 mtspr ctr,r12
- 018831B8 4E800421 bctrl
- 018831BC 3C801006 lis r4,0x1006
- 018831C0 38A00000 li r5,0x0
- 018831C4 90A4004C stw r5,0x4C(r4)
- 018831C8 90640050 stw r3,0x50(r4)
- 018831CC E8010080 ld r0,0x80(r1)
- 018831D0 7C0803A6 mtspr lr,r0
- 018831D4 38210070 addi r1,r1,0x70
- 018831D8 4E800020 blr
- ----------------------------------------------------------------------------------------------------------------------
- LTS RPC hook
- 10050168 7C0802A6 mfspr r0,lr
- 1005016C F8010010 std r0,0x10(r1)
- 10050170 F821FF91 stdu r1,-0x70(r1)
- 10050174 F8610010 std r3,0x10(r1)
- 10050178 3C601003 lis r3,0x1003
- 1005017C 80030000 lwz r0,0x0(r3)
- 10050180 2C000000 cmpwi r0,0x0
- 10050184 41820020 beq 0x100501A4
- 10050188 3C601003 lis r3,0x1003
- 1005018C 60630004 ori r3,r3,0x4
- 10050190 7C0903A6 mtspr ctr,r0
- 10050194 4E800421 bctrl
- 10050198 38000000 li r0,0x0
- 1005019C 3C601003 lis r3,0x1003
- 100501A0 90030000 stw r0,0x0(r3)
- 100501A4 E8610010 ld r3,0x10(r1)
- 100501A8 3C000152 lis r0,0x152
- 100501AC 6000DB58 ori r0,r0,0xDB58
- 100501B0 7C0903A6 mtspr ctr,r0
- 100501B4 4E800421 bctrl
- 100501B8 38210070 addi r1,r1,0x70
- 100501BC E8010010 ld r0,0x10(r1)
- 100501C0 7C0803A6 mtspr lr,r0
- 100501C4 4E800020 blr
- 100501C8 5483103A slwi r3,r4,2
- 100501CC 7C761814 addc r3,r22,r3
- 100501D0 78630020 clrldi r3,r3,32
- 100501D4 806300A4 lwz r3,0xA4(r3)
- 100501D8 80630038 lwz r3,0x38(r3)
- ----------------------------------------------------------------------------------------------------------------------
- [GTA][1.26] RPC Script Hook by STACKOVERFLOW
- 01883150 F821FF91 stdu r1,-0x70(r1)
- 01883154 7C0802A6 mfspr r0,lr
- 01883158 F8010080 std r0,0x80(r1)
- 0188315C 3C601006 lis r3,0x1006
- 01883160 8183004C lwz r12,0x4C(r3)
- 01883164 2C0C0000 cmpwi r12,0x0
- 01883168 41820064 beq 0x018831CC
- 0188316C 80830004 lwz r4,0x4(r3)
- 01883170 80A30008 lwz r5,0x8(r3)
- 01883174 80C3000C lwz r6,0xC(r3)
- 01883178 80E30010 lwz r7,0x10(r3)
- 0188317C 81030014 lwz r8,0x14(r3)
- 01883180 81230018 lwz r9,0x18(r3)
- 01883184 8143001C lwz r10,0x1C(r3)
- 01883188 81630020 lwz r11,0x20(r3)
- 0188318C C0230024 lfs f1,0x24(r3)
- 01883190 C0430028 lfs f2,0x28(r3)
- 01883194 C063002C lfs f3,0x2C(r3)
- 01883198 C0830030 lfs f4,0x30(r3)
- 0188319C C0A30034 lfs f5,0x34(r3)
- 018831A0 C0C30038 lfs f6,0x38(r3)
- 018831A4 C0E3003C lfs f7,0x3C(r3)
- 018831A8 C1030040 lfs f8,0x40(r3)
- 018831AC C1230048 lfs f9,0x48(r3)
- 018831B0 80630000 lwz r3,0x0(r3)
- 018831B4 7D8903A6 mtspr ctr,r12
- 018831B8 4E800421 bctrl
- 018831BC 3C801006 lis r4,0x1006
- 018831C0 38A00000 li r5,0x0
- 018831C4 90A4004C stw r5,0x4C(r4)
- 018831C8 90640050 stw r3,0x50(r4)
- 018831CC E8010080 ld r0,0x80(r1)
- 018831D0 7C0803A6 mtspr lr,r0
- 018831D4 38210070 addi r1,r1,0x70
- 018831D8 4E800020 blr
- ----------------------------------------------------------------------------------------------------------------------
- iMCSx GTAV RPC
- 0xF98D4 4BFDE4ED bl 0xD7DC0
- 000D7DC0 7C0802A6 mfspr r0,lr
- 000D7DC4 49432CC5 bl 0x0150AA88
- 000D7DC8 F821FF51 stdu r1,-0xB0(r1)
- 000D7DCC F80100C0 std r0,0xC0(r1)
- 000D7DD0 60EB0000 mr r11,r7
- 000D7DD4 610C0000 mr r12,r8
- 000D7DD8 90810070 stw r4,0x70(r1)
- 000D7DDC 547D063E clrlwi r29,r3,24
- 000D7DE0 90A10074 stw r5,0x74(r1)
- 000D7DE4 3C6001D6 lis r3,0x1D6
- 000D7DE8 90C10078 stw r6,0x78(r1)
- 000D7DEC 3CE001D6 lis r7,0x1D6
- 000D7DF0 9161007C stw r11,0x7C(r1)
- 000D7DF4 3FE00181 lis r31,0x181
- 000D7DF8 91810080 stw r12,0x80(r1)
- 000D7DFC 308744D2 addic r4,r7,0x44D2
- 000D7E00 7C6803A6 mtspr lr,r3 // start
- 000D7E04 E86B0009 ldu r3,0x8(r11)
- 000D7E08 2C230000 cmpdi r3,0x0
- 000D7E0C 41820008 beq 0x000D7E14
- 000D7E10 7C621B78 mr r2,r3
- 000D7E14 E86B0009 ldu r3,0x8(r11)
- 000D7E18 7D7E5B78 mr r30,r11
- 000D7E1C E88B0009 ldu r4,0x8(r11)
- 000D7E20 E8AB0009 ldu r5,0x8(r11)
- 000D7E24 E8CB0009 ldu r6,0x8(r11)
- 000D7E28 E8EB0009 ldu r7,0x8(r11)
- 000D7E2C E90B0009 ldu r8,0x8(r11)
- 000D7E30 E92B0009 ldu r9,0x8(r11)
- 000D7E34 E94B0009 ldu r10,0x8(r11)
- 000D7E38 E98B0009 ldu r12,0x8(r11)
- 000D7E3C F9810070 std r12,0x70(r1)
- 000D7E40 E98B0009 ldu r12,0x8(r11)
- 000D7E44 F9810078 std r12,0x78(r1)
- 000D7E48 E98B0009 ldu r12,0x8(r11)
- 000D7E4C F9810080 std r12,0x80(r1)
- 000D7E50 E98B0009 ldu r12,0x8(r11)
- 000D7E54 F9810088 std r12,0x88(r1)
- 000D7E58 E98B0009 ldu r12,0x8(r11)
- 000D7E5C F9810090 std r12,0x90(r1)
- 000D7E60 E98B0009 ldu r12,0x8(r11)
- 000D7E64 F9810098 std r12,0x98(r1)
- 000D7E68 E98B0009 ldu r12,0x8(r11)
- 000D7E6C F98100A0 std r12,0xA0(r1)
- 000D7E70 E98B0009 ldu r12,0x8(r11)
- 000D7E74 F98100A8 std r12,0xA8(r1)
- 000D7E78 E98B0009 ldu r12,0x8(r11)
- 000D7E7C F98100B0 std r12,0xB0(r1)
- 000D7E80 E98B0009 ldu r12,0x8(r11)
- 000D7E84 F98100B8 std r12,0xB8(r1)
- 000D7E88 CC2B0008 lfdu f1,0x8(r11)
- 000D7E8C 7D7D5B78 mr r29,r11
- 000D7E90 CC4B0008 lfdu f2,0x8(r11)
- 000D7E94 CC6B0008 lfdu f3,0x8(r11)
- 000D7E98 CC8B0008 lfdu f4,0x8(r11)
- 000D7E9C CCAB0008 lfdu f5,0x8(r11)
- 000D7EA0 CCCB0008 lfdu f6,0x8(r11)
- 000D7EA4 CCEB0008 lfdu f7,0x8(r11)
- 000D7EA8 CD0B0008 lfdu f8,0x8(r11)
- 000D7EAC CD2B0008 lfdu f9,0x8(r11)
- 000D7EB0 CD4B0008 lfdu f10,0x8(r11)
- 000D7EB4 4E800021 blrl
- 000D7EB8 F87E0000 std r3,0x0(r30)
- 000D7EBC D83D0000 stfd f1,0x0(r29)
- 000D7EC0 38600000 li r3,0x0
- 000D7EC4 F87F0000 std r3,0x0(r31)
- 000D7EC8 7F82E378 mr r2,r28
- 000D7ECC EB8100D8 ld r28,0xD8(r1)
- 000D7ED0 EBA100D0 ld r29,0xD0(r1)
- 000D7ED4 EBC100C8 ld r30,0xC8(r1)
- 000D7ED8 EBE100C0 ld r31,0xC0(r1)
- 000D7EDC 38210200 addi r1,r1,0x200
- 000D7EE0 E8010010 ld r0,0x10(r1)
- 000D7EE4 7C0803A6 mtspr lr,r0
- 000D7EE8 4E800020 blr
- ----------------------------------------------------------------------------------------------------------------------
- Choco RPC for COD Ghosts
- stdu r1, -0x70(r1)
- mflr r0
- std r0, 0x80(r1)
- lis r3, 0x1005
- lwz r12, 0x4C(r3)
- cmpwi r12, 0
- beq 0x64 #local return
- lwz r4, 4(r3)
- lwz r5, 8(r3)
- lwz r6, 0xC(r3)
- lwz r7, 0x10(r3)
- lwz r8, 0x14(r3)
- lwz r9, 0x18(r3)
- lwz r10, 0x1C(r3)
- lwz r11, 0x20(r3)
- lfs f1, 0x24(r3)
- lfs f2, 0x28(r3)
- lfs f3, 0x2C(r3)
- lfs f4, 0x30(r3)
- lfs f5, 0x34(r3)
- lfs f6, 0x38(r3)
- lfs f7, 0x3C(r3)
- lfs f8, 0x40(r3)
- lfs f9, 0x48(r3)
- lwz r3, 0(r3)
- mtctr r12
- bctrl
- lis r4, 0x1005
- li r5, 0
- stw r5, 0x4C(r4)
- lwz r3, 0x50(r4)
- ld r0, arg_80(r1) #here's what the local return branch goes to
- mtlr r0
- addi r1, r1, 0x70
- blr
- --------------------------------------------------------------------------------------------------------------
- private static uint function_address = 0x1B6AC00;
- private static uint one_from_address = 0x1B6AC88;
- private static uint one_from_bytes = 0x4A4AFF80;
- private static uint one_to_address = 0x1AC3C;
- private static uint one_to_bytes = 0x49B4FFC4;
- private static uint function2_address = 0x1B6AD00;
- private static uint two_from_address = 0x1B6AD88;
- private static uint two_from_bytes = 0x4B6AA5F0;
- private static uint two_to_address = 0x1215370;
- private static uint two_to_bytes = 0x48955990;
- private static uint function3_address = 0x1B6AE00;
- private static uint three_from_address = 0x1B6AE88;
- private static uint three_from_bytes = 0x4B6AAB4C;
- private static uint three_to_address = 0x12159C;
- private static uint three_to_bytes = 0x48955434;
- private static uint function4_address = 0x1B6AF00;
- private static uint four_from_address = 0x1B6A88;
- private static uint four_from_bytes = 0x4B6AAB94;
- private static uint four_to_address = 0x1215B14;
- private static uint four_to_bytes = 0x489553EC;
- private static uint function5_address = 0x1B6B000;
- private static uint five_from_address = 0x1B6B088;
- private static uint five_from_bytes = 0x4A54974B;
- private static uint five_to_address = 0xB487C;
- private static uint five_to_bytes = 0x49AB6784;
- public static void Enable()
- {
- byte[] buffer = new byte[] { 0xF8, 0x21, 0xFF, 0x91, 0x7C, 0x08, 0x02, 0xA6, 0xF8, 0x01, 0x00, 0x80, 0x3C,
- 0x60, 0x10, 0x02, 0x81, 0x83, 0x00, 0x4C, 0x2C, 0x0C, 0x00, 0x00, 0x41, 0x82, 0x00, 0x64, 0x80, 0x83,
- 0x00, 0x04, 0x80, 0xA3, 0x00, 0x08, 0x80, 0xC3, 0x00, 0x0C, 0x80, 0xE3, 0x00, 0x10, 0x81, 0x03, 0x00,
- 0x14, 0x81, 0x23, 0x00, 0x18, 0x81, 0x43, 0x00, 0x1C, 0x81, 0x63, 0x00, 0x20, 0xC0, 0x23, 0x00, 0x24,
- 0xc0, 0x43, 0x00, 0x28, 0xC0, 0x63, 0x00, 0x2C, 0xC0, 0x83, 0x00, 0x30, 0xC0, 0xA3, 0x00, 0x34, 0xc0,
- 0xC3, 0x00, 0x38, 0xC0, 0xE3, 0x00, 0x3C, 0xC1, 0x03, 0x00, 0x40, 0xC1, 0x23, 0x00, 0x48, 0x80, 0x63,
- 0x00, 0x00, 0x7D, 0x89, 0x03, 0xA6, 0x4E, 0x80, 0x04, 0x21, 0x3C, 0x80, 0x10, 0x02, 0x38, 0xA0, 0x00,
- 0x00, 0x90, 0xA4, 0x00, 0x4C, 0x90, 0x64, 0x00, 0x50, 0xE8, 0x01, 0x00, 0x80, 0x7C, 0x08, 0x03, 0xA6,
- 0x38, 0x21, 0x00, 0x70
- };
- PS3.SetMemory(function_address, new byte[] { 0x4E, 0x80, 0x00, 0x20 });
- Thread.Sleep(20);
- PS3.SetMemory(function_address + 4, buffer);
- PS3.SetMemory(0x10020000, new byte[0x2854]);
- PS3.SetMemory(function_address, new byte[] { 0xF8, 0x21, 0xFF, 0x91 });
- PS3.Extension.WriteUInt32(one_from_address, one_from_bytes);
- PS3.Extension.WriteUInt32(one_to_address, one_to_bytes);
- PS3.SetMemory(function2_address, new byte[] { 0x4E, 0x80, 0x00, 0x20 });
- Thread.Sleep(20);
- PS3.SetMemory(function2_address + 4, buffer);
- PS3.SetMemory(function2_address, new byte[] { 0xF8, 0x21, 0xFF, 0x91 });
- PS3.Extension.WriteUInt32(two_from_address, two_from_bytes);
- PS3.Extension.WriteUInt32(two_to_address, two_to_bytes);
- PS3.SetMemory(function3_address, new byte[] { 0x4E, 0x80, 0x00, 0x20 });
- Thread.Sleep(20);
- PS3.SetMemory(function3_address + 4, buffer);
- PS3.SetMemory(function3_address, new byte[] { 0xF8, 0x21, 0xFF, 0x91 });
- PS3.Extension.WriteUInt32(three_from_address, three_from_bytes);
- PS3.Extension.WriteUInt32(three_to_address, three_to_bytes);
- PS3.SetMemory(function4_address, new byte[] { 0x4E, 0x80, 0x00, 0x20 });
- Thread.Sleep(20);
- PS3.SetMemory(function4_address + 4, buffer);
- PS3.SetMemory(function4_address, new byte[] { 0xF8, 0x21, 0xFF, 0x91 });
- PS3.Extension.WriteUInt32(four_from_address, four_from_bytes);
- PS3.Extension.WriteUInt32(four_to_address, four_to_bytes);
- PS3.SetMemory(function5_address, new byte[] { 0x4E, 0x80, 0x00, 0x20 });
- Thread.Sleep(20);
- PS3.SetMemory(function5_address + 4, buffer);
- PS3.SetMemory(function5_address, new byte[] { 0xF8, 0x21, 0xFF, 0x91 });
- PS3.Extension.WriteUInt32(five_from_address, five_from_bytes);
- PS3.Extension.WriteUInt32(five_to_address, five_to_bytes);
- }
- -------------------------------------------------
- public static void Enable() // CLL 0xfa638911
- {
- byte[] WritePPC = new byte[] { 0xF8, 0x21, 0xFF, 0x91, 0x7C, 0x08, 0x02, 0xA6, 0xF8, 0x01, 0x00, 0x80, 0x3C, 0x60, 0x10, 0x02, 0x81, 0x83, 0x00,
- 0x4C, 0x2C, 0x0C, 0x00, 0x00, 0x41, 0x82, 0x00, 0x64, 0x80, 0x83, 0x00, 0x04, 0x80, 0xA3, 0x00, 0x08, 0x80, 0xC3, 0x00,
- 0x0C, 0x80, 0xE3, 0x00, 0x10, 0x81, 0x03, 0x00, 0x14, 0x81, 0x23, 0x00, 0x18, 0x81, 0x43, 0x00, 0x1C, 0x81, 0x63, 0x00,
- 0x20, 0xC0, 0x23, 0x00, 0x24, 0xc0, 0x43, 0x00, 0x28, 0xC0, 0x63, 0x00, 0x2C, 0xC0, 0x83, 0x00, 0x30, 0xC0, 0xA3, 0x00,
- 0x34, 0xc0, 0xC3, 0x00, 0x38, 0xC0, 0xE3, 0x00, 0x3C, 0xC1, 0x03, 0x00, 0x40, 0xC1, 0x23, 0x00, 0x48, 0x80, 0x63, 0x00,
- 0x00, 0x7D, 0x89, 0x03, 0xA6, 0x4E, 0x80, 0x04, 0x21, 0x3C, 0x80, 0x10, 0x02, 0x38, 0xA0, 0x00, 0x00, 0x90, 0xA4, 0x00,
- 0x4C, 0x90, 0x64, 0x00, 0x50, 0xE8, 0x01, 0x00, 0x80, 0x7C, 0x08, 0x03, 0xA6, 0x38, 0x21, 0x00, 0x70 //0x4E, 0x80, 0x00, 0x20 remove or add
- };
- PS3.SetMemory(SFA1, WritePPC);
- PS3.SetMemory(SFA2, WritePPC);
- PS3.SetMemory(SFA3, WritePPC);
- 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));
- }
- 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));
- }
- private static uint four_from_address = 0x1b6af88;
- private static uint four_from_bytes = 0x4b6aab94;
- private static uint four_to_address = 0x1215b14;
- private static uint four_to_bytes = 0x489553ec;
- private static uint function_address = 0x1b6ac00;
- private static uint function2_address = 0x1b6ad00;
- private static uint function3_address = 0x1b6ae00;
- private static uint function4_address = 0x1b6af00;
- private static uint one_from_address = 0x1b6ac88;
- private static uint one_from_bytes = 0x4a4aff80;
- private static uint one_to_address = 0x1ac3c;
- private static uint one_to_bytes = 0x49b4ffc4;
- private static uint three_from_address = 0x1b6ae88;
- private static uint three_from_bytes = 0x4b6aab4c;
- private static uint three_to_address = 0x12159cc;
- private static uint three_to_bytes = 0x48955434;
- private static uint two_from_address = 0x1b6ad88;
- private static uint two_from_bytes = 0x4b6aa5f0;
- private static uint two_to_address = 0x1215370;
- private static uint two_to_bytes = 0x48955990;
- public static void Enable()
- {
- byte[] buffer = new byte[] {
- 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(function_address, new byte[] { 0x4e, 0x80, 0, 0x20 });
- Thread.Sleep(20);
- PS3.SetMemory(function_address + 4, buffer);
- PS3.SetMemory(0x10020000, new byte[0x2854]);
- PS3.SetMemory(function_address, new byte[] { 0xf8, 0x21, 0xff, 0x91 });
- PS3.Extension.WriteUInt32(one_from_address, one_from_bytes);
- PS3.Extension.WriteUInt32(one_to_address, one_to_bytes);
- PS3.SetMemory(function2_address, new byte[] { 0x4e, 0x80, 0, 0x20 });
- Thread.Sleep(20);
- PS3.SetMemory(function2_address + 4, buffer);
- PS3.SetMemory(function2_address, new byte[] { 0xf8, 0x21, 0xff, 0x91 });
- PS3.Extension.WriteUInt32(two_from_address, two_from_bytes);
- PS3.Extension.WriteUInt32(two_to_address, two_to_bytes);
- PS3.SetMemory(function3_address, new byte[] { 0x4e, 0x80, 0, 0x20 });
- Thread.Sleep(20);
- PS3.SetMemory(function3_address + 4, buffer);
- PS3.SetMemory(function3_address, new byte[] { 0xf8, 0x21, 0xff, 0x91 });
- PS3.Extension.WriteUInt32(three_from_address, three_from_bytes);
- PS3.Extension.WriteUInt32(three_to_address, three_to_bytes);
- PS3.SetMemory(function4_address, new byte[] { 0x4e, 0x80, 0, 0x20 });
- Thread.Sleep(20);
- PS3.SetMemory(function4_address + 4, buffer);
- PS3.SetMemory(function4_address, new byte[] { 0xf8, 0x21, 0xff, 0x91 });
- PS3.Extension.WriteUInt32(four_from_address, four_from_bytes);
- PS3.Extension.WriteUInt32(four_to_address, four_to_bytes);
- Thread.Sleep(20);
- }
- /*
- Release Auto RPC class For Any Update !
- By Krank
- this way will auto find the branch and calculate everything for you !
- Note: This is based of Djokers branching nothing lees and nothing more i just made it easy and automatic to find and enable every update !
- Note 2 : its find PPC around the function and than does the caluculations to the correct adress , it may change with updates so you have to deal with the PPC search and update the bytes
- Note 3 : its also maybe used for any other branching you use or have just change the PPC code that search function handle
- */
- //The Enable Event !
- public static void Enable()
- {
- byte[] bytes_Found_branch_address = { 0x48, 0x00, 0x00, 0x0C, 0x40, 0x99, 0x00, 0x08, 0x41, 0x9D, 0x00, 0x7C };
- uint Found_branch_address = Search(bytes_Found_branch_address, 0x15000, 0x5000, 4);
- byte[] bytes_Found_branch_address2 = { 0x4B, 0xFF, 0xFF, 0xCC, 0x80, 0x7E, 0x00, 0x5C, 0x7C, 0x1C, 0x18, 0x00 };
- uint Found_branch_address2 = Search(bytes_Found_branch_address2, 0x15000, 0x5000, 4);
- byte[] bytes_Found_branch_address3 = { 0x4B, 0xFF, 0xFF, 0x58, 0x38, 0x21, 0x00, 0xB0, 0x31, 0x81, 0xFF, 0xF8 };
- uint Found_branch_address3 = Search(bytes_Found_branch_address3, 0xB0000, 0x10000, 4);
- byte[] bytes_function_address = { 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
- uint Found_function_address = Search(bytes_function_address, 0x01B00000, 0x1000000, 4) + 0x770;
- uint Found_function_adress2 = Found_function_address + 0x100;
- uint Found_function_adress3 = Found_function_address + 0x200;
- byte[] bytes_return_branch = { 0x40, 0x99, 0x00, 0x08, 0x41, 0x9D, 0x00, 0x7C };
- uint return_branch = Search(bytes_return_branch, 0x10000, 0x10000, 4) + 0x8;
- byte[] bytes_return_branch2 = { 0x7F, 0x9C, 0x1B, 0x78, 0x33, 0xBD, 0x00, 0x01, 0x7B, 0xBD, 0x00, 0x20, 0x4B, 0xFF, 0xFF, 0xCC };
- uint return_branch2 = Search(bytes_return_branch2, 0x10000, 0x10000, 4) + 0xC;
- byte[] bytes_return_branch3 = { 0x3F, 0xE0, 0x01, 0xCD, 0x63, 0x7D, 0x00, 0x00 };
- uint return_branch3 = Search(bytes_return_branch3, 0x10000, 0x10000, 4) + 0x14;
- uint branch_bytes = Found_function_address - Found_branch_address + 0x48000000;
- uint branch_bytes2 = Found_function_adress2 - Found_branch_address2 + 0x48000000;
- uint branch_bytes3 = Found_function_adress3 - Found_branch_address3 + 0x48000000;
- uint plus_function_address = Found_function_address + 0x88;
- uint plus_function_address2 = Found_function_adress2 + 0x88;
- uint plus_function_address3 = Found_function_adress3 + 0x88;
- uint branch_bytes_back = 0x4C000000 - (plus_function_address - return_branch);
- uint branch_bytes_back2 = 0x4C000000 - (plus_function_address2 - return_branch2);
- uint branch_bytes_back3 = 0x4C000000 - (plus_function_address3 - return_branch3);
- byte[] memory = new byte[] { 0x7C, 0x08, 0x02, 0xA6, 0xF8, 0x01, 0x00, 0x80, 0x3C, 0x60, 0x10, 0x02, 0x81, 0x83, 0x00, 0x4C, 0x2C, 0x0C, 0x00, 0x00, 0x41, 0x82, 0x00, 0x64, 0x80, 0x83, 0x00, 0x04, 0x80, 0xA3, 0x00, 0x08, 0x80, 0xC3, 0x00, 0x0C, 0x80, 0xE3, 0x00, 0x10, 0x81, 0x03, 0x00, 0x14, 0x81, 0x23, 0x00, 0x18, 0x81, 0x43, 0x00, 0x1C, 0x81, 0x63, 0x00, 0x20, 0xC0, 0x23, 0x00, 0x24, 0xc0, 0x43, 0x00, 0x28, 0xC0, 0x63, 0x00, 0x2C, 0xC0, 0x83, 0x00, 0x30, 0xC0, 0xA3, 0x00, 0x34, 0xc0, 0xC3, 0x00, 0x38, 0xC0, 0xE3, 0x00, 0x3C, 0xC1, 0x03, 0x00, 0x40, 0xC1, 0x23, 0x00, 0x48, 0x80, 0x63, 0x00, 0x00, 0x7D, 0x89, 0x03, 0xA6, 0x4E, 0x80, 0x04, 0x21, 0x3C, 0x80, 0x10, 0x02, 0x38, 0xA0, 0x00, 0x00, 0x90, 0xA4, 0x00, 0x4C, 0x90, 0x64, 0x00, 0x50, 0xE8, 0x01, 0x00, 0x80, 0x7C, 0x08, 0x03, 0xA6, 0x38, 0x21, 0x00, 0x70 };
- PS3.SetMemory(Found_function_address, new byte[] { 0x4E, 0x80, 0x00, 0x20 });
- Thread.Sleep(20);
- PS3.SetMemory(Found_function_address + 4, memory);
- PS3.SetMemory(0x10020000, new byte[0x2854]);
- PS3.SetMemory(Found_function_address, new byte[] { 0xF8, 0x21, 0xFF, 0x91 });
- PS3.Extension.WriteUInt32(plus_function_address, branch_bytes_back);
- PS3.Extension.WriteUInt32(Found_branch_address, branch_bytes);
- PS3.SetMemory(Found_function_adress2, new byte[] { 0x4E, 0x80, 0x00, 0x20 });
- Thread.Sleep(20);
- PS3.SetMemory(Found_function_adress2 + 4, memory);
- PS3.SetMemory(0x10020000, new byte[0x2854]);
- PS3.SetMemory(Found_function_adress2, new byte[] { 0xF8, 0x21, 0xFF, 0x91 });
- PS3.Extension.WriteUInt32(plus_function_address2, branch_bytes_back2);
- PS3.Extension.WriteUInt32(Found_branch_address2, branch_bytes2);
- PS3.SetMemory(Found_function_adress3, new byte[] { 0x4E, 0x80, 0x00, 0x20 });
- Thread.Sleep(20);
- PS3.SetMemory(Found_function_adress3 + 4, memory);
- PS3.SetMemory(0x10020000, new byte[0x2854]);
- PS3.SetMemory(Found_function_adress3, new byte[] { 0xF8, 0x21, 0xFF, 0x91 });
- PS3.Extension.WriteUInt32(plus_function_address3, branch_bytes_back3);
- PS3.Extension.WriteUInt32(Found_branch_address3, branch_bytes3);
- }
- //The Call Event !
- public static int Call(uint func_address, params object[] parameters) //original call
- {
- int length = parameters.Length;
- int index = 0;
- uint num3 = 0;
- uint num4 = 0;
- uint num5 = 0;
- uint num6 = 0;
- while (index < length)
- {
- if (parameters[index] is int)
- {
- PS3.Extension.WriteInt32(0x10020000 + (num3 * 4), (int)parameters[index]);
- num3++;
- }
- else if (parameters[index] is uint)
- {
- PS3.Extension.WriteUInt32(0x10020000 + (num3 * 4), (uint)parameters[index]);
- num3++;
- }
- else
- {
- uint num7;
- if (parameters[index] is string)
- {
- num7 = 0x10022000 + (num4 * 0x400);
- PS3.Extension.WriteString(num7, Convert.ToString(parameters[index]));
- PS3.Extension.WriteUInt32(0x10020000 + (num3 * 4), num7);
- num3++;
- num4++;
- }
- else if (parameters[index] is float)
- {
- WriteSingle(0x10020024 + (num5 * 4), (float)parameters[index]);
- num5++;
- }
- else if (parameters[index] is float[])
- {
- float[] input = (float[])parameters[index];
- num7 = 0x10021000 + (num6 * 4);
- WriteSingle(num7, input);
- PS3.Extension.WriteUInt32(0x10020000 + (num3 * 4), num7);
- num3++;
- num6 += (uint)input.Length;
- }
- }
- index++;
- }
- PS3.Extension.WriteUInt32(0x1002004C, func_address);
- Thread.Sleep(20);
- return PS3.Extension.ReadInt32(0x10020050);
- }
- //main Events and search functions
- static int NumberOffsets = 0;
- static uint ZeroOffset;
- private static void WriteSingle(uint address, float input)
- {
- byte[] Bytes = new byte[4];
- BitConverter.GetBytes(input).CopyTo((Array)Bytes, 0);
- Array.Reverse((Array)Bytes, 0, 4);
- PS3.SetMemory(address, Bytes);
- }
- private static void WriteSingle(uint address, float[] input)
- {
- int length = input.Length;
- byte[] Bytes = new byte[length * 4];
- for (int index = 0; index < length; ++index)
- ReverseBytes(BitConverter.GetBytes(input[index])).CopyTo((Array)Bytes, index * 4);
- PS3.SetMemory(address, Bytes);
- }
- private static byte[] ReverseBytes(byte[] toReverse)
- {
- Array.Reverse((Array)toReverse);
- return toReverse;
- }
- public static byte[] StringToByteArray(string hex)
- {
- if ((hex.Length % 2) != 0)
- {
- hex = "0" + hex;
- }
- int length = hex.Length;
- byte[] buffer = new byte[((length / 2) - 1) + 1];
- for (int i = 0; i < length; i += 2)
- {
- buffer[i / 2] = Convert.ToByte(hex.Substring(i, 2), 0x10);
- }
- return buffer;
- }
- static uint ContainsSequence(byte[] toSearch, byte[] toFind, uint StartOffset, int bytes)
- {
- for (int i = 0; (i + toFind.Length) < toSearch.Length; i += bytes)
- {
- bool flag = true;
- for (int j = 0; j < toFind.Length; j++)
- {
- if (toSearch[i + j] != toFind[j])
- {
- flag = false;
- break;
- }
- }
- if (flag)
- {
- NumberOffsets++;
- int num3 = ((int)StartOffset) + i;
- return (uint)num3;
- }
- }
- return 0;
- }
- static uint Search(byte[] Search, uint Start, int Length, int bytes)
- {
- byte[] ReadBytes = PS3.Extension.ReadBytes(Start, Length);
- uint num = ContainsSequence(ReadBytes, Search, Start, bytes);
- if (num.Equals(ZeroOffset))
- {
- return 0;
- //not found
- }
- else
- {
- int counter = 0;
- foreach (int value in Search)
- if (value == 1) ++counter;
- uint num2 = num + ((uint)counter);
- return num2;
- }
- }
- -----------------------------------------------------------------------------------------------------------------------
- AW
- private static UInt32 function_address = 0x5F7B80;
- public static int Init()
- {
- if (function_address == 0) return -1;
- Enable_RPC();
- return 0;
- }
- public static void Enable_RPC()
- {
- PS3.SetMemory(function_address, new byte[] { 0x4E, 0x80, 0x00, 0x20 });
- System.Threading.Thread.Sleep(20);
- byte[] func = new byte[] { 0x7C, 0x08, 0x02, 0xA6, 0xF8, 0x01, 0x00, 0x80, 0x3C, 0x60, 0x10, 0x05, 0x81, 0x83, 0x00, 0x4C, 0x2C, 0x0C, 0x00, 0x00, 0x41, 0x82, 0x00, 0x64, 0x80, 0x83, 0x00, 0x04, 0x80, 0xA3, 0x00, 0x08, 0x80, 0xC3, 0x00, 0x0C, 0x80, 0xE3, 0x00, 0x10, 0x81, 0x03, 0x00, 0x14, 0x81, 0x23, 0x00, 0x18, 0x81, 0x43, 0x00, 0x1C, 0x81, 0x63, 0x00, 0x20, 0xC0, 0x23, 0x00, 0x24, 0xC0, 0x43, 0x00, 0x28, 0xC0, 0x63, 0x00, 0x2C, 0xC0, 0x83, 0x00, 0x30, 0xC0, 0xA3, 0x00, 0x34, 0xC0, 0xC3, 0x00, 0x38, 0xC0, 0xE3, 0x00, 0x3C, 0xC1, 0x03, 0x00, 0x40, 0xC1, 0x23, 0x00, 0x48, 0x80, 0x63, 0x00, 0x00, 0x7D, 0x89, 0x03, 0xA6, 0x4E, 0x80, 0x04, 0x21, 0x3C, 0x80, 0x10, 0x05, 0x38, 0xA0, 0x00, 0x00, 0x90, 0xA4, 0x00, 0x4C, 0x90, 0x64, 0x00, 0x50, 0xE8, 0x01, 0x00, 0x80, 0x7C, 0x08, 0x03, 0xA6, 0x38, 0x21, 0x00, 0x70, 0x4E, 0x80, 0x00, 0x20 };
- PS3.SetMemory(function_address + 0x4, func);
- PS3.SetMemory(0x10050000, new byte[0x2854]);
- PS3.SetMemory(function_address, new byte[] { 0xF8, 0x21, 0xFF, 0x91 });
- }
- public static int Call(uint func_address, params object[] parameters)
- {
- int num_params = parameters.Length;
- uint num_floats = 0;
- for (uint i = 0; i < num_params; i++)
- {
- if (parameters[i] is int)
- {
- byte[] val = BitConverter.GetBytes((int)parameters[i]);
- Array.Reverse(val);
- PS3.SetMemory(0x10050000 + (i + num_floats) * 4, val);
- }
- else if (parameters[i] is uint)
- {
- byte[] val = BitConverter.GetBytes((uint)parameters[i]);
- Array.Reverse(val);
- PS3.SetMemory(0x10050000 + (i + num_floats) * 4, val);
- }
- else if (parameters[i] is string)
- {
- byte[] str = Encoding.UTF8.GetBytes(Convert.ToString(parameters[i]) + "\0");
- PS3.SetMemory(0x10050054 + i * 0x400, str);
- uint addr = 0x10050054 + i * 0x400;
- byte[] address = BitConverter.GetBytes(addr);
- Array.Reverse(address);
- PS3.SetMemory(0x10050000 + (i + num_floats) * 4, address);
- }
- else if (parameters[i] is float)
- {
- num_floats++;
- byte[] val = BitConverter.GetBytes((float)parameters[i]);
- Array.Reverse(val);
- PS3.SetMemory(0x10050024 + ((num_floats - 1) * 0x4), val);
- }
- }
- byte[] fadd = BitConverter.GetBytes(func_address);
- Array.Reverse(fadd);
- PS3.SetMemory(0x1005004C, fadd);
- System.Threading.Thread.Sleep(20);
- byte[] ret = PS3.GetMemory(0x10050050, 4);
- Array.Reverse(ret);
- return BitConverter.ToInt32(ret, 0);
- }
- --------------------------------------------------------------------------------------------------------------------------------
- private static uint function_address = 0x1B73580;
- private static uint function2_address = 0x1B73680;
- private static uint function3_address = 0x1B73780;
- private static uint function4_address = 0x1B73880;
- private static uint one_from_address = 0x1b6ac88;
- private static uint one_from_bytes = 0x4a4aff80;
- private static uint one_to_address = 0x1ac3c;
- private static uint one_to_bytes = 0x49b4ffc4;
- private static uint two_from_address = 0x1b6ad88;
- private static uint two_from_bytes = 0x4b6aa5f0;
- private static uint two_to_address = 0x1215370;
- private static uint two_to_bytes = 0x48955990;
- private static uint three_from_address = 0x1b6ae88;
- private static uint three_from_bytes = 0x4b6aab4c;
- private static uint three_to_address = 0x12159cc;
- private static uint three_to_bytes = 0x48955434;
- private static uint four_from_address = 0x1b6af88;
- private static uint four_from_bytes = 0x4b6aab94;
- private static uint four_to_address = 0x1215b14;
- private static uint four_to_bytes = 0x489553ec;
- public static void Enable2()
- {
- byte[] buffer = new byte[] {
- 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(function_address, new byte[] { 0x4e, 0x80, 0, 0x20 });
- Thread.Sleep(20);
- PS3.SetMemory(function_address + 4, buffer);
- PS3.SetMemory(0x10020000, new byte[0x2854]);
- PS3.SetMemory(function_address, new byte[] { 0xf8, 0x21, 0xff, 0x91 });
- PS3.Extension.WriteUInt32(one_from_address, one_from_bytes);
- PS3.Extension.WriteUInt32(one_to_address, one_to_bytes);
- PS3.SetMemory(function2_address, new byte[] { 0x4e, 0x80, 0, 0x20 });
- Thread.Sleep(20);
- PS3.SetMemory(function2_address + 4, buffer);
- PS3.SetMemory(function2_address, new byte[] { 0xf8, 0x21, 0xff, 0x91 });
- PS3.Extension.WriteUInt32(two_from_address, two_from_bytes);
- PS3.Extension.WriteUInt32(two_to_address, two_to_bytes);
- PS3.SetMemory(function3_address, new byte[] { 0x4e, 0x80, 0, 0x20 });
- Thread.Sleep(20);
- PS3.SetMemory(function3_address + 4, buffer);
- PS3.SetMemory(function3_address, new byte[] { 0xf8, 0x21, 0xff, 0x91 });
- PS3.Extension.WriteUInt32(three_from_address, three_from_bytes);
- PS3.Extension.WriteUInt32(three_to_address, three_to_bytes);
- PS3.SetMemory(function4_address, new byte[] { 0x4e, 0x80, 0, 0x20 });
- Thread.Sleep(20);
- PS3.SetMemory(function4_address + 4, buffer);
- PS3.SetMemory(function4_address, new byte[] { 0xf8, 0x21, 0xff, 0x91 });
- PS3.Extension.WriteUInt32(four_from_address, four_from_bytes);
- PS3.Extension.WriteUInt32(four_to_address, four_to_bytes);
- Thread.Sleep(20);
- }
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading;
- using PS3Lib;
- public static class RPC
- {
- private static PS3API PS3 = new PS3API(SelectAPI.TargetManager);
- private static uint one_to_address = 0x185B4;
- private static uint two_to_address = 0x1AC3C;
- private static uint three_to_address = 0xB490C;
- private static uint function_address = 0x1B73580;
- private static uint function2_address = function_address + 0x100;
- private static uint function3_address = function_address + 0x200;
- private static uint one_to_bytes = function_address - one_to_address + 0x48000000;
- private static uint two_to_bytes = function2_address - two_to_address + 0x48000000;
- private static uint three_to_bytes = function3_address - three_to_address + 0x48000000;
- private static uint one_from_address = function_address + 0x88;
- private static uint one_from_bytes = 0x4A4A4FB8;
- private static uint two_from_address = function2_address + 0x88;
- private static uint two_from_bytes = 0x4A4A7500;
- private static uint three_from_address = function3_address + 0x88;
- private static uint three_from_bytes = 0x4A54105C;
- public static void Enable()
- {
- byte[] memory = new byte[] { 0x7C, 0x08, 0x02, 0xA6, 0xF8, 0x01, 0x00, 0x80, 0x3C, 0x60, 0x10, 0x02, 0x81, 0x83, 0x00, 0x4C, 0x2C, 0x0C, 0x00, 0x00, 0x41, 0x82, 0x00, 0x64, 0x80, 0x83, 0x00, 0x04, 0x80, 0xA3, 0x00, 0x08, 0x80, 0xC3, 0x00, 0x0C, 0x80, 0xE3, 0x00, 0x10, 0x81, 0x03, 0x00, 0x14, 0x81, 0x23, 0x00, 0x18, 0x81, 0x43, 0x00, 0x1C, 0x81, 0x63, 0x00, 0x20, 0xC0, 0x23, 0x00, 0x24, 0xc0, 0x43, 0x00, 0x28, 0xC0, 0x63, 0x00, 0x2C, 0xC0, 0x83, 0x00, 0x30, 0xC0, 0xA3, 0x00, 0x34, 0xc0, 0xC3, 0x00, 0x38, 0xC0, 0xE3, 0x00, 0x3C, 0xC1, 0x03, 0x00, 0x40, 0xC1, 0x23, 0x00, 0x48, 0x80, 0x63, 0x00, 0x00, 0x7D, 0x89, 0x03, 0xA6, 0x4E, 0x80, 0x04, 0x21, 0x3C, 0x80, 0x10, 0x02, 0x38, 0xA0, 0x00, 0x00, 0x90, 0xA4, 0x00, 0x4C, 0x90, 0x64, 0x00, 0x50, 0xE8, 0x01, 0x00, 0x80, 0x7C, 0x08, 0x03, 0xA6, 0x38, 0x21, 0x00, 0x70 };
- PS3.SetMemory(function_address, new byte[] { 0x4E, 0x80, 0x00, 0x20 });
- Thread.Sleep(20);
- PS3.SetMemory(function_address + 4, memory);
- PS3.SetMemory(0x10020000, new byte[0x2854]);
- PS3.SetMemory(function_address, new byte[] { 0xF8, 0x21, 0xFF, 0x91 });
- PS3.Extension.WriteUInt32(one_from_address, one_from_bytes);
- PS3.Extension.WriteUInt32(one_to_address, one_to_bytes);
- PS3.SetMemory(function2_address, new byte[] { 0x4E, 0x80, 0x00, 0x20 });
- Thread.Sleep(20);
- PS3.SetMemory(function2_address + 4, memory);
- PS3.SetMemory(function2_address, new byte[] { 0xF8, 0x21, 0xFF, 0x91 });
- PS3.Extension.WriteUInt32(two_from_address, two_from_bytes);
- PS3.Extension.WriteUInt32(two_to_address, two_to_bytes);
- PS3.SetMemory(function3_address, new byte[] { 0x4E, 0x80, 0x00, 0x20 });
- Thread.Sleep(20);
- PS3.SetMemory(function3_address + 4, memory);
- PS3.SetMemory(function3_address, new byte[] { 0xF8, 0x21, 0xFF, 0x91 });
- PS3.Extension.WriteUInt32(three_from_address, three_from_bytes);
- PS3.Extension.WriteUInt32(three_to_address, three_to_bytes);
- }
- public static int Call(uint func_address, params object[] parameters)
- {
- int length = parameters.Length;
- int index = 0;
- uint num3 = 0;
- uint num4 = 0;
- uint num5 = 0;
- uint num6 = 0;
- while (index < length)
- {
- if (parameters[index] is int)
- {
- PS3.Extension.WriteInt32(0x10020000 + (num3 * 4), (int)parameters[index]);
- num3++;
- }
- else if (parameters[index] is uint)
- {
- PS3.Extension.WriteUInt32(0x10020000 + (num3 * 4), (uint)parameters[index]);
- num3++;
- }
- else
- {
- uint num7;
- if (parameters[index] is string)
- {
- num7 = 0x10022000 + (num4 * 0x400);
- PS3.Extension.WriteString(num7, Convert.ToString(parameters[index]));
- PS3.Extension.WriteUInt32(0x10020000 + (num3 * 4), num7);
- num3++;
- num4++;
- }
- else if (parameters[index] is float)
- {
- WriteSingle(0x10020024 + (num5 * 4), (float)parameters[index]);
- num5++;
- }
- else if (parameters[index] is float[])
- {
- float[] input = (float[])parameters[index];
- num7 = 0x10021000 + (num6 * 4);
- WriteSingle(num7, input);
- PS3.Extension.WriteUInt32(0x10020000 + (num3 * 4), num7);
- num3++;
- num6 += (uint)input.Length;
- }
- }
- index++;
- }
- PS3.Extension.WriteUInt32(0x1002004C, func_address);
- Thread.Sleep(20);
- return PS3.Extension.ReadInt32(0x10020050);
- }
- private static void WriteSingle(uint address, float input)
- {
- byte[] Bytes = new byte[4];
- BitConverter.GetBytes(input).CopyTo((Array)Bytes, 0);
- Array.Reverse((Array)Bytes, 0, 4);
- PS3.SetMemory(address, Bytes);
- }
- private static void WriteSingle(uint address, float[] input)
- {
- int length = input.Length;
- byte[] Bytes = new byte[length * 4];
- for (int index = 0; index < length; ++index)
- ReverseBytes(BitConverter.GetBytes(input[index])).CopyTo((Array)Bytes, index * 4);
- PS3.SetMemory(address, Bytes);
- }
- private static byte[] ReverseBytes(byte[] toReverse)
- {
- Array.Reverse((Array)toReverse);
- return toReverse;
- }
- }
- }
- using System;
- using System.Threading;
- public static class RPC
- {
- private static uint SFA1 = 0x01B73580;
- private static uint EFA1 = 0x01B73608;
- private static uint SFA2 = 0x01B73680;
- private static uint EFA2 = 0x01B73708;
- private static uint SFA3 = 0x01B73780;
- private static uint EFA3 = 0x01B73808;
- private static uint BFA1 = 0x185B4;
- private static uint BAB1 = 0x185C0;
- private static uint BFA2 = 0x1AC3C;
- private static uint BAB2 = 0x1AC08;
- private static uint BFA3 = 0xB490C;
- private static uint BAB3 = 0xB4864;
- public static uint CBAB(uint F, uint T)
- {
- if (F > T)
- return 0x4C000000 - (F - T);
- else if (F < T)
- return T - F + 0x48000000;
- else
- return 0x48000000;
- }
- public static void Enable()
- {
- byte[] mem = new byte[] { 0xF8, 0x21, 0xFF, 0x91, 0x7C, 0x08, 0x02, 0xA6, 0xF8, 0x01, 0x00, 0x80, 0x3C, 0x60, 0x10, 0x02, 0x81, 0x83, 0x00, 0x4C, 0x2C, 0x0C, 0x00, 0x00, 0x41, 0x82, 0x00, 0x64, 0x80, 0x83, 0x00, 0x04, 0x80, 0xA3, 0x00, 0x08, 0x80, 0xC3, 0x00, 0x0C, 0x80, 0xE3, 0x00, 0x10, 0x81, 0x03, 0x00, 0x14, 0x81, 0x23, 0x00, 0x18, 0x81, 0x43, 0x00, 0x1C, 0x81, 0x63, 0x00, 0x20, 0xC0, 0x23, 0x00, 0x24, 0xc0, 0x43, 0x00, 0x28, 0xC0, 0x63, 0x00, 0x2C, 0xC0, 0x83, 0x00, 0x30, 0xC0, 0xA3, 0x00, 0x34, 0xc0, 0xC3, 0x00, 0x38, 0xC0, 0xE3, 0x00, 0x3C, 0xC1, 0x03, 0x00, 0x40, 0xC1, 0x23, 0x00, 0x48, 0x80, 0x63, 0x00, 0x00, 0x7D, 0x89, 0x03, 0xA6, 0x4E, 0x80, 0x04, 0x21, 0x3C, 0x80, 0x10, 0x02, 0x38, 0xA0, 0x00, 0x00, 0x90, 0xA4, 0x00, 0x4C, 0x90, 0x64, 0x00, 0x50, 0xE8, 0x01, 0x00, 0x80, 0x7C, 0x08, 0x03, 0xA6, 0x38, 0x21, 0x00, 0x70 };
- PS3.SetMemory(SFA1, mem);
- PS3.SetMemory(SFA2, mem);
- PS3.SetMemory(SFA3, mem);
- 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));
- }
- public static int Call(uint func_address, params object[] parameters)
- {
- int length = parameters.Length;
- int index = 0;
- uint num3 = 0;
- uint num4 = 0;
- uint num5 = 0;
- uint num6 = 0;
- while (index < length)
- {
- if (parameters[index] is int)
- {
- PS3.Extension.WriteInt32(0x10020000 + (num3 * 4), (int)parameters[index]);
- num3++;
- }
- else if (parameters[index] is uint)
- {
- PS3.Extension.WriteUInt32(0x10020000 + (num3 * 4), (uint)parameters[index]);
- num3++;
- }
- else
- {
- uint num7;
- if (parameters[index] is string)
- {
- num7 = 0x10022000 + (num4 * 0x400);
- PS3.Extension.WriteString(num7, Convert.ToString(parameters[index]));
- PS3.Extension.WriteUInt32(0x10020000 + (num3 * 4), num7);
- num3++;
- num4++;
- }
- else if (parameters[index] is float)
- {
- WriteSingle(0x10020024 + (num5 * 4), (float)parameters[index]);
- num5++;
- }
- else if (parameters[index] is float[])
- {
- float[] input = (float[])parameters[index];
- num7 = 0x10021000 + (num6 * 4);
- WriteSingle(num7, input);
- PS3.Extension.WriteUInt32(0x10020000 + (num3 * 4), num7);
- num3++;
- num6 += (uint)input.Length;
- }
- }
- index++;
- }
- PS3.Extension.WriteUInt32(0x1002004C, func_address);
- Thread.Sleep(20);
- return PS3.Extension.ReadInt32(0x10020050);
- }
- private static void WriteSingle(uint address, float input)
- {
- byte[] Bytes = new byte[4];
- BitConverter.GetBytes(input).CopyTo((Array)Bytes, 0);
- Array.Reverse((Array)Bytes, 0, 4);
- PS3.SetMemory(address, Bytes);
- }
- private static void WriteSingle(uint address, float[] input)
- {
- int length = input.Length;
- byte[] Bytes = new byte[length * 4];
- for (int index = 0; index < length; ++index)
- ReverseBytes(BitConverter.GetBytes(input[index])).CopyTo((Array)Bytes, index * 4);
- PS3.SetMemory(address, Bytes);
- }
- private static byte[] ReverseBytes(byte[] toReverse)
- {
- Array.Reverse((Array)toReverse);
- return toReverse;
- }
- }
- private static uint SFA1 = 0x1B73580;
- private static uint SFA2 = 0x1B73680;
- private static uint SFA3 = 0x1B73780;
- private static uint SFA4 = 0x1B73880;
- private static uint BAB1 = 0x1AC08;
- private static uint BAB2 = 0x12194D8;
- private static uint BAB3 = 0x1219B34;
- private static uint BAB4 = 0x1219C7C;
- private static uint BFA1 = 0x1AC3C;
- private static uint BFA2 = 0x12194D0;
- private static uint BFA3 = 0x1219B2C;
- private static uint BFA4 = 0x1219C74;
- private static uint EFA1 = 0x1B73608;
- private static uint EFA2 = 0x1B73708;
- private static uint EFA3 = 0x1B73808;
- private static uint EFA4 = 0x1B73908;
- 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.SetMemory(SFA4, 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));
- PS3.Extension.WriteUInt32(EFA4, CBAB(EFA4, BAB4));
- PS3.Extension.WriteUInt32(BFA4, CBAB(BFA4, SFA4));
- }
- gtav 1.20
- -----------------
- private static uint SFA1 = 0x01B73580;
- private static uint EFA1 = 0x01B73608;
- private static uint SFA2 = 0x01B73680;
- private static uint EFA2 = 0x01B73708;
- private static uint SFA3 = 0x01B73780;
- private static uint EFA3 = 0x01B73808;
- private static uint BFA1 = 0x185B4;
- private static uint BAB1 = 0x185C0;
- private static uint BFA2 = 0x1AC3C;
- private static uint BAB2 = 0x1AC08;
- private static uint BFA3 = 0xB490C;
- private static uint BAB3 = 0xB4864;
- public static uint CBAB(uint F, uint T)
- {
- if (F > T)
- return 0x4C000000 - (F - T);
- else if (F < T)
- return T - F + 0x48000000;
- else
- return 0x48000000;
- }
- 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(SFA11, buffer);
- PS3.SetMemory(SFA22, buffer);
- PS3.SetMemory(SFA33, buffer);
- PS3.SetMemory(SFA44, buffer);
- PS3.Extension.WriteUInt32(EFA11, CBAB(EFA11, BAB11));
- PS3.Extension.WriteUInt32(BFA11, CBAB(BFA11, SFA11));
- PS3.Extension.WriteUInt32(EFA22, CBAB(EFA22, BAB22));
- PS3.Extension.WriteUInt32(BFA22, CBAB(BFA22, SFA22));
- PS3.Extension.WriteUInt32(EFA33, CBAB(EFA33, BAB33));
- PS3.Extension.WriteUInt32(BFA33, CBAB(BFA33, SFA33));
- PS3.Extension.WriteUInt32(EFA44, CBAB(EFA44, BAB44));
- PS3.Extension.WriteUInt32(BFA44, CBAB(BFA44, SFA44));
- }
- public static byte[] ReverseBytes(byte[] toReverse)
- {
- Array.Reverse(toReverse);
- return toReverse;
- }
- public static void WriteSingle(uint address, float input)
- {
- byte[] array = new byte[4];
- BitConverter.GetBytes(input).CopyTo(array, 0);
- Array.Reverse(array, 0, 4);
- PS3.SetMemory(address, array);
- }
- 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);
- }
- public static int Call(uint func_address, params object[] parameters)
- {
- int length = parameters.Length;
- int index = 0;
- uint num3 = 0;
- uint num4 = 0;
- uint num5 = 0;
- uint num6 = 0;
- while (index < length) // CLL 0xfa638911
- {
- if (parameters[index] is int)
- {
- PS3.Extension.WriteInt32(0x10020000 + (num3 * 4), (int)parameters[index]);
- num3++;
- }
- else if (parameters[index] is uint)
- {
- PS3.Extension.WriteUInt32(0x10020000 + (num3 * 4), (uint)parameters[index]);
- num3++;
- }
- else
- {
- uint num7;
- if (parameters[index] is string)
- {
- num7 = 0x10022000 + (num4 * 0x400);
- PS3.Extension.WriteString(num7, Convert.ToString(parameters[index]));
- PS3.Extension.WriteUInt32(0x10020000 + (num3 * 4), num7);
- num3++;
- num4++;
- }
- else if (parameters[index] is float)
- {
- WriteSingle(0x10020024 + (num5 * 4), (float)parameters[index]);
- num5++;
- }
- else if (parameters[index] is float[])
- {
- float[] input = (float[])parameters[index];
- num7 = 0x10021000 + (num6 * 4);
- WriteSingle(num7, input);
- PS3.Extension.WriteUInt32(0x10020000 + (num3 * 4), num7);
- num3++;
- num6 += (uint)input.Length;
- }
- }
- index++;
- }
- PS3.Extension.WriteUInt32(0x1002004C, func_address);
- Thread.Sleep(30);
- int num8 = PS3.Extension.ReadInt32(0x10020050);
- PS3.SetMemory(0x10020000, new byte[0x200]); //0xC0
- return num8;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement