[Tutorial] Finding DVARS, and writing them to memory C# & PPC

  • Hello Guest! Welcome to ConsoleCrunch, to help support our site check out the premium upgrades HERE! to get exclusive access to our hidden content.
  • Unable to load portions of the website...
    If you use an ad blocker addon, you should disable it because it interferes with several elements of the site and blocks more than just adverts.
  • Read Rules Before Posting Post Virus Scans with every program.

Nostafaru

Moderating the Crunch Bunch.
Retired Staff
Community Elite
Community Veteran
Determined Poster
Active Member
Console ID Poster
Apr 6, 2014
2,020
1,783
443
Hello Crunchers :) Today i will show you something that is very useful for a lot of coders.

This tutorial will be about how to find DVARS. Now when i say DVARS you might be thinking of stuff like : cg_ fov 1
or commands like : g_bulletTracers 1 < - No that is not the type of DVARS we will be looking for. Those DVARS are for patches.
The DVARS we will find is just an address and the bytes to enable it. So you basically write it like this :

PS3.SetMemory(0x1234, new byte[] { 0x01 }); //The address 0x1234 is just used as an example.

or :

byte[] DvarExample = new byte[] { 0x01} ;
PS3.SetMemory(0x1234, DvarExample);

This is for all COD games.



Things Required :


  • Your Game`s memory dump.
  • A Debugger(So you can view your memory and write your values faster)
  • IDA Pro(With PS3 plugins)
  • Hex editor
  • A brain(not included ).








The first thing we will start off with is how to dump your memory. The reason we will do this is because we want to paste our address in our memory dump
and then we can see the addresses we need but i`ll explain that later on.


There is more than just one way of dumping your memory, but the easiest way in my opinion is using Rawdog`s cPanel tool.

*NOTE!* To dump the memory via Rawdog`s cPanel, your Ps3 must be running DEX.

Download : chrome://mega/content/secure.html#!fNxhFLrA!KpF7jlE7PoCgEqkZ3Jd55Y4rHTFgAeED4OLJLq5zWpU

Things you want to do :

1. Open the cPanel and connect to your Playstation 3
2. Click on this button :
2bdcabfad156a778c9ecb5bcc1dccc47.png

3. Now you`ll connect again and click on Dump memory.
4. Now you would have to choose the directory of where your memory dump should be placed :
a996a86837ebe68e966592a5199087ac.png

5. Make sure to save the memory dump file as a .BIN file.

Now you are al done with dumping the memory! Let`s move on to the next step :)



Finding the DVARS




This will be the most important thing, how to locate DVARS and write them into the memory.


Open Up IDA pro(with the Ps3 plugins). And open the ELF of the game you want to find DVARS for. In this TUT i will use World at war.

Load it in IDA pro. And wait for it to load, you know it`s loaded when it says AU : idle

These are the tabs i normally have open :
36b89d50693179726c1d595fc5520448.png


To view strings, go to : View > Open Subviews > Strings.

Now search for a DVAR(Press ALT + T). If you wonder how you know which string is a DVAR just look here :

Code:
DVARS is often written like this : cg_, g_, sv_. Example : cg_fov <- look at the cg_ before the function name. Then you know it its a DVAR or not.

As an example in this tutorial i will use the easiest of them all which is : cg_fov. All COD ELF`s has this string in it. Now search for it.
57aef68d30c0a1902e6d1a372374953f.png


Once you have located the correct address follow these steps :


1. Click on the string. Then you should see something like this :
cf83fb45325314dc5ffcf284d5f1f77d.png


You`ll have to copy this address.
e93bfe976613384908026af3b90eff9a.png

Now as you have copied this : 006A0AF8

You have to go to the memory dump we made(in .BIN format) open it in Hex Editor and press CTRL + F.
Make sure you have set the datatype to : Hex - Values. Have it like this :
88b308cff3366c55d1778e3764e0b0c7.png


Now press OK to search once. The first search will NOT BE correct as it will only show a list of pointers which cannot be used to find our address.
Click F3 to search again. Then it will take you to the address that will tell us the correct info. Now click CTRL + E to cop the address.

Now go into a debugger and search for the address that we just found in the memory dump(What debugger you are using is not important as long as you can read and set values in it)

Now as you have done that, you will see the bytes that`s been written in the memory. And inside of here is the value for cg_fov.
Know you should see the bytes of what you also found in the memory dump. Now you just have to play around with some of the bytes in there.
Now i know that the standard value for cg_fov is : 82. As you see here it is
4052a4dbc394185ab0d86c86b61f1d05.png

Now i can change the value to 99 to set it to 99, duhh :p If you want to set it to really high you can change it to : FF which is a HEX number. In Memory it will be : 255


Now you take the address you found and the bytes you found and program it into a tool.
This you will do with Visual Studio. Now code it like this : PS3.SetMemory(0x274DB29, new byte[] { 0x82 }); This will give the address 0x274DB29 the value of 0x82.

Now you are done with finding the DVARS ! You can do this with a lot of other addresses like : g_speed or high_jump_height

Some String for mods : Wallhack = r_znear, UAV = b_ShowCompassEnemies, Laser = cg_laser. And you can use Draw Crosshairs and a lot more.

Writing it in PowerPC

Now i will teach you how to write this into an EBOOT.BIN, to do this you have to write in PowerPC.

There are 2 different ways of writing mods into an EBOOT.BIN.

1. Taking the address you have - 10 000 and write the bytes in the EBOOT.ELF file, must be a .ELF format, just make it to a .BIN when you are done.

2. Finding an empty address and writing PowerPC to it.



In this tutorial i will use the PowerPC method, as not all addresses can be found in the .ELF file, the cg_fov address i found : 0x274DB29 is to big to be in a .ELF file.
So we would write it in PowerPC(PPC).

This is very simple, these are some of the instructions you would use : li, lis and stb.

li = load immidiate
lis = load immidiate shifted
stb = store byte

What you would need to write this is a PPC Compiler(made by choco) look it up on google.
Once you have that you would find an empty address to write your PowerPC to. To do this, you can take what you "think" is an empty address and put a breakpoint on the address(in debugger) if it doesn`t freeze the process that means that its empty, and you can write to it.

As an example in thir tutorial i will use the address : 0x123456, that is not a real empty address just to show where you should have your empty address.
Your start address would be in here :
78f75e70f8dfff5e03280d9127148066.png


Now this is what you would write :

0x274DB29

lis %r3, 0x274D //Loading the first 2 bytes of the address into the register 3 (r3)
li %r4, 0x99 //Loading the value that you are using to turn on the mod into register 4 (r4) And 0x99 is the value i want cg_fov to be set as.
stb %r4, 0xB29(%r3) //Storing that byte at the address that you loaded

The reason we have this char : % in front of our registers is because Choco`s PPC Compiler wont understand it if you are not using it.

Now it converted our PowerPC coding into OP Codes and it looks like this : 3C 60 27 4D 38 80 00 99 98 83 0B 29
Now just go to the empty address and paste those OP Codes and you should have the mod :)


If you have any questions just leave them in the comments.


Peace out ! ;)
 

Nostafaru

Moderating the Crunch Bunch.
Retired Staff
Community Elite
Community Veteran
Determined Poster
Active Member
Console ID Poster
Apr 6, 2014
2,020
1,783
443

random_berber

Member
Jul 11, 2020
37
2
68
Hello Crunchers :) Today i will show you something that is very useful for a lot of coders.

This tutorial will be about how to find DVARS. Now when i say DVARS you might be thinking of stuff like : cg_ fov 1
or commands like : g_bulletTracers 1 < - No that is not the type of DVARS we will be looking for. Those DVARS are for patches.
The DVARS we will find is just an address and the bytes to enable it. So you basically write it like this :

PS3.SetMemory(0x1234, new byte[] { 0x01 }); //The address 0x1234 is just used as an example.

or :

byte[] DvarExample = new byte[] { 0x01} ;
PS3.SetMemory(0x1234, DvarExample);

This is for all COD games.



Things Required :



  • Your Game`s memory dump.
    A Debugger(So you can view your memory and write your values faster)
    IDA Pro(With PS3 plugins)
    Hex editor
    A brain(not included ).








The first thing we will start off with is how to dump your memory. The reason we will do this is because we want to paste our address in our memory dump
and then we can see the addresses we need but i`ll explain that later on.


There is more than just one way of dumping your memory, but the easiest way in my opinion is using Rawdog`s cPanel tool.

*NOTE!* To dump the memory via Rawdog`s cPanel, your Ps3 must be running DEX.

Download : chrome://mega/content/secure.html#!fNxhFLrA!KpF7jlE7PoCgEqkZ3Jd55Y4rHTFgAeED4OLJLq5zWpU

Things you want to do :

1. Open the cPanel and connect to your Playstation 3
2. Click on this button :
2bdcabfad156a778c9ecb5bcc1dccc47.png

3. Now you`ll connect again and click on Dump memory.
4. Now you would have to choose the directory of where your memory dump should be placed :
a996a86837ebe68e966592a5199087ac.png

5. Make sure to save the memory dump file as a .BIN file.

Now you are al done with dumping the memory! Let`s move on to the next step :)



Finding the DVARS




This will be the most important thing, how to locate DVARS and write them into the memory.


Open Up IDA pro(with the Ps3 plugins). And open the ELF of the game you want to find DVARS for. In this TUT i will use World at war.

Load it in IDA pro. And wait for it to load, you know it`s loaded when it says AU : idle

These are the tabs i normally have open :
36b89d50693179726c1d595fc5520448.png


To view strings, go to : View > Open Subviews > Strings.

Now search for a DVAR(Press ALT + T). If you wonder how you know which string is a DVAR just look here :

Code:
DVARS is often written like this : cg_, g_, sv_. Example : cg_fov <- look at the cg_ before the function name. Then you know it its a DVAR or not.

As an example in this tutorial i will use the easiest of them all which is : cg_fov. All COD ELF`s has this string in it. Now search for it.
57aef68d30c0a1902e6d1a372374953f.png


Once you have located the correct address follow these steps :


1. Click on the string. Then you should see something like this :
cf83fb45325314dc5ffcf284d5f1f77d.png


You`ll have to copy this address.
e93bfe976613384908026af3b90eff9a.png

Now as you have copied this : 006A0AF8

You have to go to the memory dump we made(in .BIN format) open it in Hex Editor and press CTRL + F.
Make sure you have set the datatype to : Hex - Values. Have it like this :
88b308cff3366c55d1778e3764e0b0c7.png


Now press OK to search once. The first search will NOT BE correct as it will only show a list of pointers which cannot be used to find our address.
Click F3 to search again. Then it will take you to the address that will tell us the correct info. Now click CTRL + E to cop the address.

Now go into a debugger and search for the address that we just found in the memory dump(What debugger you are using is not important as long as you can read and set values in it)

Now as you have done that, you will see the bytes that`s been written in the memory. And inside of here is the value for cg_fov.
Know you should see the bytes of what you also found in the memory dump. Now you just have to play around with some of the bytes in there.
Now i know that the standard value for cg_fov is : 82. As you see here it is
4052a4dbc394185ab0d86c86b61f1d05.png

Now i can change the value to 99 to set it to 99, duhh :p If you want to set it to really high you can change it to : FF which is a HEX number. In Memory it will be : 255


Now you take the address you found and the bytes you found and program it into a tool.
This you will do with Visual Studio. Now code it like this : PS3.SetMemory(0x274DB29, new byte[] { 0x82 }); This will give the address 0x274DB29 the value of 0x82.

Now you are done with finding the DVARS ! You can do this with a lot of other addresses like : g_speed or high_jump_height

Some String for mods : Wallhack = r_znear, UAV = b_ShowCompassEnemies, Laser = cg_laser. And you can use Draw Crosshairs and a lot more.

Writing it in PowerPC

Now i will teach you how to write this into an EBOOT.BIN, to do this you have to write in PowerPC.

There are 2 different ways of writing mods into an EBOOT.BIN.

1. Taking the address you have - 10 000 and write the bytes in the EBOOT.ELF file, must be a .ELF format, just make it to a .BIN when you are done.

2. Finding an empty address and writing PowerPC to it.



In this tutorial i will use the PowerPC method, as not all addresses can be found in the .ELF file, the cg_fov address i found : 0x274DB29 is to big to be in a .ELF file.
So we would write it in PowerPC(PPC).

This is very simple, these are some of the instructions you would use : li, lis and stb.

li = load immidiate
lis = load immidiate shifted
stb = store byte

What you would need to write this is a PPC Compiler(made by choco) look it up on google.
Once you have that you would find an empty address to write your PowerPC to. To do this, you can take what you "think" is an empty address and put a breakpoint on the address(in debugger) if it doesn`t freeze the process that means that its empty, and you can write to it.

As an example in thir tutorial i will use the address : 0x123456, that is not a real empty address just to show where you should have your empty address.
Your start address would be in here :
78f75e70f8dfff5e03280d9127148066.png


Now this is what you would write :

0x274DB29

lis %r3, 0x274D //Loading the first 2 bytes of the address into the register 3 (r3)
li %r4, 0x99 //Loading the value that you are using to turn on the mod into register 4 (r4) And 0x99 is the value i want cg_fov to be set as.
stb %r4, 0xB29(%r3) //Storing that byte at the address that you loaded

The reason we have this char : % in front of our registers is because Choco`s PPC Compiler wont understand it if you are not using it.

Now it converted our PowerPC coding into OP Codes and it looks like this : 3C 60 27 4D 38 80 00 99 98 83 0B 29
Now just go to the empty address and paste those OP Codes and you should have the mod :)


If you have any questions just leave them in the comments.


Peace out ! ;)
Hi my friend, can you update the link for the RawDog cpanel? because you didn't copied the link correctly and the others versions online seems to don't work on my DEX ps3
 
General chit-chat
Help Users
  • @ QM|T_JinX:
    yea it is
  • @ lurch6661:
    we need more people in chat
  • @ lurch6661:
    maybe if cc hosts contests
  • @ lurch6661:
    to win premium memberships
  • @ QM|T_JinX:
    if there isnt that mutch already working ids online then yea
  • @ lurch6661:
    i mean theres gotta be a way to popularize
  • @ lurch6661:
    this site
  • @ QM|T_JinX:
    think there will be more online is when the jb on ps4 starts running
  • @ QM|T_JinX:
    not everybody have a ps5 and ps4 need low fw ps4 on lowfw is hard to find
  • @ lurch6661:
    yea that is very true
  • @ lurch6661:
    iam sure if my name was illuminated we could get more followers for cc
  • @ lurch6661:
    i forget how much it is
  • @ QM|T_JinX:
    not sure
  • Chat Bot:
    extiflyy is our newest member. Welcome!
  • @ lurch6661:
    my minds playing tricks on me
  • @ lurch6661:
    lol
  • Chat Bot:
    Christo has joined the room.
  • Chat Bot:
    QM|T_JinX has joined the room.
  • Chat Bot:
    viejo loco is our newest member. Welcome!
  • Chat Bot:
    Christo has joined the room.
  • Chat Bot:
    jaywill32 is our newest member. Welcome!
  • Chat Bot:
    iShatOnU__ has left the room.
    Chat Bot: iShatOnU__ has left the room.