[Tutorial] How To F...
 
Notifications
Clear all

[Tutorial] How To Find/Locate Dynamic Offsets For/With RTM Tools (C# Code) "Method 2"

Page 1 / 4

KranK
Posts: 336
Topic starter
(@KranK)
Reputable Member
Joined: 9 years ago

This is a second part of finder function , and it used by its own meaning or method1 or method 2

Whats the diffrence between them ? the diffrence is that method 2 returns multiple adresses as found

so lets get started

[HIDE]Before everything lets drop 3 tools to the form
1.Button "name it FindBT"
2.Label "name it ResultLab"
3.NumericUpDown " name it InputNum "

you dont have to name them like this , otherwise you have to edit tool names on the code!

1.past this into your main event public partial class of your tool

	public uint[] OffsetsUint = new uint[1000000];
	public int OffsetsNum = 0;
	public uint ZeroOffset;
	

2.past this code some where in your tool before the button you going to use to find offset ! // this is the whole search event that will handle your search

	public void FindOffsets(byte[] toSearch, byte[] toFind, uint StartOffset)
	        {
	            for (var i = 0; i + toFind.Length < toSearch.Length; i += 4)
	            {
	                var allSame = true;
	                for (var j = 0; j < toFind.Length; j++)
	                {
	                    if (toSearch != toFind[j])
	                    {
	                        allSame = false;
	                        break;
	                    }
	                }
	
	                if (allSame)
	                {
	                    int Plus = (int)StartOffset + i;
	                    uint OffsetPlace = (uint)Plus;
	                    OffsetsUint[OffsetsNum] = OffsetPlace;
	                    OffsetsNum++;
	                }
	            }
	        }
	

3.Past this code inside it your Button

	for (int i = 0; i < 1000000; i++) // our result array ,
	            {
	                OffsetsUint = 0x0;
	            }
	
	            OffsetsNum = 0;
	            ResultLab.Text = "...";
	
	            byte[] MainByteArray = new byte[33554432]; // creates temp byte array length
	            PS3.GetMemory(0x32000000, MainByteArray); // PS3.GetMemory(Start adress like 0x????????, MainByteArray);
	
	            byte[] MainByte = BitConverter.GetBytes(Convert.ToInt32(InputNum.Value));  // here we convert input num to bytes , our numeric updown // what we search for , you can use normal byte array with out any num
	            Array.Reverse(MainByte); // and reverse array
	
	            FindOffsets(MainByteArray, MainByte, 0x32000000); //FindOffsets(MainByteArray, MainByte, Start adress like 0x????????);
	
	            if (OffsetsNum == ZeroOffset)// if equals 0
	            {
	                this.ResultLab.Text = "NOT FOUND";
	            }
	            else
	            {
	
	                this.ResultLab.Text = "Address: " + OffsetsUint[0].ToString("X"); //return result as string using defined OffsetsUint[?] , OffsetsUint[0] = 1st result , OffsetsUint[1] = 2nd result. etc
	
	            }
	

[/HIDE]

Go to "Method 1"

I hope It helped you guys and have happy codding

Reply
Name of the Video Game, and any other Tags
17 Replies
Posts: 0
(@DXcool223)
New Member
Joined: 9 years ago

gonna check this out thanks

Reply
WowYouPanCake
Posts: 13
(@WowYouPanCake)
Active Member
Joined: 9 years ago

Feel like learning something useful lol

Reply
WowYouPanCake
Posts: 13
(@WowYouPanCake)
Active Member
Joined: 9 years ago

KranK Hey buddy! For this, we need to choose the game right? And also add in the connect and attach stuff. Unless i'm completely miss interpreting the purpose of this method.

Reply
KranK
Posts: 336
Topic starter
(@KranK)
Reputable Member
Joined: 9 years ago

KranK Hey buddy! For this, we need to choose the game right? And also add in the connect and attach stuff. Unless i'm completely miss interpreting the purpose of this method.

Yes you need use it in a tool

Reply
Page 1 / 4