Marcus101RR Expert Cheater
Reputation: 2
Joined: 09 Mar 2011 Posts: 131 Location: USA, FL
|
Posted: Sat Jul 16, 2016 1:32 pm Post subject: Using Symbols in Assembly to create a new defined Symbol? |
|
|
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)
|
|
|