Advertisement
TheRouletteBoi

RPC's

Oct 21st, 2014
748
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 63.63 KB | None | 0 0
  1. GTA V
  2.  
  3. public static void Enable() // CLL 0xfa638911
  4.         {
  5.             byte[] memory = new byte[] { 0x7C, 0x08, 0x02, 0xA6, 0xF8, 0x01, 0x00, 0x80, 0x3C, 0x60, 0x10, 0x02, 0x81, 0x83, 0x00,
  6.                 0x4C, 0x2C, 0x0C, 0x00, 0x00, 0x41, 0x82, 0x00, 0x64, 0x80, 0x83, 0x00, 0x04, 0x80, 0xA3, 0x00, 0x08, 0x80, 0xC3, 0x00,
  7.                 0x0C, 0x80, 0xE3, 0x00, 0x10, 0x81, 0x03, 0x00, 0x14, 0x81, 0x23, 0x00, 0x18, 0x81, 0x43, 0x00, 0x1C, 0x81, 0x63, 0x00,
  8.                 0x20, 0xC0, 0x23, 0x00, 0x24, 0xc0, 0x43, 0x00, 0x28, 0xC0, 0x63, 0x00, 0x2C, 0xC0, 0x83, 0x00, 0x30, 0xC0, 0xA3, 0x00,
  9.                 0x34, 0xc0, 0xC3, 0x00, 0x38, 0xC0, 0xE3, 0x00, 0x3C, 0xC1, 0x03, 0x00, 0x40, 0xC1, 0x23, 0x00, 0x48, 0x80, 0x63, 0x00,
  10.                 0x00, 0x7D, 0x89, 0x03, 0xA6, 0x4E, 0x80, 0x04, 0x21, 0x3C, 0x80, 0x10, 0x02, 0x38, 0xA0, 0x00, 0x00, 0x90, 0xA4, 0x00,
  11.                 0x4C, 0x90, 0x64, 0x00, 0x50, 0xE8, 0x01, 0x00, 0x80, 0x7C, 0x08, 0x03, 0xA6, 0x38, 0x21, 0x00, 0x70
  12.          };
  13.             PS3.SetMemory(function_address, new byte[] { 0x4E, 0x80, 0x00, 0x20 });
  14.             Thread.Sleep(20);
  15.             PS3.SetMemory(function_address + 4, memory);
  16.             PS3.SetMemory(0x10020000, new byte[0x2854]);
  17.             PS3.SetMemory(function_address, new byte[] { 0xF8, 0x21, 0xFF, 0x91 });
  18.             PS3.Extension.WriteUInt32(one_from_address, one_from_bytes);
  19.             PS3.Extension.WriteUInt32(one_to_address, one_to_bytes);
  20.  
  21.             PS3.SetMemory(function2_address, new byte[] { 0x4E, 0x80, 0x00, 0x20 });
  22.             Thread.Sleep(20);
  23.             PS3.SetMemory(function2_address + 4, memory);
  24.             PS3.SetMemory(function2_address, new byte[] { 0xF8, 0x21, 0xFF, 0x91 });
  25.             PS3.Extension.WriteUInt32(two_from_address, two_from_bytes);
  26.             PS3.Extension.WriteUInt32(two_to_address, two_to_bytes);
  27.  
  28.             PS3.SetMemory(function3_address, new byte[] { 0x4E, 0x80, 0x00, 0x20 });
  29.             Thread.Sleep(20);
  30.             PS3.SetMemory(function3_address + 4, memory);
  31.             PS3.SetMemory(function3_address, new byte[] { 0xF8, 0x21, 0xFF, 0x91 });
  32.             PS3.Extension.WriteUInt32(three_from_address, three_from_bytes);
  33.             PS3.Extension.WriteUInt32(three_to_address, three_to_bytes);
  34. }
  35.  
  36.  
  37. Ghosts
  38.  
  39. public static void Enable_RPC()
  40.         {
  41.             PS3.SetMemory(function_address, new byte[] { 0x4E, 0x80, 0x00, 0x20 });
  42.             System.Threading.Thread.Sleep(20);
  43.             byte[] func = new byte[] { 0x7C, 0x08, 0x02, 0xA6, 0xF8, 0x01, 0x00, 0x80, 0x3C, 0x60, 0x10, 0x05, 0x81, 0x83, 0x00, 0x4C,
  44.                 0x2C, 0x0C, 0x00, 0x00, 0x41, 0x82, 0x00, 0x64, 0x80, 0x83, 0x00, 0x04, 0x80, 0xA3, 0x00, 0x08, 0x80, 0xC3, 0x00, 0x0C,
  45.                 0x80, 0xE3, 0x00, 0x10, 0x81, 0x03, 0x00, 0x14, 0x81, 0x23, 0x00, 0x18, 0x81, 0x43, 0x00, 0x1C, 0x81, 0x63, 0x00, 0x20,
  46.                 0xC0, 0x23, 0x00, 0x24, 0xC0, 0x43, 0x00, 0x28, 0xC0, 0x63, 0x00, 0x2C, 0xC0, 0x83, 0x00, 0x30, 0xC0, 0xA3, 0x00, 0x34,
  47.                 0xC0, 0xC3, 0x00, 0x38, 0xC0, 0xE3, 0x00, 0x3C, 0xC1, 0x03, 0x00, 0x40, 0xC1, 0x23, 0x00, 0x48, 0x80, 0x63, 0x00, 0x00,
  48.                 0x7D, 0x89, 0x03, 0xA6, 0x4E, 0x80, 0x04, 0x21, 0x3C, 0x80, 0x10, 0x05, 0x38, 0xA0, 0x00, 0x00, 0x90, 0xA4, 0x00, 0x4C,
  49.                 0x80, 0x64, 0x00, 0x50, 0xE8, 0x01, 0x00, 0x80, 0x7C, 0x08, 0x03, 0xA6, 0x38, 0x21, 0x00, 0x70, 0x4E, 0x80, 0x00, 0x20 };
  50.             PS3.SetMemory(function_address + 0x4, func);
  51.             PS3.SetMemory(0x10050000, new byte[0x2854]);
  52.             PS3.SetMemory(function_address, new byte[] { 0xF8, 0x21, 0xFF, 0x91 });
  53.         }
  54.  
  55. GTA V
  56.  
  57. public static void Enable()
  58.         {
  59.             byte[] buffer = new byte[] {
  60.                 0x7c, 8, 2, 0xa6, 0xf8, 1, 0, 0x80, 60, 0x60, 0x10, 2, 0x81, 0x83, 0, 0x4c,
  61.                 0x2c, 12, 0, 0, 0x41, 130, 0, 100, 0x80, 0x83, 0, 4, 0x80, 0xa3, 0, 8,
  62.                 0x80, 0xc3, 0, 12, 0x80, 0xe3, 0, 0x10, 0x81, 3, 0, 20, 0x81, 0x23, 0, 0x18,
  63.                 0x81, 0x43, 0, 0x1c, 0x81, 0x63, 0, 0x20, 0xc0, 0x23, 0, 0x24, 0xc0, 0x43, 0, 40,
  64.                 0xc0, 0x63, 0, 0x2c, 0xc0, 0x83, 0, 0x30, 0xc0, 0xa3, 0, 0x34, 0xc0, 0xc3, 0, 0x38,
  65.                 0xc0, 0xe3, 0, 60, 0xc1, 3, 0, 0x40, 0xc1, 0x23, 0, 0x48, 0x80, 0x63, 0, 0,
  66.                 0x7d, 0x89, 3, 0xa6, 0x4e, 0x80, 4, 0x21, 60, 0x80, 0x10, 2, 0x38, 160, 0, 0,
  67.                 0x90, 0xa4, 0, 0x4c, 0x90, 100, 0, 80, 0xe8, 1, 0, 0x80, 0x7c, 8, 3, 0xa6,
  68.                 0x38, 0x21, 0, 0x70
  69.              };
  70.             PS3.SetMemory(function_address, new byte[] { 0x4e, 0x80, 0, 0x20 });
  71.             Thread.Sleep(20);
  72.             PS3.SetMemory(function_address + 4, buffer);
  73.             PS3.SetMemory(0x10020000, new byte[0x2854]);
  74.             PS3.SetMemory(function_address, new byte[] { 0xf8, 0x21, 0xff, 0x91 });
  75.             PS3.Extension.WriteUInt32(one_from_address, one_from_bytes);
  76.             PS3.Extension.WriteUInt32(one_to_address, one_to_bytes);
  77.             PS3.SetMemory(function2_address, new byte[] { 0x4e, 0x80, 0, 0x20 });
  78.             Thread.Sleep(20);
  79.             PS3.SetMemory(function2_address + 4, buffer);
  80.             PS3.SetMemory(function2_address, new byte[] { 0xf8, 0x21, 0xff, 0x91 });
  81.             PS3.Extension.WriteUInt32(two_from_address, two_from_bytes);
  82.             PS3.Extension.WriteUInt32(two_to_address, two_to_bytes);
  83.             PS3.SetMemory(function3_address, new byte[] { 0x4e, 0x80, 0, 0x20 });
  84.             Thread.Sleep(20);
  85.             PS3.SetMemory(function3_address + 4, buffer);
  86.             PS3.SetMemory(function3_address, new byte[] { 0xf8, 0x21, 0xff, 0x91 });
  87.             PS3.Extension.WriteUInt32(three_from_address, three_from_bytes);
  88.             PS3.Extension.WriteUInt32(three_to_address, three_to_bytes);
  89.         }
  90.  
  91.  
  92.  
  93.  
  94.  
  95. //the rpc still enables using one function like this:
  96.  
  97.  
  98. public static void Enable()
  99.         {
  100.             byte[] mem = new byte[] { 0xF8, 0x21, 0xFF, 0x91, 0x7C, 0x08, 0x02, 0xA6, 0xF8, 0x01, 0x00, 0x80, 0x3C,
  101. 0x60, 0x10, 0x02, 0x81, 0x83, 0x00, 0x4C, 0x2C, 0x0C, 0x00, 0x00, 0x41, 0x82, 0x00, 0x64, 0x80, 0x83, 0x00, 0x04,
  102. 0x80, 0xA3, 0x00, 0x08, 0x80, 0xC3, 0x00, 0x0C, 0x80, 0xE3, 0x00, 0x10, 0x81, 0x03, 0x00, 0x14, 0x81, 0x23, 0x00,
  103. 0x18, 0x81, 0x43, 0x00, 0x1C, 0x81, 0x63, 0x00, 0x20, 0xC0, 0x23, 0x00, 0x24, 0xc0, 0x43, 0x00, 0x28, 0xC0, 0x63,
  104. 0x00, 0x2C, 0xC0, 0x83, 0x00, 0x30, 0xC0, 0xA3, 0x00, 0x34, 0xc0, 0xC3, 0x00, 0x38, 0xC0, 0xE3, 0x00, 0x3C, 0xC1,
  105. 0x03, 0x00, 0x40, 0xC1, 0x23, 0x00, 0x48, 0x80, 0x63, 0x00, 0x00, 0x7D, 0x89, 0x03, 0xA6, 0x4E, 0x80, 0x04, 0x21,
  106. 0x3C, 0x80, 0x10, 0x02, 0x38, 0xA0, 0x00, 0x00, 0x90, 0xA4, 0x00, 0x4C, 0x90, 0x64, 0x00, 0x50, 0xE8, 0x01, 0x00,
  107. 0x80, 0x7C, 0x08, 0x03, 0xA6, 0x38, 0x21, 0x00, 0x70 };
  108.             PS3.SetMemory(SFA1, mem);
  109.             //PS3.SetMemory(SFA2, mem);
  110.             //PS3.SetMemory(SFA3, mem);
  111.             PS3.Extension.WriteUInt32(EFA1, CBAB(EFA1, BAB1));
  112.             PS3.Extension.WriteUInt32(BFA1, CBAB(BFA1, SFA1));
  113.             //PS3.Extension.WriteUInt32(EFA2, CBAB(EFA2, BAB2));
  114.             //PS3.Extension.WriteUInt32(BFA2, CBAB(BFA2, SFA2));
  115.             //PS3.Extension.WriteUInt32(EFA3, CBAB(EFA3, BAB3));
  116.             //PS3.Extension.WriteUInt32(BFA3, CBAB(BFA3, SFA3));
  117.         }
  118.  
  119.  
  120.  
  121. PPC
  122. ------------------------
  123. mfspr r0, LR
  124. std r0, 0x0080(r1)
  125. lis r3, 0x1002
  126. lwz r12, 0x004C(r3)
  127. cmpwi r12, 0x0000
  128. beq 0x64
  129. lwz r4, 0x0004(r3)
  130. lwz r5, 0x0008(r3)
  131. lwz r6, 0x000C(r3)
  132. lwz r7, 0x0010(r3)
  133. lwz r8, 0x0014(r3)
  134. lwz r9, 0x0018(r3)
  135. lwz r10, 0x001C(r3)
  136. lwz r11, 0x0020(r3)
  137. lfs f1, 0x0024(r3)
  138. lfs f2, 0x0028(r3)
  139. lfs f3, 0x002C(r3)
  140. lfs f4, 0x0030(r3)
  141. lfs f5, 0x0034(r3)
  142. lfs f6, 0x0038(r3)
  143. lfs f7, 0x003C(r3)
  144. lfs f8, 0x0040(r3)
  145. lfs f9, 0x0048(r3)
  146. lwz r3, 0x0000(r3)
  147. mtspr CTR, r12
  148. hexcode 0x4E800421
  149. lis r4, 0x1002
  150. li r5, 0x0000
  151. stw r5, 0x004C(r4)
  152. lwz r3, 0x0050(r4)
  153. ld r0, 0x0080(r1)
  154. mtspr LR, r0
  155. addi r1, r1, 0x0070
  156.  
  157. now complie it
  158. --------------------
  159. 0x7C, 0x08, 0x02, 0xA6, 0xF8, 0x01, 0x00, 0x80, 0x3C,
  160. 0x60, 0x10, 0x02, 0x81, 0x83, 0x00, 0x4C, 0x2C, 0x0C, 0x00, 0x00, 0x41, 0x82, 0x00, 0x64, 0x80, 0x83, 0x00, 0x04,
  161. 0x80, 0xA3, 0x00, 0x08, 0x80, 0xC3, 0x00, 0x0C, 0x80, 0xE3, 0x00, 0x10, 0x81, 0x03, 0x00, 0x14, 0x81, 0x23, 0x00,
  162. 0x18, 0x81, 0x43, 0x00, 0x1C, 0x81, 0x63, 0x00, 0x20, 0xC0, 0x23, 0x00, 0x24, 0xc0, 0x43, 0x00, 0x28, 0xC0, 0x63,
  163. 0x00, 0x2C, 0xC0, 0x83, 0x00, 0x30, 0xC0, 0xA3, 0x00, 0x34, 0xc0, 0xC3, 0x00, 0x38, 0xC0, 0xE3, 0x00, 0x3C, 0xC1,
  164. 0x03, 0x00, 0x40, 0xC1, 0x23, 0x00, 0x48, 0x80, 0x63, 0x00, 0x00, 0x7D, 0x89, 0x03, 0xA6, 0x4E, 0x80, 0x04, 0x21,
  165. 0x3C, 0x80, 0x10, 0x02, 0x38, 0xA0, 0x00, 0x00, 0x90, 0xA4, 0x00, 0x4C, 0x90, 0x64, 0x00, 0x50, 0xE8, 0x01, 0x00,
  166. 0x80, 0x7C, 0x08, 0x03, 0xA6, 0x38, 0x21, 0x00, 0x70
  167. -----------------------------------------------------------------------------------------------
  168.  
  169.  
  170.  
  171. ---------------------------------------------------------------------------------------------------------------------
  172. Choco RPC from gta eboot:
  173.  
  174. 01883150 F821FF91 stdu       r1,-0x70(r1)
  175. 01883154 7C0802A6 mfspr      r0,lr                        
  176. 01883158 F8010080 std        r0,0x80(r1)
  177. 0188315C 3C601006 lis        r3,0x1006                  
  178. 01883160 8183004C lwz        r12,0x4C(r3)          
  179. 01883164 2C0C0000 cmpwi      r12,0x0      
  180. 01883168 41820064 beq        0x018831CC
  181. 0188316C 80830004 lwz        r4,0x4(r3)
  182. 01883170 80A30008 lwz        r5,0x8(r3)
  183. 01883174 80C3000C lwz        r6,0xC(r3)                  
  184. 01883178 80E30010 lwz        r7,0x10(r3)
  185. 0188317C 81030014 lwz        r8,0x14(r3)                
  186. 01883180 81230018 lwz        r9,0x18(r3)
  187. 01883184 8143001C lwz        r10,0x1C(r3)                  
  188. 01883188 81630020 lwz        r11,0x20(r3)
  189. 0188318C C0230024 lfs        f1,0x24(r3)                
  190. 01883190 C0430028 lfs        f2,0x28(r3)
  191. 01883194 C063002C lfs        f3,0x2C(r3)                
  192. 01883198 C0830030 lfs        f4,0x30(r3)
  193. 0188319C C0A30034 lfs        f5,0x34(r3)                  
  194. 018831A0 C0C30038 lfs        f6,0x38(r3)
  195. 018831A4 C0E3003C lfs        f7,0x3C(r3)                  
  196. 018831A8 C1030040 lfs        f8,0x40(r3)
  197. 018831AC C1230048 lfs        f9,0x48(r3)                  
  198. 018831B0 80630000 lwz        r3,0x0(r3)
  199. 018831B4 7D8903A6 mtspr      ctr,r12
  200. 018831B8 4E800421 bctrl                                  
  201. 018831BC 3C801006 lis        r4,0x1006                    
  202. 018831C0 38A00000 li         r5,0x0
  203. 018831C4 90A4004C stw        r5,0x4C(r4)              
  204. 018831C8 90640050 stw        r3,0x50(r4)
  205. 018831CC E8010080 ld         r0,0x80(r1)                  
  206. 018831D0 7C0803A6 mtspr      lr,r0                      
  207. 018831D4 38210070 addi       r1,r1,0x70
  208. 018831D8 4E800020 blr                                      
  209. ----------------------------------------------------------------------------------------------------------------------
  210. LTS RPC hook
  211.  
  212. 10050168 7C0802A6 mfspr      r0,lr
  213. 1005016C F8010010 std        r0,0x10(r1)  
  214. 10050170 F821FF91 stdu       r1,-0x70(r1)
  215. 10050174 F8610010 std        r3,0x10(r1)        
  216. 10050178 3C601003 lis        r3,0x1003
  217. 1005017C 80030000 lwz        r0,0x0(r3)              
  218. 10050180 2C000000 cmpwi      r0,0x0                      
  219. 10050184 41820020 beq        0x100501A4                    
  220. 10050188 3C601003 lis        r3,0x1003
  221. 1005018C 60630004 ori        r3,r3,0x4                  
  222. 10050190 7C0903A6 mtspr      ctr,r0
  223. 10050194 4E800421 bctrl                                    
  224. 10050198 38000000 li         r0,0x0
  225. 1005019C 3C601003 lis        r3,0x1003                      
  226. 100501A0 90030000 stw        r0,0x0(r3)                  
  227. 100501A4 E8610010 ld         r3,0x10(r1)                
  228. 100501A8 3C000152 lis        r0,0x152
  229. 100501AC 6000DB58 ori        r0,r0,0xDB58                
  230. 100501B0 7C0903A6 mtspr      ctr,r0                      
  231. 100501B4 4E800421 bctrl                              
  232. 100501B8 38210070 addi       r1,r1,0x70
  233. 100501BC E8010010 ld         r0,0x10(r1)                  
  234. 100501C0 7C0803A6 mtspr      lr,r0                        
  235. 100501C4 4E800020 blr                                      
  236. 100501C8 5483103A slwi       r3,r4,2
  237. 100501CC 7C761814 addc       r3,r22,r3                  
  238. 100501D0 78630020 clrldi     r3,r3,32                    
  239. 100501D4 806300A4 lwz        r3,0xA4(r3)              
  240. 100501D8 80630038 lwz        r3,0x38(r3)                
  241.  
  242.  
  243.  
  244.  
  245. ----------------------------------------------------------------------------------------------------------------------
  246. [GTA][1.26] RPC Script Hook by STACKOVERFLOW
  247.  
  248. 01883150 F821FF91 stdu       r1,-0x70(r1)
  249. 01883154 7C0802A6 mfspr      r0,lr                        
  250. 01883158 F8010080 std        r0,0x80(r1)
  251. 0188315C 3C601006 lis        r3,0x1006                  
  252. 01883160 8183004C lwz        r12,0x4C(r3)          
  253. 01883164 2C0C0000 cmpwi      r12,0x0      
  254. 01883168 41820064 beq        0x018831CC
  255. 0188316C 80830004 lwz        r4,0x4(r3)
  256. 01883170 80A30008 lwz        r5,0x8(r3)
  257. 01883174 80C3000C lwz        r6,0xC(r3)                  
  258. 01883178 80E30010 lwz        r7,0x10(r3)
  259. 0188317C 81030014 lwz        r8,0x14(r3)                
  260. 01883180 81230018 lwz        r9,0x18(r3)
  261. 01883184 8143001C lwz        r10,0x1C(r3)                  
  262. 01883188 81630020 lwz        r11,0x20(r3)
  263. 0188318C C0230024 lfs        f1,0x24(r3)                
  264. 01883190 C0430028 lfs        f2,0x28(r3)
  265. 01883194 C063002C lfs        f3,0x2C(r3)                
  266. 01883198 C0830030 lfs        f4,0x30(r3)
  267. 0188319C C0A30034 lfs        f5,0x34(r3)                  
  268. 018831A0 C0C30038 lfs        f6,0x38(r3)
  269. 018831A4 C0E3003C lfs        f7,0x3C(r3)                  
  270. 018831A8 C1030040 lfs        f8,0x40(r3)
  271. 018831AC C1230048 lfs        f9,0x48(r3)                  
  272. 018831B0 80630000 lwz        r3,0x0(r3)
  273. 018831B4 7D8903A6 mtspr      ctr,r12
  274. 018831B8 4E800421 bctrl                                  
  275. 018831BC 3C801006 lis        r4,0x1006                    
  276. 018831C0 38A00000 li         r5,0x0
  277. 018831C4 90A4004C stw        r5,0x4C(r4)              
  278. 018831C8 90640050 stw        r3,0x50(r4)
  279. 018831CC E8010080 ld         r0,0x80(r1)                  
  280. 018831D0 7C0803A6 mtspr      lr,r0                      
  281. 018831D4 38210070 addi       r1,r1,0x70
  282. 018831D8 4E800020 blr                
  283. ----------------------------------------------------------------------------------------------------------------------
  284. iMCSx GTAV RPC
  285.  
  286. 0xF98D4 4BFDE4ED bl         0xD7DC0
  287.  
  288. 000D7DC0 7C0802A6 mfspr      r0,lr
  289. 000D7DC4 49432CC5 bl         0x0150AA88
  290. 000D7DC8 F821FF51 stdu       r1,-0xB0(r1)
  291. 000D7DCC F80100C0 std        r0,0xC0(r1)
  292. 000D7DD0 60EB0000 mr         r11,r7
  293. 000D7DD4 610C0000 mr         r12,r8
  294. 000D7DD8 90810070 stw        r4,0x70(r1)
  295. 000D7DDC 547D063E clrlwi     r29,r3,24
  296. 000D7DE0 90A10074 stw        r5,0x74(r1)
  297. 000D7DE4 3C6001D6 lis        r3,0x1D6
  298. 000D7DE8 90C10078 stw        r6,0x78(r1)
  299. 000D7DEC 3CE001D6 lis        r7,0x1D6
  300. 000D7DF0 9161007C stw        r11,0x7C(r1)
  301. 000D7DF4 3FE00181 lis        r31,0x181
  302. 000D7DF8 91810080 stw        r12,0x80(r1)
  303. 000D7DFC 308744D2 addic      r4,r7,0x44D2
  304. 000D7E00 7C6803A6 mtspr      lr,r3                                  // start
  305. 000D7E04 E86B0009 ldu        r3,0x8(r11)
  306. 000D7E08 2C230000 cmpdi      r3,0x0
  307. 000D7E0C 41820008 beq        0x000D7E14
  308. 000D7E10 7C621B78 mr         r2,r3
  309. 000D7E14 E86B0009 ldu        r3,0x8(r11)
  310. 000D7E18 7D7E5B78 mr         r30,r11
  311. 000D7E1C E88B0009 ldu        r4,0x8(r11)
  312. 000D7E20 E8AB0009 ldu        r5,0x8(r11)
  313. 000D7E24 E8CB0009 ldu        r6,0x8(r11)
  314. 000D7E28 E8EB0009 ldu        r7,0x8(r11)
  315. 000D7E2C E90B0009 ldu        r8,0x8(r11)
  316. 000D7E30 E92B0009 ldu        r9,0x8(r11)
  317. 000D7E34 E94B0009 ldu        r10,0x8(r11)
  318. 000D7E38 E98B0009 ldu        r12,0x8(r11)
  319. 000D7E3C F9810070 std        r12,0x70(r1)
  320. 000D7E40 E98B0009 ldu        r12,0x8(r11)
  321. 000D7E44 F9810078 std        r12,0x78(r1)
  322. 000D7E48 E98B0009 ldu        r12,0x8(r11)
  323. 000D7E4C F9810080 std        r12,0x80(r1)
  324. 000D7E50 E98B0009 ldu        r12,0x8(r11)
  325. 000D7E54 F9810088 std        r12,0x88(r1)
  326. 000D7E58 E98B0009 ldu        r12,0x8(r11)
  327. 000D7E5C F9810090 std        r12,0x90(r1)
  328. 000D7E60 E98B0009 ldu        r12,0x8(r11)
  329. 000D7E64 F9810098 std        r12,0x98(r1)
  330. 000D7E68 E98B0009 ldu        r12,0x8(r11)
  331. 000D7E6C F98100A0 std        r12,0xA0(r1)
  332. 000D7E70 E98B0009 ldu        r12,0x8(r11)
  333. 000D7E74 F98100A8 std        r12,0xA8(r1)
  334. 000D7E78 E98B0009 ldu        r12,0x8(r11)
  335. 000D7E7C F98100B0 std        r12,0xB0(r1)
  336. 000D7E80 E98B0009 ldu        r12,0x8(r11)
  337. 000D7E84 F98100B8 std        r12,0xB8(r1)
  338. 000D7E88 CC2B0008 lfdu       f1,0x8(r11)
  339. 000D7E8C 7D7D5B78 mr         r29,r11
  340. 000D7E90 CC4B0008 lfdu       f2,0x8(r11)
  341. 000D7E94 CC6B0008 lfdu       f3,0x8(r11)
  342. 000D7E98 CC8B0008 lfdu       f4,0x8(r11)
  343. 000D7E9C CCAB0008 lfdu       f5,0x8(r11)
  344. 000D7EA0 CCCB0008 lfdu       f6,0x8(r11)
  345. 000D7EA4 CCEB0008 lfdu       f7,0x8(r11)
  346. 000D7EA8 CD0B0008 lfdu       f8,0x8(r11)
  347. 000D7EAC CD2B0008 lfdu       f9,0x8(r11)
  348. 000D7EB0 CD4B0008 lfdu       f10,0x8(r11)
  349. 000D7EB4 4E800021 blrl
  350. 000D7EB8 F87E0000 std        r3,0x0(r30)
  351. 000D7EBC D83D0000 stfd       f1,0x0(r29)
  352. 000D7EC0 38600000 li         r3,0x0
  353. 000D7EC4 F87F0000 std        r3,0x0(r31)
  354. 000D7EC8 7F82E378 mr         r2,r28
  355. 000D7ECC EB8100D8 ld         r28,0xD8(r1)
  356. 000D7ED0 EBA100D0 ld         r29,0xD0(r1)
  357. 000D7ED4 EBC100C8 ld         r30,0xC8(r1)
  358. 000D7ED8 EBE100C0 ld         r31,0xC0(r1)
  359. 000D7EDC 38210200 addi       r1,r1,0x200
  360. 000D7EE0 E8010010 ld         r0,0x10(r1)
  361. 000D7EE4 7C0803A6 mtspr      lr,r0
  362. 000D7EE8 4E800020 blr
  363.  
  364. ----------------------------------------------------------------------------------------------------------------------
  365. Choco RPC for COD Ghosts
  366.  
  367. stdu      r1, -0x70(r1)
  368. mflr      r0
  369. std       r0, 0x80(r1)
  370. lis       r3, 0x1005
  371. lwz       r12, 0x4C(r3)
  372. cmpwi     r12, 0
  373. beq       0x64          #local return
  374. lwz       r4, 4(r3)
  375. lwz       r5, 8(r3)
  376. lwz       r6, 0xC(r3)
  377. lwz       r7, 0x10(r3)
  378. lwz       r8, 0x14(r3)
  379. lwz       r9, 0x18(r3)
  380. lwz       r10, 0x1C(r3)
  381. lwz       r11, 0x20(r3)
  382. lfs       f1, 0x24(r3)
  383. lfs       f2, 0x28(r3)
  384. lfs       f3, 0x2C(r3)
  385. lfs       f4, 0x30(r3)
  386. lfs       f5, 0x34(r3)
  387. lfs       f6, 0x38(r3)
  388. lfs       f7, 0x3C(r3)
  389. lfs       f8, 0x40(r3)
  390. lfs       f9, 0x48(r3)
  391. lwz       r3, 0(r3)
  392. mtctr     r12
  393. bctrl
  394. lis       r4, 0x1005
  395. li        r5, 0
  396. stw       r5, 0x4C(r4)
  397. lwz       r3, 0x50(r4)
  398. ld        r0, arg_80(r1)    #here's what the local return branch goes to
  399. mtlr      r0
  400. addi      r1, r1, 0x70
  401. blr
  402.  
  403.  
  404.  
  405.  
  406. --------------------------------------------------------------------------------------------------------------
  407.  
  408.     private static uint function_address = 0x1B6AC00;
  409.         private static uint one_from_address = 0x1B6AC88;
  410.         private static uint one_from_bytes = 0x4A4AFF80;
  411.         private static uint one_to_address = 0x1AC3C;
  412.         private static uint one_to_bytes = 0x49B4FFC4;
  413.         private static uint function2_address = 0x1B6AD00;
  414.         private static uint two_from_address = 0x1B6AD88;
  415.         private static uint two_from_bytes = 0x4B6AA5F0;
  416.         private static uint two_to_address = 0x1215370;
  417.         private static uint two_to_bytes = 0x48955990;
  418.         private static uint function3_address = 0x1B6AE00;
  419.         private static uint three_from_address = 0x1B6AE88;
  420.         private static uint three_from_bytes = 0x4B6AAB4C;
  421.         private static uint three_to_address = 0x12159C;
  422.         private static uint three_to_bytes = 0x48955434;
  423.         private static uint function4_address = 0x1B6AF00;
  424.         private static uint four_from_address = 0x1B6A88;
  425.         private static uint four_from_bytes = 0x4B6AAB94;
  426.         private static uint four_to_address = 0x1215B14;
  427.         private static uint four_to_bytes = 0x489553EC;
  428.         private static uint function5_address = 0x1B6B000;
  429.         private static uint five_from_address = 0x1B6B088;
  430.         private static uint five_from_bytes = 0x4A54974B;
  431.         private static uint five_to_address = 0xB487C;
  432.         private static uint five_to_bytes = 0x49AB6784;
  433.  
  434.         public static void Enable()
  435.         {
  436.             byte[] buffer = new byte[] { 0xF8, 0x21, 0xFF, 0x91, 0x7C, 0x08, 0x02, 0xA6, 0xF8, 0x01, 0x00, 0x80, 0x3C,
  437.                 0x60, 0x10, 0x02, 0x81, 0x83, 0x00, 0x4C, 0x2C, 0x0C, 0x00, 0x00, 0x41, 0x82, 0x00, 0x64, 0x80, 0x83,
  438.                 0x00, 0x04, 0x80, 0xA3, 0x00, 0x08, 0x80, 0xC3, 0x00, 0x0C, 0x80, 0xE3, 0x00, 0x10, 0x81, 0x03, 0x00,
  439.                 0x14, 0x81, 0x23, 0x00, 0x18, 0x81, 0x43, 0x00, 0x1C, 0x81, 0x63, 0x00, 0x20, 0xC0, 0x23, 0x00, 0x24,
  440.                 0xc0, 0x43, 0x00, 0x28, 0xC0, 0x63, 0x00, 0x2C, 0xC0, 0x83, 0x00, 0x30, 0xC0, 0xA3, 0x00, 0x34, 0xc0,
  441.                 0xC3, 0x00, 0x38, 0xC0, 0xE3, 0x00, 0x3C, 0xC1, 0x03, 0x00, 0x40, 0xC1, 0x23, 0x00, 0x48, 0x80, 0x63,
  442.                 0x00, 0x00, 0x7D, 0x89, 0x03, 0xA6, 0x4E, 0x80, 0x04, 0x21, 0x3C, 0x80, 0x10, 0x02, 0x38, 0xA0, 0x00,
  443.                 0x00, 0x90, 0xA4, 0x00, 0x4C, 0x90, 0x64, 0x00, 0x50, 0xE8, 0x01, 0x00, 0x80, 0x7C, 0x08, 0x03, 0xA6,
  444.                 0x38, 0x21, 0x00, 0x70
  445.              };
  446.             PS3.SetMemory(function_address, new byte[] { 0x4E, 0x80, 0x00, 0x20 });
  447.             Thread.Sleep(20);
  448.             PS3.SetMemory(function_address + 4, buffer);
  449.             PS3.SetMemory(0x10020000, new byte[0x2854]);
  450.             PS3.SetMemory(function_address, new byte[] { 0xF8, 0x21, 0xFF, 0x91 });
  451.             PS3.Extension.WriteUInt32(one_from_address, one_from_bytes);
  452.             PS3.Extension.WriteUInt32(one_to_address, one_to_bytes);
  453.             PS3.SetMemory(function2_address, new byte[] { 0x4E, 0x80, 0x00, 0x20 });
  454.             Thread.Sleep(20);
  455.             PS3.SetMemory(function2_address + 4, buffer);
  456.             PS3.SetMemory(function2_address, new byte[] { 0xF8, 0x21, 0xFF, 0x91 });
  457.             PS3.Extension.WriteUInt32(two_from_address, two_from_bytes);
  458.             PS3.Extension.WriteUInt32(two_to_address, two_to_bytes);
  459.             PS3.SetMemory(function3_address, new byte[] { 0x4E, 0x80, 0x00, 0x20 });
  460.             Thread.Sleep(20);
  461.             PS3.SetMemory(function3_address + 4, buffer);
  462.             PS3.SetMemory(function3_address, new byte[] { 0xF8, 0x21, 0xFF, 0x91 });
  463.             PS3.Extension.WriteUInt32(three_from_address, three_from_bytes);
  464.             PS3.Extension.WriteUInt32(three_to_address, three_to_bytes);
  465.             PS3.SetMemory(function4_address, new byte[] { 0x4E, 0x80, 0x00, 0x20 });
  466.             Thread.Sleep(20);
  467.             PS3.SetMemory(function4_address + 4, buffer);
  468.             PS3.SetMemory(function4_address, new byte[] { 0xF8, 0x21, 0xFF, 0x91 });
  469.             PS3.Extension.WriteUInt32(four_from_address, four_from_bytes);
  470.             PS3.Extension.WriteUInt32(four_to_address, four_to_bytes);
  471.             PS3.SetMemory(function5_address, new byte[] { 0x4E, 0x80, 0x00, 0x20 });
  472.             Thread.Sleep(20);
  473.             PS3.SetMemory(function5_address + 4, buffer);
  474.             PS3.SetMemory(function5_address, new byte[] { 0xF8, 0x21, 0xFF, 0x91 });
  475.             PS3.Extension.WriteUInt32(five_from_address, five_from_bytes);
  476.             PS3.Extension.WriteUInt32(five_to_address, five_to_bytes);
  477.         }
  478. -------------------------------------------------
  479.  
  480.  
  481.  
  482. public static void Enable() // CLL 0xfa638911
  483.         {
  484.             byte[] WritePPC = new byte[] { 0xF8, 0x21, 0xFF, 0x91, 0x7C, 0x08, 0x02, 0xA6, 0xF8, 0x01, 0x00, 0x80, 0x3C, 0x60, 0x10, 0x02, 0x81, 0x83, 0x00,
  485.                 0x4C, 0x2C, 0x0C, 0x00, 0x00, 0x41, 0x82, 0x00, 0x64, 0x80, 0x83, 0x00, 0x04, 0x80, 0xA3, 0x00, 0x08, 0x80, 0xC3, 0x00,
  486.                 0x0C, 0x80, 0xE3, 0x00, 0x10, 0x81, 0x03, 0x00, 0x14, 0x81, 0x23, 0x00, 0x18, 0x81, 0x43, 0x00, 0x1C, 0x81, 0x63, 0x00,
  487.                 0x20, 0xC0, 0x23, 0x00, 0x24, 0xc0, 0x43, 0x00, 0x28, 0xC0, 0x63, 0x00, 0x2C, 0xC0, 0x83, 0x00, 0x30, 0xC0, 0xA3, 0x00,
  488.                 0x34, 0xc0, 0xC3, 0x00, 0x38, 0xC0, 0xE3, 0x00, 0x3C, 0xC1, 0x03, 0x00, 0x40, 0xC1, 0x23, 0x00, 0x48, 0x80, 0x63, 0x00,
  489.                 0x00, 0x7D, 0x89, 0x03, 0xA6, 0x4E, 0x80, 0x04, 0x21, 0x3C, 0x80, 0x10, 0x02, 0x38, 0xA0, 0x00, 0x00, 0x90, 0xA4, 0x00,
  490.                 0x4C, 0x90, 0x64, 0x00, 0x50, 0xE8, 0x01, 0x00, 0x80, 0x7C, 0x08, 0x03, 0xA6, 0x38, 0x21, 0x00, 0x70  //0x4E, 0x80, 0x00, 0x20 remove or add
  491.          };
  492.             PS3.SetMemory(SFA1, WritePPC);
  493.             PS3.SetMemory(SFA2, WritePPC);
  494.             PS3.SetMemory(SFA3, WritePPC);
  495.             PS3.Extension.WriteUInt32(EFA1, CBAB(EFA1, BAB1));
  496.             PS3.Extension.WriteUInt32(BFA1, CBAB(BFA1, SFA1));
  497.             PS3.Extension.WriteUInt32(EFA2, CBAB(EFA2, BAB2));
  498.             PS3.Extension.WriteUInt32(BFA2, CBAB(BFA2, SFA2));
  499.             PS3.Extension.WriteUInt32(EFA3, CBAB(EFA3, BAB3));
  500.             PS3.Extension.WriteUInt32(BFA3, CBAB(BFA3, SFA3));
  501.         }
  502.  
  503.  
  504.  
  505. public static void Enable()
  506.         {
  507.             byte[] buffer = new byte[] {
  508.                 0xf8, 0x21, 0xff, 0x91, 0x7c, 8, 2, 0xa6, 0xf8, 1, 0, 0x80, 60, 0x60, 0x10, 2,
  509.                 0x81, 0x83, 0, 0x4c, 0x2c, 12, 0, 0, 0x41, 130, 0, 100, 0x80, 0x83, 0, 4, 0x80,
  510.                 0xa3, 0, 8, 0x80, 0xc3, 0, 12, 0x80, 0xe3, 0, 0x10, 0x81, 3, 0, 20, 0x81,
  511.                 0x23, 0, 0x18, 0x81, 0x43, 0, 0x1c, 0x81, 0x63, 0, 0x20, 0xc0, 0x23, 0, 0x24,
  512.                 0xc0, 0x43, 0, 40, 0xc0, 0x63, 0, 0x2c, 0xc0, 0x83, 0, 0x30, 0xc0, 0xa3, 0, 0x34, 0xc0,
  513.                 0xc3, 0, 0x38, 0xc0, 0xe3, 0, 60, 0xc1, 3, 0, 0x40, 0xc1, 0x23, 0, 0x48,
  514.                 0x80, 0x63, 0, 0, 0x7d, 0x89, 3, 0xa6, 0x4e, 0x80, 4, 0x21, 60, 0x80, 0x10, 2, 0x38,
  515.                 160, 0, 0, 0x90, 0xa4, 0, 0x4c, 0x90, 100, 0, 80, 0xe8, 1, 0, 0x80, 0x7c,
  516.                 8, 3, 0xa6, 0x38, 0x21, 0, 0x70
  517.              };
  518.             PS3.SetMemory(SFA1, buffer);
  519.             PS3.SetMemory(SFA2, buffer);
  520.             PS3.SetMemory(SFA3, buffer);
  521.             PS3.Extension.WriteUInt32(EFA1, CBAB(EFA1, BAB1));
  522.             PS3.Extension.WriteUInt32(BFA1, CBAB(BFA1, SFA1));
  523.             PS3.Extension.WriteUInt32(EFA2, CBAB(EFA2, BAB2));
  524.             PS3.Extension.WriteUInt32(BFA2, CBAB(BFA2, SFA2));
  525.             PS3.Extension.WriteUInt32(EFA3, CBAB(EFA3, BAB3));
  526.             PS3.Extension.WriteUInt32(BFA3, CBAB(BFA3, SFA3));
  527.         }
  528.  
  529.  
  530.  
  531.     private static uint four_from_address = 0x1b6af88;
  532.         private static uint four_from_bytes = 0x4b6aab94;
  533.         private static uint four_to_address = 0x1215b14;
  534.         private static uint four_to_bytes = 0x489553ec;
  535.         private static uint function_address = 0x1b6ac00;
  536.         private static uint function2_address = 0x1b6ad00;
  537.         private static uint function3_address = 0x1b6ae00;
  538.         private static uint function4_address = 0x1b6af00;
  539.         private static uint one_from_address = 0x1b6ac88;
  540.         private static uint one_from_bytes = 0x4a4aff80;
  541.         private static uint one_to_address = 0x1ac3c;
  542.         private static uint one_to_bytes = 0x49b4ffc4;
  543.         private static uint three_from_address = 0x1b6ae88;
  544.         private static uint three_from_bytes = 0x4b6aab4c;
  545.         private static uint three_to_address = 0x12159cc;
  546.         private static uint three_to_bytes = 0x48955434;
  547.         private static uint two_from_address = 0x1b6ad88;
  548.         private static uint two_from_bytes = 0x4b6aa5f0;
  549.         private static uint two_to_address = 0x1215370;
  550.         private static uint two_to_bytes = 0x48955990;
  551.  
  552. public static void Enable()
  553.         {
  554.             byte[] buffer = new byte[] {
  555.                 0x7c, 8, 2, 0xa6, 0xf8, 1, 0, 0x80, 60, 0x60, 0x10, 2, 0x81, 0x83, 0, 0x4c,
  556.                 0x2c, 12, 0, 0, 0x41, 130, 0, 100, 0x80, 0x83, 0, 4, 0x80, 0xa3, 0, 8,
  557.                 0x80, 0xc3, 0, 12, 0x80, 0xe3, 0, 0x10, 0x81, 3, 0, 20, 0x81, 0x23, 0, 0x18,
  558.                 0x81, 0x43, 0, 0x1c, 0x81, 0x63, 0, 0x20, 0xc0, 0x23, 0, 0x24, 0xc0, 0x43, 0, 40,
  559.                 0xc0, 0x63, 0, 0x2c, 0xc0, 0x83, 0, 0x30, 0xc0, 0xa3, 0, 0x34, 0xc0, 0xc3, 0, 0x38,
  560.                 0xc0, 0xe3, 0, 60, 0xc1, 3, 0, 0x40, 0xc1, 0x23, 0, 0x48, 0x80, 0x63, 0, 0,
  561.                 0x7d, 0x89, 3, 0xa6, 0x4e, 0x80, 4, 0x21, 60, 0x80, 0x10, 2, 0x38, 160, 0, 0,
  562.                 0x90, 0xa4, 0, 0x4c, 0x90, 100, 0, 80, 0xe8, 1, 0, 0x80, 0x7c, 8, 3, 0xa6,
  563.                 0x38, 0x21, 0, 0x70
  564.              };
  565.             PS3.SetMemory(function_address, new byte[] { 0x4e, 0x80, 0, 0x20 });
  566.             Thread.Sleep(20);
  567.             PS3.SetMemory(function_address + 4, buffer);
  568.             PS3.SetMemory(0x10020000, new byte[0x2854]);
  569.             PS3.SetMemory(function_address, new byte[] { 0xf8, 0x21, 0xff, 0x91 });
  570.             PS3.Extension.WriteUInt32(one_from_address, one_from_bytes);
  571.             PS3.Extension.WriteUInt32(one_to_address, one_to_bytes);
  572.             PS3.SetMemory(function2_address, new byte[] { 0x4e, 0x80, 0, 0x20 });
  573.             Thread.Sleep(20);
  574.             PS3.SetMemory(function2_address + 4, buffer);
  575.             PS3.SetMemory(function2_address, new byte[] { 0xf8, 0x21, 0xff, 0x91 });
  576.             PS3.Extension.WriteUInt32(two_from_address, two_from_bytes);
  577.             PS3.Extension.WriteUInt32(two_to_address, two_to_bytes);
  578.             PS3.SetMemory(function3_address, new byte[] { 0x4e, 0x80, 0, 0x20 });
  579.             Thread.Sleep(20);
  580.             PS3.SetMemory(function3_address + 4, buffer);
  581.             PS3.SetMemory(function3_address, new byte[] { 0xf8, 0x21, 0xff, 0x91 });
  582.             PS3.Extension.WriteUInt32(three_from_address, three_from_bytes);
  583.             PS3.Extension.WriteUInt32(three_to_address, three_to_bytes);
  584.             PS3.SetMemory(function4_address, new byte[] { 0x4e, 0x80, 0, 0x20 });
  585.             Thread.Sleep(20);
  586.             PS3.SetMemory(function4_address + 4, buffer);
  587.             PS3.SetMemory(function4_address, new byte[] { 0xf8, 0x21, 0xff, 0x91 });
  588.             PS3.Extension.WriteUInt32(four_from_address, four_from_bytes);
  589.             PS3.Extension.WriteUInt32(four_to_address, four_to_bytes);
  590.             Thread.Sleep(20);
  591.         }
  592.  
  593. /*
  594. Release Auto RPC class For Any Update !
  595. By Krank
  596. this way will auto find the branch and calculate everything for you !
  597.  
  598. 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 !
  599.  
  600. 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
  601.  
  602. Note 3 : its also maybe used for any other branching you use or have just change the PPC code that search function handle
  603. */
  604.  
  605. //The Enable Event !
  606.  
  607. public static void Enable()
  608.         {
  609.  
  610.             byte[] bytes_Found_branch_address = { 0x48, 0x00, 0x00, 0x0C, 0x40, 0x99, 0x00, 0x08, 0x41, 0x9D, 0x00, 0x7C };
  611.             uint Found_branch_address = Search(bytes_Found_branch_address, 0x15000, 0x5000, 4);
  612.  
  613.             byte[] bytes_Found_branch_address2 = { 0x4B, 0xFF, 0xFF, 0xCC, 0x80, 0x7E, 0x00, 0x5C, 0x7C, 0x1C, 0x18, 0x00 };
  614.             uint Found_branch_address2 = Search(bytes_Found_branch_address2, 0x15000, 0x5000, 4);
  615.  
  616.             byte[] bytes_Found_branch_address3 = { 0x4B, 0xFF, 0xFF, 0x58, 0x38, 0x21, 0x00, 0xB0, 0x31, 0x81, 0xFF, 0xF8 };
  617.             uint Found_branch_address3 = Search(bytes_Found_branch_address3, 0xB0000, 0x10000, 4);
  618.  
  619.             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 };
  620.             uint Found_function_address = Search(bytes_function_address, 0x01B00000, 0x1000000, 4) + 0x770;
  621.             uint Found_function_adress2 = Found_function_address + 0x100;
  622.             uint Found_function_adress3 = Found_function_address + 0x200;
  623.  
  624.  
  625.             byte[] bytes_return_branch = { 0x40, 0x99, 0x00, 0x08, 0x41, 0x9D, 0x00, 0x7C };
  626.             uint return_branch = Search(bytes_return_branch, 0x10000, 0x10000, 4) + 0x8;
  627.  
  628.             byte[] bytes_return_branch2 = { 0x7F, 0x9C, 0x1B, 0x78, 0x33, 0xBD, 0x00, 0x01, 0x7B, 0xBD, 0x00, 0x20, 0x4B, 0xFF, 0xFF, 0xCC };
  629.             uint return_branch2 = Search(bytes_return_branch2, 0x10000, 0x10000, 4) + 0xC;
  630.  
  631.             byte[] bytes_return_branch3 = { 0x3F, 0xE0, 0x01, 0xCD, 0x63, 0x7D, 0x00, 0x00 };
  632.             uint return_branch3 = Search(bytes_return_branch3, 0x10000, 0x10000, 4) + 0x14;
  633.  
  634.             uint branch_bytes = Found_function_address - Found_branch_address + 0x48000000;
  635.             uint branch_bytes2 = Found_function_adress2 - Found_branch_address2 + 0x48000000;
  636.             uint branch_bytes3 = Found_function_adress3 - Found_branch_address3 + 0x48000000;
  637.  
  638.             uint plus_function_address = Found_function_address + 0x88;
  639.             uint plus_function_address2 = Found_function_adress2 + 0x88;
  640.             uint plus_function_address3 = Found_function_adress3 + 0x88;
  641.  
  642.             uint branch_bytes_back = 0x4C000000 - (plus_function_address - return_branch);
  643.             uint branch_bytes_back2 = 0x4C000000 - (plus_function_address2 - return_branch2);
  644.             uint branch_bytes_back3 = 0x4C000000 - (plus_function_address3 - return_branch3);
  645.  
  646.             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 };
  647.  
  648.             PS3.SetMemory(Found_function_address, new byte[] { 0x4E, 0x80, 0x00, 0x20 });
  649.             Thread.Sleep(20);
  650.             PS3.SetMemory(Found_function_address + 4, memory);
  651.             PS3.SetMemory(0x10020000, new byte[0x2854]);
  652.             PS3.SetMemory(Found_function_address, new byte[] { 0xF8, 0x21, 0xFF, 0x91 });
  653.             PS3.Extension.WriteUInt32(plus_function_address, branch_bytes_back);
  654.             PS3.Extension.WriteUInt32(Found_branch_address, branch_bytes);
  655.  
  656.             PS3.SetMemory(Found_function_adress2, new byte[] { 0x4E, 0x80, 0x00, 0x20 });
  657.             Thread.Sleep(20);
  658.             PS3.SetMemory(Found_function_adress2 + 4, memory);
  659.             PS3.SetMemory(0x10020000, new byte[0x2854]);
  660.             PS3.SetMemory(Found_function_adress2, new byte[] { 0xF8, 0x21, 0xFF, 0x91 });
  661.             PS3.Extension.WriteUInt32(plus_function_address2, branch_bytes_back2);
  662.             PS3.Extension.WriteUInt32(Found_branch_address2, branch_bytes2);
  663.  
  664.             PS3.SetMemory(Found_function_adress3, new byte[] { 0x4E, 0x80, 0x00, 0x20 });
  665.             Thread.Sleep(20);
  666.             PS3.SetMemory(Found_function_adress3 + 4, memory);
  667.             PS3.SetMemory(0x10020000, new byte[0x2854]);
  668.             PS3.SetMemory(Found_function_adress3, new byte[] { 0xF8, 0x21, 0xFF, 0x91 });
  669.             PS3.Extension.WriteUInt32(plus_function_address3, branch_bytes_back3);
  670.             PS3.Extension.WriteUInt32(Found_branch_address3, branch_bytes3);
  671. }
  672.  
  673.  
  674. //The Call Event !
  675.  
  676.  
  677.  
  678. public static int Call(uint func_address, params object[] parameters) //original call
  679.         {
  680.             int length = parameters.Length;
  681.             int index = 0;
  682.             uint num3 = 0;
  683.             uint num4 = 0;
  684.             uint num5 = 0;
  685.             uint num6 = 0;
  686.             while (index < length)
  687.             {
  688.                 if (parameters[index] is int)
  689.                 {
  690.                     PS3.Extension.WriteInt32(0x10020000 + (num3 * 4), (int)parameters[index]);
  691.                     num3++;
  692.                 }
  693.                 else if (parameters[index] is uint)
  694.                 {
  695.                     PS3.Extension.WriteUInt32(0x10020000 + (num3 * 4), (uint)parameters[index]);
  696.                     num3++;
  697.                 }
  698.                 else
  699.                 {
  700.                     uint num7;
  701.                     if (parameters[index] is string)
  702.                     {
  703.                         num7 = 0x10022000 + (num4 * 0x400);
  704.                         PS3.Extension.WriteString(num7, Convert.ToString(parameters[index]));
  705.                         PS3.Extension.WriteUInt32(0x10020000 + (num3 * 4), num7);
  706.                         num3++;
  707.                         num4++;
  708.                     }
  709.                     else if (parameters[index] is float)
  710.                     {
  711.                         WriteSingle(0x10020024 + (num5 * 4), (float)parameters[index]);
  712.                         num5++;
  713.                     }
  714.                     else if (parameters[index] is float[])
  715.                     {
  716.                         float[] input = (float[])parameters[index];
  717.                         num7 = 0x10021000 + (num6 * 4);
  718.                         WriteSingle(num7, input);
  719.                         PS3.Extension.WriteUInt32(0x10020000 + (num3 * 4), num7);
  720.                         num3++;
  721.                         num6 += (uint)input.Length;
  722.                     }
  723.                 }
  724.                 index++;
  725.             }
  726.             PS3.Extension.WriteUInt32(0x1002004C, func_address);
  727.             Thread.Sleep(20);
  728.             return PS3.Extension.ReadInt32(0x10020050);
  729.         }
  730.  
  731.  
  732.  
  733.  
  734. //main Events and search functions
  735.  
  736.  
  737. static int NumberOffsets = 0;
  738.         static uint ZeroOffset;
  739.  
  740. private static void WriteSingle(uint address, float input)
  741.         {
  742.             byte[] Bytes = new byte[4];
  743.             BitConverter.GetBytes(input).CopyTo((Array)Bytes, 0);
  744.             Array.Reverse((Array)Bytes, 0, 4);
  745.             PS3.SetMemory(address, Bytes);
  746.         }
  747.  
  748.         private static void WriteSingle(uint address, float[] input)
  749.         {
  750.             int length = input.Length;
  751.             byte[] Bytes = new byte[length * 4];
  752.             for (int index = 0; index < length; ++index)
  753.                 ReverseBytes(BitConverter.GetBytes(input[index])).CopyTo((Array)Bytes, index * 4);
  754.             PS3.SetMemory(address, Bytes);
  755.         }
  756.  
  757.         private static byte[] ReverseBytes(byte[] toReverse)
  758.         {
  759.             Array.Reverse((Array)toReverse);
  760.             return toReverse;
  761.         }
  762.  
  763.         public static byte[] StringToByteArray(string hex)
  764.         {
  765.             if ((hex.Length % 2) != 0)
  766.             {
  767.                 hex = "0" + hex;
  768.             }
  769.             int length = hex.Length;
  770.             byte[] buffer = new byte[((length / 2) - 1) + 1];
  771.             for (int i = 0; i < length; i += 2)
  772.             {
  773.                 buffer[i / 2] = Convert.ToByte(hex.Substring(i, 2), 0x10);
  774.             }
  775.             return buffer;
  776.         }
  777.  
  778. static uint ContainsSequence(byte[] toSearch, byte[] toFind, uint StartOffset, int bytes)
  779.         {
  780.             for (int i = 0; (i + toFind.Length) < toSearch.Length; i += bytes)
  781.             {
  782.                 bool flag = true;
  783.                 for (int j = 0; j < toFind.Length; j++)
  784.                 {
  785.                     if (toSearch[i + j] != toFind[j])
  786.                     {
  787.                         flag = false;
  788.                         break;
  789.                     }
  790.                 }
  791.                 if (flag)
  792.                 {
  793.                     NumberOffsets++;
  794.                     int num3 = ((int)StartOffset) + i;
  795.                     return (uint)num3;
  796.                 }
  797.             }
  798.             return 0;
  799.         }
  800.         static uint Search(byte[] Search, uint Start, int Length, int bytes)
  801.         {
  802.             byte[] ReadBytes = PS3.Extension.ReadBytes(Start, Length);
  803.             uint num = ContainsSequence(ReadBytes, Search, Start, bytes);
  804.             if (num.Equals(ZeroOffset))
  805.             {
  806.                 return 0;
  807.                 //not found
  808.             }
  809.             else
  810.             {
  811.                 int counter = 0;
  812.                 foreach (int value in Search)
  813.                     if (value == 1) ++counter;
  814.                 uint num2 = num + ((uint)counter);
  815.                 return num2;
  816.             }
  817.         }
  818.  
  819.  
  820.  
  821.  
  822.  
  823. -----------------------------------------------------------------------------------------------------------------------
  824. AW
  825.  
  826.         private static UInt32 function_address = 0x5F7B80;
  827.        
  828.         public static int Init()
  829.         {
  830.             if (function_address == 0) return -1;
  831.             Enable_RPC();
  832.             return 0;
  833.         }
  834.  
  835.         public static void Enable_RPC()
  836.         {
  837.             PS3.SetMemory(function_address, new byte[] { 0x4E, 0x80, 0x00, 0x20 });
  838.             System.Threading.Thread.Sleep(20);
  839.             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 };
  840.             PS3.SetMemory(function_address + 0x4, func);
  841.             PS3.SetMemory(0x10050000, new byte[0x2854]);
  842.             PS3.SetMemory(function_address, new byte[] { 0xF8, 0x21, 0xFF, 0x91 });
  843.         }
  844.  
  845.         public static int Call(uint func_address, params object[] parameters)
  846.         {
  847.             int num_params = parameters.Length;
  848.             uint num_floats = 0;
  849.             for (uint i = 0; i < num_params; i++)
  850.             {
  851.                 if (parameters[i] is int)
  852.                 {
  853.                     byte[] val = BitConverter.GetBytes((int)parameters[i]);
  854.                     Array.Reverse(val);
  855.                     PS3.SetMemory(0x10050000 + (i + num_floats) * 4, val);
  856.                 }
  857.                 else if (parameters[i] is uint)
  858.                 {
  859.                     byte[] val = BitConverter.GetBytes((uint)parameters[i]);
  860.                     Array.Reverse(val);
  861.                     PS3.SetMemory(0x10050000 + (i + num_floats) * 4, val);
  862.                 }
  863.                 else if (parameters[i] is string)
  864.                 {
  865.                     byte[] str = Encoding.UTF8.GetBytes(Convert.ToString(parameters[i]) + "\0");
  866.                     PS3.SetMemory(0x10050054 + i * 0x400, str);
  867.                     uint addr = 0x10050054 + i * 0x400;
  868.                     byte[] address = BitConverter.GetBytes(addr);
  869.                     Array.Reverse(address);
  870.                     PS3.SetMemory(0x10050000 + (i + num_floats) * 4, address);
  871.                 }
  872.                 else if (parameters[i] is float)
  873.                 {
  874.                     num_floats++;
  875.                     byte[] val = BitConverter.GetBytes((float)parameters[i]);
  876.                     Array.Reverse(val);
  877.                     PS3.SetMemory(0x10050024 + ((num_floats - 1) * 0x4), val);
  878.                 }
  879.             }
  880.             byte[] fadd = BitConverter.GetBytes(func_address);
  881.             Array.Reverse(fadd);
  882.             PS3.SetMemory(0x1005004C, fadd);
  883.             System.Threading.Thread.Sleep(20);
  884.             byte[] ret = PS3.GetMemory(0x10050050, 4);
  885.             Array.Reverse(ret);
  886.             return BitConverter.ToInt32(ret, 0);
  887.         }
  888. --------------------------------------------------------------------------------------------------------------------------------
  889.  
  890.  
  891.  
  892.  
  893.  
  894.  
  895. private static uint function_address = 0x1B73580;
  896.         private static uint function2_address = 0x1B73680;
  897.         private static uint function3_address = 0x1B73780;
  898.         private static uint function4_address = 0x1B73880;
  899.  
  900.  
  901.         private static uint one_from_address = 0x1b6ac88;
  902.         private static uint one_from_bytes = 0x4a4aff80;
  903.         private static uint one_to_address = 0x1ac3c;
  904.         private static uint one_to_bytes = 0x49b4ffc4;
  905.  
  906.         private static uint two_from_address = 0x1b6ad88;
  907.         private static uint two_from_bytes = 0x4b6aa5f0;
  908.         private static uint two_to_address = 0x1215370;
  909.         private static uint two_to_bytes = 0x48955990;
  910.  
  911.         private static uint three_from_address = 0x1b6ae88;
  912.         private static uint three_from_bytes = 0x4b6aab4c;
  913.         private static uint three_to_address = 0x12159cc;
  914.         private static uint three_to_bytes = 0x48955434;
  915.  
  916.         private static uint four_from_address = 0x1b6af88;
  917.         private static uint four_from_bytes = 0x4b6aab94;
  918.         private static uint four_to_address = 0x1215b14;
  919.         private static uint four_to_bytes = 0x489553ec;
  920.  
  921.  
  922. public static void Enable2()
  923.         {
  924.             byte[] buffer = new byte[] {
  925.                 0x7c, 8, 2, 0xa6, 0xf8, 1, 0, 0x80, 60, 0x60, 0x10, 2, 0x81, 0x83, 0, 0x4c,
  926.                 0x2c, 12, 0, 0, 0x41, 130, 0, 100, 0x80, 0x83, 0, 4, 0x80, 0xa3, 0, 8,
  927.                 0x80, 0xc3, 0, 12, 0x80, 0xe3, 0, 0x10, 0x81, 3, 0, 20, 0x81, 0x23, 0, 0x18,
  928.                 0x81, 0x43, 0, 0x1c, 0x81, 0x63, 0, 0x20, 0xc0, 0x23, 0, 0x24, 0xc0, 0x43, 0, 40,
  929.                 0xc0, 0x63, 0, 0x2c, 0xc0, 0x83, 0, 0x30, 0xc0, 0xa3, 0, 0x34, 0xc0, 0xc3, 0, 0x38,
  930.                 0xc0, 0xe3, 0, 60, 0xc1, 3, 0, 0x40, 0xc1, 0x23, 0, 0x48, 0x80, 0x63, 0, 0,
  931.                 0x7d, 0x89, 3, 0xa6, 0x4e, 0x80, 4, 0x21, 60, 0x80, 0x10, 2, 0x38, 160, 0, 0,
  932.                 0x90, 0xa4, 0, 0x4c, 0x90, 100, 0, 80, 0xe8, 1, 0, 0x80, 0x7c, 8, 3, 0xa6,
  933.                 0x38, 0x21, 0, 0x70
  934.              };
  935.             PS3.SetMemory(function_address, new byte[] { 0x4e, 0x80, 0, 0x20 });
  936.             Thread.Sleep(20);
  937.             PS3.SetMemory(function_address + 4, buffer);
  938.             PS3.SetMemory(0x10020000, new byte[0x2854]);
  939.             PS3.SetMemory(function_address, new byte[] { 0xf8, 0x21, 0xff, 0x91 });
  940.             PS3.Extension.WriteUInt32(one_from_address, one_from_bytes);
  941.             PS3.Extension.WriteUInt32(one_to_address, one_to_bytes);
  942.             PS3.SetMemory(function2_address, new byte[] { 0x4e, 0x80, 0, 0x20 });
  943.             Thread.Sleep(20);
  944.             PS3.SetMemory(function2_address + 4, buffer);
  945.             PS3.SetMemory(function2_address, new byte[] { 0xf8, 0x21, 0xff, 0x91 });
  946.             PS3.Extension.WriteUInt32(two_from_address, two_from_bytes);
  947.             PS3.Extension.WriteUInt32(two_to_address, two_to_bytes);
  948.             PS3.SetMemory(function3_address, new byte[] { 0x4e, 0x80, 0, 0x20 });
  949.             Thread.Sleep(20);
  950.             PS3.SetMemory(function3_address + 4, buffer);
  951.             PS3.SetMemory(function3_address, new byte[] { 0xf8, 0x21, 0xff, 0x91 });
  952.             PS3.Extension.WriteUInt32(three_from_address, three_from_bytes);
  953.             PS3.Extension.WriteUInt32(three_to_address, three_to_bytes);
  954.             PS3.SetMemory(function4_address, new byte[] { 0x4e, 0x80, 0, 0x20 });
  955.             Thread.Sleep(20);
  956.             PS3.SetMemory(function4_address + 4, buffer);
  957.             PS3.SetMemory(function4_address, new byte[] { 0xf8, 0x21, 0xff, 0x91 });
  958.             PS3.Extension.WriteUInt32(four_from_address, four_from_bytes);
  959.             PS3.Extension.WriteUInt32(four_to_address, four_to_bytes);
  960.             Thread.Sleep(20);
  961.         }
  962.  
  963.  
  964.  
  965.  
  966.  
  967. using System;
  968. using System.Collections.Generic;
  969. using System.Linq;
  970. using System.Text;
  971. using System.Threading;
  972. using PS3Lib;
  973.  
  974.  
  975. public static class RPC
  976. {
  977.  
  978.  
  979. private static PS3API PS3 = new PS3API(SelectAPI.TargetManager);
  980.  
  981.  
  982. private static uint one_to_address = 0x185B4;
  983. private static uint two_to_address = 0x1AC3C;
  984. private static uint three_to_address = 0xB490C;
  985. private static uint function_address = 0x1B73580;
  986. private static uint function2_address = function_address + 0x100;
  987. private static uint function3_address = function_address + 0x200;
  988.  
  989.  
  990.  
  991. private static uint one_to_bytes = function_address - one_to_address + 0x48000000;
  992. private static uint two_to_bytes = function2_address - two_to_address + 0x48000000;
  993. private static uint three_to_bytes = function3_address - three_to_address + 0x48000000;
  994.  
  995.  
  996. private static uint one_from_address = function_address + 0x88;
  997. private static uint one_from_bytes = 0x4A4A4FB8;
  998.  
  999.  
  1000. private static uint two_from_address = function2_address + 0x88;
  1001. private static uint two_from_bytes = 0x4A4A7500;
  1002.  
  1003.  
  1004. private static uint three_from_address = function3_address + 0x88;
  1005. private static uint three_from_bytes = 0x4A54105C;
  1006.  
  1007.  
  1008. public static void Enable()
  1009. {
  1010. 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 };
  1011. PS3.SetMemory(function_address, new byte[] { 0x4E, 0x80, 0x00, 0x20 });
  1012. Thread.Sleep(20);
  1013. PS3.SetMemory(function_address + 4, memory);
  1014. PS3.SetMemory(0x10020000, new byte[0x2854]);
  1015. PS3.SetMemory(function_address, new byte[] { 0xF8, 0x21, 0xFF, 0x91 });
  1016. PS3.Extension.WriteUInt32(one_from_address, one_from_bytes);
  1017. PS3.Extension.WriteUInt32(one_to_address, one_to_bytes);
  1018.  
  1019.  
  1020. PS3.SetMemory(function2_address, new byte[] { 0x4E, 0x80, 0x00, 0x20 });
  1021. Thread.Sleep(20);
  1022. PS3.SetMemory(function2_address + 4, memory);
  1023. PS3.SetMemory(function2_address, new byte[] { 0xF8, 0x21, 0xFF, 0x91 });
  1024. PS3.Extension.WriteUInt32(two_from_address, two_from_bytes);
  1025. PS3.Extension.WriteUInt32(two_to_address, two_to_bytes);
  1026.  
  1027.  
  1028. PS3.SetMemory(function3_address, new byte[] { 0x4E, 0x80, 0x00, 0x20 });
  1029. Thread.Sleep(20);
  1030. PS3.SetMemory(function3_address + 4, memory);
  1031. PS3.SetMemory(function3_address, new byte[] { 0xF8, 0x21, 0xFF, 0x91 });
  1032. PS3.Extension.WriteUInt32(three_from_address, three_from_bytes);
  1033. PS3.Extension.WriteUInt32(three_to_address, three_to_bytes);
  1034. }
  1035.  
  1036.  
  1037. public static int Call(uint func_address, params object[] parameters)
  1038. {
  1039. int length = parameters.Length;
  1040. int index = 0;
  1041. uint num3 = 0;
  1042. uint num4 = 0;
  1043. uint num5 = 0;
  1044. uint num6 = 0;
  1045. while (index < length)
  1046. {
  1047. if (parameters[index] is int)
  1048. {
  1049. PS3.Extension.WriteInt32(0x10020000 + (num3 * 4), (int)parameters[index]);
  1050. num3++;
  1051. }
  1052. else if (parameters[index] is uint)
  1053. {
  1054. PS3.Extension.WriteUInt32(0x10020000 + (num3 * 4), (uint)parameters[index]);
  1055. num3++;
  1056. }
  1057. else
  1058. {
  1059. uint num7;
  1060. if (parameters[index] is string)
  1061. {
  1062. num7 = 0x10022000 + (num4 * 0x400);
  1063. PS3.Extension.WriteString(num7, Convert.ToString(parameters[index]));
  1064. PS3.Extension.WriteUInt32(0x10020000 + (num3 * 4), num7);
  1065. num3++;
  1066. num4++;
  1067. }
  1068. else if (parameters[index] is float)
  1069. {
  1070. WriteSingle(0x10020024 + (num5 * 4), (float)parameters[index]);
  1071. num5++;
  1072. }
  1073. else if (parameters[index] is float[])
  1074. {
  1075. float[] input = (float[])parameters[index];
  1076. num7 = 0x10021000 + (num6 * 4);
  1077. WriteSingle(num7, input);
  1078. PS3.Extension.WriteUInt32(0x10020000 + (num3 * 4), num7);
  1079. num3++;
  1080. num6 += (uint)input.Length;
  1081. }
  1082. }
  1083. index++;
  1084. }
  1085. PS3.Extension.WriteUInt32(0x1002004C, func_address);
  1086. Thread.Sleep(20);
  1087. return PS3.Extension.ReadInt32(0x10020050);
  1088. }
  1089.  
  1090.  
  1091. private static void WriteSingle(uint address, float input)
  1092. {
  1093. byte[] Bytes = new byte[4];
  1094. BitConverter.GetBytes(input).CopyTo((Array)Bytes, 0);
  1095. Array.Reverse((Array)Bytes, 0, 4);
  1096. PS3.SetMemory(address, Bytes);
  1097. }
  1098.  
  1099.  
  1100. private static void WriteSingle(uint address, float[] input)
  1101. {
  1102. int length = input.Length;
  1103. byte[] Bytes = new byte[length * 4];
  1104. for (int index = 0; index < length; ++index)
  1105. ReverseBytes(BitConverter.GetBytes(input[index])).CopyTo((Array)Bytes, index * 4);
  1106. PS3.SetMemory(address, Bytes);
  1107. }
  1108.  
  1109.  
  1110. private static byte[] ReverseBytes(byte[] toReverse)
  1111. {
  1112. Array.Reverse((Array)toReverse);
  1113. return toReverse;
  1114. }
  1115. }
  1116. }
  1117.  
  1118.  
  1119.  
  1120.  
  1121. using System;
  1122. using System.Threading;
  1123.  
  1124. public static class RPC
  1125. {
  1126.  
  1127. private static uint SFA1 = 0x01B73580;
  1128. private static uint EFA1 = 0x01B73608;
  1129. private static uint SFA2 = 0x01B73680;
  1130. private static uint EFA2 = 0x01B73708;
  1131. private static uint SFA3 = 0x01B73780;
  1132. private static uint EFA3 = 0x01B73808;
  1133. private static uint BFA1 = 0x185B4;
  1134. private static uint BAB1 = 0x185C0;
  1135. private static uint BFA2 = 0x1AC3C;
  1136. private static uint BAB2 = 0x1AC08;
  1137. private static uint BFA3 = 0xB490C;
  1138. private static uint BAB3 = 0xB4864;
  1139.  
  1140. public static uint CBAB(uint F, uint T)
  1141. {
  1142. if (F > T)
  1143. return 0x4C000000 - (F - T);
  1144. else if (F < T)
  1145. return T - F + 0x48000000;
  1146. else
  1147. return 0x48000000;
  1148. }
  1149.  
  1150. public static void Enable()
  1151. {
  1152. 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 };
  1153. PS3.SetMemory(SFA1, mem);
  1154. PS3.SetMemory(SFA2, mem);
  1155. PS3.SetMemory(SFA3, mem);
  1156. PS3.Extension.WriteUInt32(EFA1, CBAB(EFA1, BAB1));
  1157. PS3.Extension.WriteUInt32(BFA1, CBAB(BFA1, SFA1));
  1158. PS3.Extension.WriteUInt32(EFA2, CBAB(EFA2, BAB2));
  1159. PS3.Extension.WriteUInt32(BFA2, CBAB(BFA2, SFA2));
  1160. PS3.Extension.WriteUInt32(EFA3, CBAB(EFA3, BAB3));
  1161. PS3.Extension.WriteUInt32(BFA3, CBAB(BFA3, SFA3));
  1162. }
  1163.  
  1164. public static int Call(uint func_address, params object[] parameters)
  1165. {
  1166. int length = parameters.Length;
  1167. int index = 0;
  1168. uint num3 = 0;
  1169. uint num4 = 0;
  1170. uint num5 = 0;
  1171. uint num6 = 0;
  1172. while (index < length)
  1173. {
  1174. if (parameters[index] is int)
  1175. {
  1176. PS3.Extension.WriteInt32(0x10020000 + (num3 * 4), (int)parameters[index]);
  1177. num3++;
  1178. }
  1179. else if (parameters[index] is uint)
  1180. {
  1181. PS3.Extension.WriteUInt32(0x10020000 + (num3 * 4), (uint)parameters[index]);
  1182. num3++;
  1183. }
  1184. else
  1185. {
  1186. uint num7;
  1187. if (parameters[index] is string)
  1188. {
  1189. num7 = 0x10022000 + (num4 * 0x400);
  1190. PS3.Extension.WriteString(num7, Convert.ToString(parameters[index]));
  1191. PS3.Extension.WriteUInt32(0x10020000 + (num3 * 4), num7);
  1192. num3++;
  1193. num4++;
  1194. }
  1195. else if (parameters[index] is float)
  1196. {
  1197. WriteSingle(0x10020024 + (num5 * 4), (float)parameters[index]);
  1198. num5++;
  1199. }
  1200. else if (parameters[index] is float[])
  1201. {
  1202. float[] input = (float[])parameters[index];
  1203. num7 = 0x10021000 + (num6 * 4);
  1204. WriteSingle(num7, input);
  1205. PS3.Extension.WriteUInt32(0x10020000 + (num3 * 4), num7);
  1206. num3++;
  1207. num6 += (uint)input.Length;
  1208. }
  1209. }
  1210. index++;
  1211. }
  1212. PS3.Extension.WriteUInt32(0x1002004C, func_address);
  1213. Thread.Sleep(20);
  1214. return PS3.Extension.ReadInt32(0x10020050);
  1215. }
  1216.  
  1217. private static void WriteSingle(uint address, float input)
  1218. {
  1219. byte[] Bytes = new byte[4];
  1220. BitConverter.GetBytes(input).CopyTo((Array)Bytes, 0);
  1221. Array.Reverse((Array)Bytes, 0, 4);
  1222. PS3.SetMemory(address, Bytes);
  1223. }
  1224.  
  1225. private static void WriteSingle(uint address, float[] input)
  1226. {
  1227. int length = input.Length;
  1228. byte[] Bytes = new byte[length * 4];
  1229. for (int index = 0; index < length; ++index)
  1230. ReverseBytes(BitConverter.GetBytes(input[index])).CopyTo((Array)Bytes, index * 4);
  1231. PS3.SetMemory(address, Bytes);
  1232. }
  1233.  
  1234. private static byte[] ReverseBytes(byte[] toReverse)
  1235. {
  1236. Array.Reverse((Array)toReverse);
  1237. return toReverse;
  1238. }
  1239. }
  1240.  
  1241.  
  1242.  
  1243.  
  1244.  
  1245.         private static uint SFA1 = 0x1B73580;
  1246.         private static uint SFA2 = 0x1B73680;
  1247.         private static uint SFA3 = 0x1B73780;
  1248.         private static uint SFA4 = 0x1B73880;
  1249.  
  1250.     private static uint BAB1 = 0x1AC08;
  1251.         private static uint BAB2 = 0x12194D8;
  1252.         private static uint BAB3 = 0x1219B34;
  1253.         private static uint BAB4 = 0x1219C7C;
  1254.  
  1255.     private static uint BFA1 = 0x1AC3C;
  1256.         private static uint BFA2 = 0x12194D0;
  1257.         private static uint BFA3 = 0x1219B2C;
  1258.         private static uint BFA4 = 0x1219C74;
  1259.  
  1260.     private static uint EFA1 = 0x1B73608;
  1261.         private static uint EFA2 = 0x1B73708;
  1262.         private static uint EFA3 = 0x1B73808;
  1263.         private static uint EFA4 = 0x1B73908;
  1264.  
  1265. public static void Enable()
  1266.         {
  1267.             byte[] buffer = new byte[] {
  1268.                 0xf8, 0x21, 0xff, 0x91, 0x7c, 8, 2, 0xa6, 0xf8, 1, 0, 0x80, 60, 0x60, 0x10, 2,
  1269.                 0x81, 0x83, 0, 0x4c, 0x2c, 12, 0, 0, 0x41, 130, 0, 100, 0x80, 0x83, 0, 4,
  1270.                 0x80, 0xa3, 0, 8, 0x80, 0xc3, 0, 12, 0x80, 0xe3, 0, 0x10, 0x81, 3, 0, 20,
  1271.                 0x81, 0x23, 0, 0x18, 0x81, 0x43, 0, 0x1c, 0x81, 0x63, 0, 0x20, 0xc0, 0x23, 0, 0x24,
  1272.                 0xc0, 0x43, 0, 40, 0xc0, 0x63, 0, 0x2c, 0xc0, 0x83, 0, 0x30, 0xc0, 0xa3, 0, 0x34,
  1273.                 0xc0, 0xc3, 0, 0x38, 0xc0, 0xe3, 0, 60, 0xc1, 3, 0, 0x40, 0xc1, 0x23, 0, 0x48,
  1274.                 0x80, 0x63, 0, 0, 0x7d, 0x89, 3, 0xa6, 0x4e, 0x80, 4, 0x21, 60, 0x80, 0x10, 2,
  1275.                 0x38, 160, 0, 0, 0x90, 0xa4, 0, 0x4c, 0x90, 100, 0, 80, 0xe8, 1, 0, 0x80,
  1276.                 0x7c, 8, 3, 0xa6, 0x38, 0x21, 0, 0x70
  1277.              };
  1278.             PS3.SetMemory(SFA1, buffer);
  1279.             PS3.SetMemory(SFA2, buffer);
  1280.             PS3.SetMemory(SFA3, buffer);
  1281.             PS3.SetMemory(SFA4, buffer);
  1282.             PS3.Extension.WriteUInt32(EFA1, CBAB(EFA1, BAB1));
  1283.             PS3.Extension.WriteUInt32(BFA1, CBAB(BFA1, SFA1));
  1284.             PS3.Extension.WriteUInt32(EFA2, CBAB(EFA2, BAB2));
  1285.             PS3.Extension.WriteUInt32(BFA2, CBAB(BFA2, SFA2));
  1286.             PS3.Extension.WriteUInt32(EFA3, CBAB(EFA3, BAB3));
  1287.             PS3.Extension.WriteUInt32(BFA3, CBAB(BFA3, SFA3));
  1288.             PS3.Extension.WriteUInt32(EFA4, CBAB(EFA4, BAB4));
  1289.             PS3.Extension.WriteUInt32(BFA4, CBAB(BFA4, SFA4));
  1290.         }
  1291.  
  1292.  
  1293. gtav 1.20
  1294. -----------------
  1295.  
  1296.     private static uint SFA1 = 0x01B73580;
  1297.         private static uint EFA1 = 0x01B73608;
  1298.         private static uint SFA2 = 0x01B73680;
  1299.         private static uint EFA2 = 0x01B73708;
  1300.         private static uint SFA3 = 0x01B73780;
  1301.         private static uint EFA3 = 0x01B73808;
  1302.         private static uint BFA1 = 0x185B4;
  1303.         private static uint BAB1 = 0x185C0;
  1304.         private static uint BFA2 = 0x1AC3C;
  1305.         private static uint BAB2 = 0x1AC08;
  1306.         private static uint BFA3 = 0xB490C;
  1307.         private static uint BAB3 = 0xB4864;
  1308.  
  1309.         public static uint CBAB(uint F, uint T)
  1310.         {
  1311.             if (F > T)
  1312.                 return 0x4C000000 - (F - T);
  1313.             else if (F < T)
  1314.                 return T - F + 0x48000000;
  1315.             else
  1316.                 return 0x48000000;
  1317.         }
  1318.  
  1319.         public static void Enable()
  1320.         {
  1321.             byte[] buffer = new byte[] {
  1322.                 0xf8, 0x21, 0xff, 0x91, 0x7c, 8, 2, 0xa6, 0xf8, 1, 0, 0x80, 60, 0x60, 0x10, 2,
  1323.                 0x81, 0x83, 0, 0x4c, 0x2c, 12, 0, 0, 0x41, 130, 0, 100, 0x80, 0x83, 0, 4,
  1324.                 0x80, 0xa3, 0, 8, 0x80, 0xc3, 0, 12, 0x80, 0xe3, 0, 0x10, 0x81, 3, 0, 20,
  1325.                 0x81, 0x23, 0, 0x18, 0x81, 0x43, 0, 0x1c, 0x81, 0x63, 0, 0x20, 0xc0, 0x23, 0, 0x24,
  1326.                 0xc0, 0x43, 0, 40, 0xc0, 0x63, 0, 0x2c, 0xc0, 0x83, 0, 0x30, 0xc0, 0xa3, 0, 0x34,
  1327.                 0xc0, 0xc3, 0, 0x38, 0xc0, 0xe3, 0, 60, 0xc1, 3, 0, 0x40, 0xc1, 0x23, 0, 0x48,
  1328.                 0x80, 0x63, 0, 0, 0x7d, 0x89, 3, 0xa6, 0x4e, 0x80, 4, 0x21, 60, 0x80, 0x10, 2,
  1329.                 0x38, 160, 0, 0, 0x90, 0xa4, 0, 0x4c, 0x90, 100, 0, 80, 0xe8, 1, 0, 0x80,
  1330.                 0x7c, 8, 3, 0xa6, 0x38, 0x21, 0, 0x70
  1331.              };
  1332.             PS3.SetMemory(SFA11, buffer);
  1333.             PS3.SetMemory(SFA22, buffer);
  1334.             PS3.SetMemory(SFA33, buffer);
  1335.             PS3.SetMemory(SFA44, buffer);
  1336.             PS3.Extension.WriteUInt32(EFA11, CBAB(EFA11, BAB11));
  1337.             PS3.Extension.WriteUInt32(BFA11, CBAB(BFA11, SFA11));
  1338.             PS3.Extension.WriteUInt32(EFA22, CBAB(EFA22, BAB22));
  1339.             PS3.Extension.WriteUInt32(BFA22, CBAB(BFA22, SFA22));
  1340.             PS3.Extension.WriteUInt32(EFA33, CBAB(EFA33, BAB33));
  1341.             PS3.Extension.WriteUInt32(BFA33, CBAB(BFA33, SFA33));
  1342.             PS3.Extension.WriteUInt32(EFA44, CBAB(EFA44, BAB44));
  1343.             PS3.Extension.WriteUInt32(BFA44, CBAB(BFA44, SFA44));
  1344. }
  1345.  
  1346. public static byte[] ReverseBytes(byte[] toReverse)
  1347.         {
  1348.             Array.Reverse(toReverse);
  1349.             return toReverse;
  1350.         }
  1351.  
  1352.         public static void WriteSingle(uint address, float input)
  1353.         {
  1354.             byte[] array = new byte[4];
  1355.             BitConverter.GetBytes(input).CopyTo(array, 0);
  1356.             Array.Reverse(array, 0, 4);
  1357.             PS3.SetMemory(address, array);
  1358.         }
  1359.  
  1360.         public static void WriteSingle(uint address, float[] input)
  1361.         {
  1362.             int length = input.Length;
  1363.             byte[] array = new byte[length * 4];
  1364.             for (int i = 0; i < length; i++)
  1365.             {
  1366.                 ReverseBytes(BitConverter.GetBytes(input[i])).CopyTo(array, (int)(i * 4));
  1367.             }
  1368.             PS3.SetMemory(address, array);
  1369.         }
  1370.  
  1371.         public static int Call(uint func_address, params object[] parameters)
  1372.         {
  1373.             int length = parameters.Length;
  1374.             int index = 0;
  1375.             uint num3 = 0;
  1376.             uint num4 = 0;
  1377.             uint num5 = 0;
  1378.             uint num6 = 0;
  1379.             while (index < length) // CLL 0xfa638911
  1380.             {
  1381.                 if (parameters[index] is int)
  1382.                 {
  1383.                     PS3.Extension.WriteInt32(0x10020000 + (num3 * 4), (int)parameters[index]);
  1384.                     num3++;
  1385.                 }
  1386.                 else if (parameters[index] is uint)
  1387.                 {
  1388.                     PS3.Extension.WriteUInt32(0x10020000 + (num3 * 4), (uint)parameters[index]);
  1389.                     num3++;
  1390.                 }
  1391.                 else
  1392.                 {
  1393.                     uint num7;
  1394.                     if (parameters[index] is string)
  1395.                     {
  1396.                         num7 = 0x10022000 + (num4 * 0x400);
  1397.                         PS3.Extension.WriteString(num7, Convert.ToString(parameters[index]));
  1398.                         PS3.Extension.WriteUInt32(0x10020000 + (num3 * 4), num7);
  1399.                         num3++;
  1400.                         num4++;
  1401.                     }
  1402.                     else if (parameters[index] is float)
  1403.                     {
  1404.                         WriteSingle(0x10020024 + (num5 * 4), (float)parameters[index]);
  1405.                         num5++;
  1406.                     }
  1407.                     else if (parameters[index] is float[])
  1408.                     {
  1409.                         float[] input = (float[])parameters[index];
  1410.                         num7 = 0x10021000 + (num6 * 4);
  1411.                         WriteSingle(num7, input);
  1412.                         PS3.Extension.WriteUInt32(0x10020000 + (num3 * 4), num7);
  1413.                         num3++;
  1414.                         num6 += (uint)input.Length;
  1415.                     }
  1416.                 }
  1417.                 index++;
  1418.             }
  1419.             PS3.Extension.WriteUInt32(0x1002004C, func_address);
  1420.             Thread.Sleep(30);
  1421.             int num8 = PS3.Extension.ReadInt32(0x10020050);
  1422.             PS3.SetMemory(0x10020000, new byte[0x200]); //0xC0
  1423.             return num8;
  1424.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement