[PPC] How to revers...
 
Notifications
Clear all

[PPC] How to reverse GSCr Functions for use in C#!

Page 2 / 4

LEGACYY
Posts: 2350
(@legacyy)
Noble RivalGamer
Joined: 9 years ago

i like this tutorial when i'm feeling a little better i will spend time and read this, Incredible work (y)

Reply
Posts: 0
Topic starter
(@01cedric)
New RivalGamer
Joined: 8 years ago

i like this tutorial when i'm feeling a little better i will spend time and read this, Incredible work (y)

Thank you very much! Hopefully I´ve time to complete something, I´m working on since yesterday!

Reply
Cyb3r
Posts: 1598
(@cyb3r)
Noble RivalGamer
Joined: 9 years ago

huehuehue, Yes! Thats what I mean! Everyone can just copy & paste, but if you really want to mod Games, then you need to learn! 🙂 Thats why I implemented a riddle.

I'm not a noob though but it's good to learn something new, TBH I never got into this COD mess because I hate COD games lol

Reply
Posts: 0
(@sygnus)
New RivalGamer
Joined: 9 years ago

Welcome to this Tutorial!

I´ve learned all of this mostly by myself, while discovering the CoD PDBs and compared the Functions within PseudoCode and Graph-View! Anyway lets start off...

Things required:
- A PDB (Server File) of your choice ( I recommend Ghosts PDB for IW Games and BO1/BO2 PDB for Treyarch Games)
- An Elf of the Games you want (I will be using MW3 1.24 defulat_Mp.elf)
- IDA Pro 6.1 (Recommended is 6.6)
- Low Requirements in PPC
- A Brain

Open both up and let them load completely until it tells you "idle" in IDA:

Hidden content cannot be quoted.

Next up, go to the PDB File and search for a Function you want. I will use for this Tutorial PrecacheShader, as of its quite easy to reverse in my opinion. Go to the Function window (usually on the left site), click on it and go on the Top to Search -> Search and type your Function you want to search. In my case I search for -> PrecacheMaterial <- and you´ll find it (Treyarch Games are different to this one, try search for precacheshader, if you wont find it with the above one!) Doubleclick in the Function Window on the Function you want and it will pop up like this:

Hidden content cannot be quoted.

In Most cases, its easier to use the Graph, but in this Case, we will use Textview. To get the Text-View, right-click on the Function and you´ll see "Text-View" (or something like this). Click on it.
Next Step is, to Locate the Functions, which are calling this one. These are most likely somewhere at the Bottom of the Function. In This we´re gonna scroll a little bit down and we will find this function!

Hidden content cannot be quoted.

As of we know, that it needs to be a Material/Shader, we know that its this functionwe need. So lets get and search it for MW3.
Here is a good Pastebin from Shark, where he dumped most likely all GSC Functions for almost every CoD (incl. BO3):

Hidden content cannot be quoted.

What we are gonna do, is open up our ELF (from 1.24 MW3) and going to the Offset of the PrecacheShader, which we´ve found in the Dump.

It will look very similiar to the one we´ve saw in the PDB.
So we scroll down in the precacheShader function and we´ll see the G_MaterialIndex over there.

Hidden content cannot be quoted.

Thats the Function we need to use for calling the GSC Function within C#, the only thing you´ll need to find (its in the Precacheshader function aswell) is level_local_t for precaching. I won´t give you the whole Code, but I will give you some "Basic-Riddle-Code" for you to complete! (Please don´t post in on here, keep it for yourself, as of you would destroy others fun)

Sorry for my bad english, I´m from Switzerland :p

NOTE: Not every GSCr Function can be used within C#, as of not every Function getting called from another Function 🙂 Most of them are, but some aren´t!

Peace out
- 01cedricv2

-Riddle-

Hidden content cannot be quoted.

Who can find these Checks (Keep in it private for others to try)

Nice tutorial, but you should consider adding another function to reverse, as the PrecacheShader/Material function is pretty common knowledge.

Reply
Posts: 0
Topic starter
(@01cedric)
New RivalGamer
Joined: 8 years ago

Nice tutorial, but you should consider adding another function to reverse, as the PrecacheShader/Material function is pretty common knowledge.

It should be a Tutorial for guys without good knownledge, thats why I made an easy one for those which just started learning 🙂

Reply
Page 2 / 4