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 


Using Symbols in Assembly to create a new defined Symbol?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking
View previous topic :: View next topic  
Author Message
Marcus101RR
Expert Cheater
Reputation: 2

Joined: 09 Mar 2011
Posts: 131
Location: USA, FL

PostPosted: Sat Jul 16, 2016 1:32 pm    Post subject: Using Symbols in Assembly to create a new defined Symbol? Reply with quote

Code:
[ENABLE]
// define(player, Terraria.Main::UpdateMusic+88F)
define(player, Terraria.Main::Update+52AC)
assert(player, ?? ?? ?? ?? 8B 15 ?? ?? ?? ?? 3B 50 04)

label(players)
registersymbol(players)

alloc(index,64)
registersymbol(index)

index:
dd 1

player:
players:

[DISABLE]


I have 2 Symbols atm:
players - This one leads to the place where all 256 player indexes are stored and you can then use these pointers to find health/mana, etc. Basically every stat information on that specified player.

index - The custom defined index I want to look at. Since each player has an index of 0-255, I use this index symbol which can later be changed to whatever number I want to look at of a player. If I want to look at player 5 who's name is Charles, I just change index, and players will use this index to give me the results.

The question? How would I begin to even use [players] to get to the player I want based on the index I specify? I guess I would be able to write a custom assembly code that doesn't inject itself, but rather creates an extra bridge of calculation?

[players] -> 8 = Player Index 0

Player Index 0 - > 32c = Health

I know I can guess "What Index AM I" and then multiply by index*4+4 to find the player I want. But it would be nicer if I can avoid the manual calculation and just enter 1-255 under index and let cheat engine do the rest...

any ideas?

Code So far:
Code:
[ENABLE]
// define(player, Terraria.Main::UpdateMusic+88F)
define(player, Terraria.Main::Update+52AC)
assert(player, ?? ?? ?? ?? 8B 15 ?? ?? ?? ?? 3B 50 04)

label(players)
registersymbol(players)

alloc(index,64)
registersymbol(index)

alloc(PTR,512)
label(thisplayer)
registersymbol(thisplayer)

index:
dd 1

player:
players:

PTR:
mov eax,[players]
mov eax,[eax+index*4+4] <-- Because player 1 starts at pointer offset 8
mov [thisplayer],eax <-- This should be player 1!?

thisplayer:
dd 0

[DISABLE]
dealloc(index)
unregistersymbol(index)
Back to top
View user's profile Send private message Visit poster's website AIM Address MSN Messenger
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