+ Post New Thread
Results 1 to 1 of 1
Thread Title: Checking if a register has a fix value

Share & learn from useful cheat engine tutorials here.

  1. #1
    Join Date
    Jan 1995
    Adding video game cheats

    Send PayPal to vgchat

    Thumbs Up/Down
    Received: 10/0
    Given: 20/0

    Default Checking if a register has a fix value

    Recreating Geri's tutorials and articles before his site got wiped out. Wealth of information in it!

    If you have made cheats for some time now, you have probably noticed that you can use many codes to calculate a value, not just the one that is accessing to it. It happens many times that you find a code where a register can be used to calculate the address that you need, for example a register is holding the address of your health somewhere in the code etc. In those cases, it is very important to make sure that the register is always pointing to your health only and not holding any other value at the specific code. For this, you can do some manual debugging but to make sure that you don't mess up anything, you can also use a small script to check if the value of the register is changing or not. So to make my work easier, I have made this script and I post it here in case someone want to use it. If you don't know how to use it, you probably don't need it yet.

    In this example, the script is checking if EAX always have the same value at a specific code. The code that I am using is from the tutorial of CE 6.1. In the example, EAX is holding the value of your health in step 2, thus it would not be suitable to calculate an address, but it is fine for an example for illustrating. So here is the script that you need to add to a table:

    //code from here to '[DISABLE]' will be used to enable the cheat
    alloc(newmem,2048) //2kb should be enough


    dd 0

    dd 1

    newmem: //this is the original code here now
    mov eax,[ebx+00000458]

    cmp [recordtime],1
    jne checking_register
    mov [recordtime],0 //this code will run only once
    mov [regcheck],eax //recording register value

    cmp eax,[regcheck] //checking stored value with register
    je exit //if it's ok, quit
    inc [regcheck_counter] //if not ok, increase regcheck_counter value

    jmp returnhere

    jmp newmem

    //code from here till the end of the code will be used to disable the cheat
    mov eax,[ebx+00000458]
    //Alt: db 8B 83 58 04 00 00

    If this is done and you have activated your script, you also have to add regcheck_counter to your table to see the value, or you can just jump to that address in the memory browser. By going to regcheck value, you can also see what was the value that was logged for the register.

    Now if you are at step 2 in the tutorial and you don't do anything, regcheck_counter = 0. This means that EAX has always the same value. If this value would be an address, you could think at first sight that this a good register to use for your purposes, but now click on Hit me and regcheck_counter will start to increase, indicating that EAX register's value has been changed compared to the first recorded value. In this case, you could conclude that EAX cannot be used to calculate your address as the value is sometimes different than what you need.

    I am not sure that everyone will understand the purpose of this script but those who will can use this example to change it for the code that they want to examine. It is a good way to test a register automatically instead of manual debugging so you can play for some time without hitting breakpoints all the time, freezing your gameplay.
    here is a video for demonstration:

    Here is a table with the code and address for the tutorial.
    Attached Files Attached Files

    0 Not allowed! Not allowed!

  2. Adsense Banner
    Google Adsense Bot Circuit advertisement
    Join Date
    Advertising world
    Find free Unofficial Cheats, Tips, Codes, Passwords, Hints, Secrets, Game Shark, and Game Genie codes And much more including Cheat Engine Tables here at Video Game Cheats.

+ Post New Thread

Visitors found this page by searching for:

Nothing here yet

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Creative Commons License
The content throughout Video Game Chat. is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License.

Both the license and these terms of use are active throughout Video Game Chat.