Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Help with AOB Injection.

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking
View previous topic :: View next topic  
Author Message
taco1
Newbie cheater
Reputation: 0

Joined: 04 Aug 2016
Posts: 16

PostPosted: Sat Apr 18, 2020 11:40 pm    Post subject: Help with AOB Injection. Reply with quote

My game updated a while back and my old code does not work anymore. I also updated my PC to windows 10.

This was my old code before game updated

Code:
label(code)
label(return)
globalalloc(bMap,4)

newmem:

code:
mov [bMap], rdi
  cmp byte ptr [rdi+00000172],00
  jmp return

INJECT:
  jmp newmem
  nop
  nop
return:
registersymbol(INJECT)

[DISABLE]


I tried to reuse that once I found the new address and change my pointers but I got an error with offset was to much. I read on a different post it was because game is now 64bit. I changed my code to this.

Code:
label(code)
label(return)

newmem:

code:
push rax
mov rax, bmap
mov [rax], rdi
pop rax
  cmp byte ptr [rdi+00000132],00
  jmp return

INJECT:
  jmp newmem
  nop
  nop
return:
registersymbol(INJECT)

[DISABLE]

INJECT:


It worked the first time. After restarting my game it crashes everytime I run the script. I am not a big coder but Ill try to explain. My game has 4 maps. I am trying to enable them at all times. I use to use bmap as my pointer location to find the address and then have 4 pointers for each map.
bmap/00000172 for map 1, bmap 00000173 for map 2 etc. After update the new ones are 00000132 etc.

Something with the rax code is messing it up I think. " cmp byte ptr [rdi+00000132],00" is where the original game code.

Anyone see what is wrong? Please help.
Back to top
View user's profile Send private message
OldCheatEngineUser
Whateven rank
Reputation: 20

Joined: 01 Feb 2016
Posts: 1586

PostPosted: Sat Apr 18, 2020 11:58 pm    Post subject: Reply with quote

im not entirely sure because of the information you gave, but let me guess you did not allocate 8 bytes for bmap and the value in rdi (i.e. the address) is more than 4-bytes wide.
_________________
About Me;
I Use CE Since Version 1.X, And Still Learning How To Use It Well!
Jul 26, 2020
STN wrote:
i am a sweetheart.
Back to top
View user's profile Send private message Visit poster's website
Sanglante
Cheater
Reputation: 0

Joined: 27 Sep 2018
Posts: 43

PostPosted: Sun Apr 19, 2020 1:06 am    Post subject: Reply with quote

Code:
[DISABLE]

INJECT:


??? you inject nothing here.

When you Disable script original code have to return in INJECT place
Back to top
View user's profile Send private message
taco1
Newbie cheater
Reputation: 0

Joined: 04 Aug 2016
Posts: 16

PostPosted: Sun Apr 19, 2020 11:07 am    Post subject: Reply with quote

Disregard below! I got it! I had taken out globalalloc cmd. I miss read the other forum post about it. Once I put that back in it worked great!

globalalloc(bMap,Cool





I added some screenshots of what I am trying to do. I want to run the script and find the address with the pointers. This changes every time game restarts. I use to be able to do it with

globalalloc(bMap,4) This gives me error now. "offset to big"

This use to work with this code

Code:

newmem:

code:
mov [bMap], rdi
  cmp byte ptr [rdi+00000172],00
  jmp return



I tried another method from a different post without using the globalalloc command.

Code:
code:
push rax
mov rax, bmap
mov [rax], rdi
pop rax
  cmp byte ptr [rdi+00000132],00
  jmp return

INJECT:
  jmp newmem
  nop
  nop
return:
registersymbol(INJECT)

[DISABLE]


This finds the address the first time I ever try it. After I restart my game it stops working and everytime I run the script it crashed my game. I am no coder. I am trying to piece together what I used in past to someone else's post that had same problem here https://forum.cheatengine.org/viewtopic.php?p=5623678#5623678





Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites