Post: Remote Procedure Calls | The Last of us
07-10-2014, 05:15 PM #1
Notorious
Caprisuns Is Back
(adsbygoogle = window.adsbygoogle || []).push({}); Hello here is RPC, idk what to use it for but here do something with it Winky Winky

TOC Address [0x1338610]

0x00436274 <-- function unimportant (even call a break point on it)

C# Function
    
private static uint sweg;
public static int Init()
{
sweg = 0x436274;
Enable();
return 0;
}
public static void Enable()
{
PS3.SetMemory(sweg, new byte[] { 0x4E, 0x80, 0x00, 0x20 });
Thread.Sleep(20);
byte[] memory = new byte[]
{ 0x7C, 0x08, 0x02, 0xA6,
0xF8, 0x01, 0x00, 0x80,
0x3D, 0x60, 0x02, 0x10,
0x80, 0x6B, 0x00, 0x04,
0x80, 0x8B, 0x00, 0x08,
0x80, 0xAB, 0x00, 0x0C,
0x80, 0xCB, 0x00, 0x10,
0x80, 0xEB, 0x00, 0x14,
0x81, 0x0B, 0x00, 0x18,
0x81, 0x2B, 0x00, 0x1C,
0x81, 0x6B, 0x00, 0x00,
0x7D, 0x69, 0x03, 0xA6,
0x39, 0x60, 0x00, 0x00,
0x4E, 0x80, 0x04, 0x21,
0x3D, 0x60, 0x02, 0x10,
0x90, 0x6B, 0x00, 0x20,
0x38, 0x60, 0x00, 0x00,
0x90, 0x6B, 0x00, 0x00,
0xE8, 0x01, 0x00, 0x80,
0x7C, 0x08, 0x03, 0xA6,
0x38, 0x21, 0x00, 0x70,
0x4E, 0x80, 0x00, 0x20 };
PS3.SetMemory(sweg + 4, memory);
PS3.SetMemory(0x10020000, new byte[0x2854]);
PS3.SetMemory(sweg, new byte[] { 0xF8, 0x21, 0xFF, 0x91 });
}

public static int CallFunc(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)
{
PS3.Extension.WriteFloat(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);
}



PowerPC Function:
    
stdu r1, r1, -0x70 #Make room in the stack
mfspr r0, LR #r0 = Link Register
std r0, 0x80(r1) #Store the link register in the stack
lis r11, 0x210 #Our memory spot
lwz r3, 0x04(r11) #Read first argument
lwz r4, 0x08(r11) #Read second argument
lwz r5, 0x0C(r11) #Read third argument
lwz r6, 0x10(r11) #Read fourth argument
lwz r7, 0x14(r11) #Read fifth argument
lwz r8, 0x18(r11) #Read sixth argument
lwz r9, 0x1C(r11) #Read seventh argument
lwz r11, r11 #Read function address
mtctr r11 #Stor function address in count register
li r11, 0 #Reset r11
bctrl #Call count register
lis r11, 0x210 #Function address
stw r3, 0x20(r11) #Store returned value
li r3, 0 #r3 = 0
stw r3, r11 #Remove
ld r0, 0x80(r1) #Retrieve the link register
mtspr LR, r0 #Set LR to the original link register
addi r1, 0x70(r1) #Unallocate the stack
blr #Branch link register


#SWAG #MODS #YOLO

Credits:
Me - Releasing this!
Shark - fixed c# Function
BadLuckBrian - PowerPC Tutorials (Big props to him for actually sharing his ppc knowledge and actually helping the community unlike a lot of people)
(adsbygoogle = window.adsbygoogle || []).push({});

The following 4 users say thank you to Notorious for this useful post:

MegaMister, milky4444, SnaY, Laser
07-10-2014, 05:22 PM #2
MegaMister
Former Mega Staff
Originally posted by Prime
Hello here is RPC, idk what to use it for but here do something with it Winky Winky

TOC Address [0x1338610]

0x00436274 <-- function unimportant (even call a break point on it)

C# Function
    
private static uint sweg;
public static int Init()
{
sweg = 0x436274;
Enable();
return 0;
}
public static void Enable()
{
PS3.SetMemory(sweg, new byte[] { 0x4E, 0x80, 0x00, 0x20 });
Thread.Sleep(20);
byte[] memory = new byte[]
{ 0x7C, 0x08, 0x02, 0xA6,
0xF8, 0x01, 0x00, 0x80,
0x3D, 0x60, 0x02, 0x10,
0x80, 0x6B, 0x00, 0x04,
0x80, 0x8B, 0x00, 0x08,
0x80, 0xAB, 0x00, 0x0C,
0x80, 0xCB, 0x00, 0x10,
0x80, 0xEB, 0x00, 0x14,
0x81, 0x0B, 0x00, 0x18,
0x81, 0x2B, 0x00, 0x1C,
0x81, 0x6B, 0x00, 0x00,
0x7D, 0x69, 0x03, 0xA6,
0x39, 0x60, 0x00, 0x00,
0x4E, 0x80, 0x04, 0x21,
0x3D, 0x60, 0x02, 0x10,
0x90, 0x6B, 0x00, 0x20,
0x38, 0x60, 0x00, 0x00,
0x90, 0x6B, 0x00, 0x00,
0xE8, 0x01, 0x00, 0x80,
0x7C, 0x08, 0x03, 0xA6,
0x38, 0x21, 0x00, 0x70,
0x4E, 0x80, 0x00, 0x20 };
PS3.SetMemory(sweg + 4, memory);
PS3.SetMemory(0x10020000, new byte[0x2854]);
PS3.SetMemory(sweg, new byte[] { 0xF8, 0x21, 0xFF, 0x91 });
}

public static int CallFunc(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)
{
PS3.Extension.WriteFloat(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);
}



PowerPC Function:
    
stdu r1, r1, -0x70 #Make room in the stack
mfspr r0, LR #r0 = Link Register
std r0, 0x80(r1) #Store the link register in the stack
lis r11, 0x210 #Our memory spot
lwz r3, 0x04(r11) #Read first argument
lwz r4, 0x08(r11) #Read second argument
lwz r5, 0x0C(r11) #Read third argument
lwz r6, 0x10(r11) #Read fourth argument
lwz r7, 0x14(r11) #Read fifth argument
lwz r8, 0x18(r11) #Read sixth argument
lwz r9, 0x1C(r11) #Read seventh argument
lwz r11, r11 #Read function address
mtctr r11 #Stor function address in count register
li r11, 0 #Reset r11
bctrl #Call count register
lis r11, 0x210 #Function address
stw r3, 0x20(r11) #Store returned value
li r3, 0 #r3 = 0
stw r3, r11 #Remove
ld r0, 0x80(r1) #Retrieve the link register
mtspr LR, r0 #Set LR to the original link register
addi r1, 0x70(r1) #Unallocate the stack
blr #Branch link register


#SWAG #MODS #YOLO

Credits:
Me - Releasing this!
Shark - fixed c# Function
BadLuckBrian - PowerPC Tutorials (Big props to him for actually sharing his ppc knowledge and actually helping the community unlike a lot of people)


Good job brotha! Enzo

The following user thanked MegaMister for this useful post:

Notorious
07-10-2014, 08:44 PM #3
uncharted lover
Do a barrel roll!
thaaaanks Good job bro ,

please i think you can relaese loadout offset ?
07-10-2014, 09:05 PM #4
Notorious
Caprisuns Is Back
Originally posted by uncharted
thaaaanks Good job bro ,

please i think you can relaese loadout offset ?


I will try to do a lot for this game, but as of right now this is my last post for a while so yeah.
07-10-2014, 10:18 PM #5
Originally posted by Prime
Hello here is RPC, idk what to use it for but here do something with it Winky Winky

TOC Address [0x1338610]

0x00436274 <-- function unimportant (even call a break point on it)

C# Function
    
private static uint sweg;
public static int Init()
{
sweg = 0x436274;
Enable();
return 0;
}
public static void Enable()
{
PS3.SetMemory(sweg, new byte[] { 0x4E, 0x80, 0x00, 0x20 });
Thread.Sleep(20);
byte[] memory = new byte[]
{ 0x7C, 0x08, 0x02, 0xA6,
0xF8, 0x01, 0x00, 0x80,
0x3D, 0x60, 0x02, 0x10,
0x80, 0x6B, 0x00, 0x04,
0x80, 0x8B, 0x00, 0x08,
0x80, 0xAB, 0x00, 0x0C,
0x80, 0xCB, 0x00, 0x10,
0x80, 0xEB, 0x00, 0x14,
0x81, 0x0B, 0x00, 0x18,
0x81, 0x2B, 0x00, 0x1C,
0x81, 0x6B, 0x00, 0x00,
0x7D, 0x69, 0x03, 0xA6,
0x39, 0x60, 0x00, 0x00,
0x4E, 0x80, 0x04, 0x21,
0x3D, 0x60, 0x02, 0x10,
0x90, 0x6B, 0x00, 0x20,
0x38, 0x60, 0x00, 0x00,
0x90, 0x6B, 0x00, 0x00,
0xE8, 0x01, 0x00, 0x80,
0x7C, 0x08, 0x03, 0xA6,
0x38, 0x21, 0x00, 0x70,
0x4E, 0x80, 0x00, 0x20 };
PS3.SetMemory(sweg + 4, memory);
PS3.SetMemory(0x10020000, new byte[0x2854]);
PS3.SetMemory(sweg, new byte[] { 0xF8, 0x21, 0xFF, 0x91 });
}

public static int CallFunc(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)
{
PS3.Extension.WriteFloat(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);
}



PowerPC Function:
    
stdu r1, r1, -0x70 #Make room in the stack
mfspr r0, LR #r0 = Link Register
std r0, 0x80(r1) #Store the link register in the stack
lis r11, 0x210 #Our memory spot
lwz r3, 0x04(r11) #Read first argument
lwz r4, 0x08(r11) #Read second argument
lwz r5, 0x0C(r11) #Read third argument
lwz r6, 0x10(r11) #Read fourth argument
lwz r7, 0x14(r11) #Read fifth argument
lwz r8, 0x18(r11) #Read sixth argument
lwz r9, 0x1C(r11) #Read seventh argument
lwz r11, r11 #Read function address
mtctr r11 #Stor function address in count register
li r11, 0 #Reset r11
bctrl #Call count register
lis r11, 0x210 #Function address
stw r3, 0x20(r11) #Store returned value
li r3, 0 #r3 = 0
stw r3, r11 #Remove
ld r0, 0x80(r1) #Retrieve the link register
mtspr LR, r0 #Set LR to the original link register
addi r1, 0x70(r1) #Unallocate the stack
blr #Branch link register


#SWAG #MODS #YOLO

Credits:
Me - Releasing this!
Shark - fixed c# Function
BadLuckBrian - PowerPC Tutorials (Big props to him for actually sharing his ppc knowledge and actually helping the community unlike a lot of people)

gud release Tustin only if my dex usb worked :/
07-10-2014, 11:08 PM #6
Notorious
Caprisuns Is Back
Originally posted by milky4444 View Post
gud release Tustin only if my dex usb worked :/


try insert it right usb slot sweg

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo