Page 1 of 1

How to copy the opcode oprating a call

Posted: Fri Jan 31, 2020 11:27 am
by toolsmax
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.

Re: How to copy the opcode oprating a call

Posted: Fri Jan 31, 2020 11:37 am
by cfemen
hey,
reassemble is what you need :)

[Link]

Re: How to copy the opcode oprating a call

Posted: Fri Jan 31, 2020 11:56 am
by toolsmax
cfemen wrote:
Fri Jan 31, 2020 11:37 am
hey,
reassemble is what you need :)

[Link]
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.