How to copy the opcode oprating a call

toolsmax

toolsmax

Noobzor
Joined
Jan 12, 2020
Messages
6
I've created a script to call a function in game. To achieve this, I have to find the opcode that calls this function and adjust the value of the registers.
then I used the createthread to run this code.It worked as first. However, I found that after the game is updated, the address of the function has changed so that I have to manually edit my code to make it capable for the new version.
Specifically, the opcode was "call MonsterHunterWorld.exe+1169EB0" ,and after the update it is "call MonsterHunterWorld.exe+1169EF0".
I can use AOBscan to locate the address of this opcode in the game, but I failed to copy it to my script. I tried to use the readMem sunction, but I soon found that it is impossible to directly copy bytes since it only stores the relative address of the function. I wonder if there is a way that can copy the absolute address of this function so that I do not need to edit it every time the game updates.
 
cfemen

cfemen

RCE Fanatics
Talents
Table Maker
Joined
Feb 15, 2019
Messages
627
hey,
reassemble is what you need :)

https://wiki.cheatengine.org/index.php?title=Auto_Assembler:reassemble
 
toolsmax

toolsmax

Noobzor
Joined
Jan 12, 2020
Messages
6
cfemen said:
hey,
reassemble is what you need :)

https://wiki.cheatengine.org/index.php?title=Auto_Assembler:reassemble
It was exactly what I need.
Idiot for me to ignore such important pages when learning and thank you very much for bothering to answer such a basic question.
 
Top