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 


jmp instruction using a high # of bytes

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
frubam
Cheater
Reputation: 0

Joined: 13 Jul 2016
Posts: 29

PostPosted: Mon Feb 08, 2021 11:54 am    Post subject: jmp instruction using a high # of bytes Reply with quote

I was making a bunch of codes for a game in RPCS3. I used AOB Injection to create these codes. Initially, the jmp instruction had only used a few bytes(5 I think), and had no problems with the codes I created until I reset my PC. Now many of the codes crash the game when used. When I attempted to inspect what the issue was, I noticed the jmp instruction having many more bytes than I thought it should have(img below:top-original, mid-when code turned on, bottom-written code), and when turning on the code, the bytes replaced overflow into the other assembly instructions, causing the crash.

Is there some reason the jmp command is using so many bytes? Perhaps my knowledge is outdated, and this is actually normal. Rewriting the code(as much suck as that would be) is plausible, but since its a code that others may use as well, I'd like to make it so things are consistent(e.g. some people get the long bytes, others don't).



Untitled - 1.jpg
 Description:
 Filesize:  157.47 KB
 Viewed:  1863 Time(s)

Untitled - 1.jpg


Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 470

Joined: 09 May 2003
Posts: 25805
Location: The netherlands

PostPosted: Mon Feb 08, 2021 12:12 pm    Post subject: Reply with quote

make sure to use the 3th alloc parameter specifying rpcs3.exe

or always assume the jmp is going to be 14 bytes

_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
frubam
Cheater
Reputation: 0

Joined: 13 Jul 2016
Posts: 29

PostPosted: Mon Feb 08, 2021 1:47 pm    Post subject: Reply with quote

After trying to use the 3rd parameter, its still doing the same phenomenon. I guess I was lucky with the allocation block that initial time. I'll just redo the codes assuming it will have the extended bytes. Thanks for the hasty response =03!
Back to top
View user's profile Send private message
sbryzl
Master Cheater
Reputation: 6

Joined: 25 Jul 2016
Posts: 252

PostPosted: Mon Feb 08, 2021 3:07 pm    Post subject: Reply with quote

For the 3rd parameter I would try to use something close to your injection point. Your injection point is the aob symbol which looks like it is aArteSkipbackstep so I would use that.
alloc(newmem,1000,aArteSkipbackstep)

If you're certain there will only be 4 bytes to the relative jump you can try using jmp long instead.
jmp long newmem+80
Back to top
View user's profile Send private message
frubam
Cheater
Reputation: 0

Joined: 13 Jul 2016
Posts: 29

PostPosted: Tue Feb 09, 2021 12:32 pm    Post subject: Reply with quote

So I tried changing only the 3rd param into the aob symbol; still didn't work. However, using jmp long did the trick. From multitudes of tests, it doesn't seem like the byte range in which rpcs3 loads the instructions surpasses the 4 byte mark, so I think we are good. Very, very much appreciated, this saved me a lot of rework Very Happy !
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine 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