开发者

Store multiple values at the same memory address. Delimiter?

开发者 https://www.devze.com 2023-02-01 03:42 出处:网络
I\'m doing some tinkering with Read- and WriteProcessMemory and an old platformer game I found laying around. Whenever the player enters a new level, enemies are created and the hea开发者_运维百科lth

I'm doing some tinkering with Read- and WriteProcessMemory and an old platformer game I found laying around. Whenever the player enters a new level, enemies are created and the hea开发者_运维百科lth points, coordinates etc for each one is set:

0056BE76 - c7 80 38 01 00 00 64 00 00 00 - mov [eax+00000138],00000064

(EAX being the address of the struct and 138 the offset to their health)

Granted there is free memory to write, is there any way I could store the value of EAX of each one in one and the same location? Like using a delimiter of sorts?

Cheers


From what I understood, i think you can use an union

http://www.wellho.net/resources/ex.php4?item=c209/union.c

0

精彩评论

暂无评论...
验证码 换一张
取 消