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 


Find address of function

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
Paprikaskrumpli
Cheater
Reputation: 0

Joined: 19 Dec 2020
Posts: 29

PostPosted: Thu Mar 11, 2021 4:48 pm    Post subject: Find address of function Reply with quote

So I got this sweet function call which I'd like to nop to get godmode from my trainer.
How does cheat engine work out the address of Terraria.Player::Update_NPCCollision+853?

PS:
-I underlined the wrong function in "Enumerate Dll's" window, but the Terraria.Player::Update_NPCCollision is also there, on the address showed in the cheat table

-I want to do the same from my trainer

-Do you guys still accept donations? CE is fucking crazy!



help.JPG
 Description:
Terraria.Player::Update_NPCCollision is in Terraria.exe
 Filesize:  309.78 KB
 Viewed:  2479 Time(s)

help.JPG




Last edited by Paprikaskrumpli on Fri Mar 12, 2021 3:07 am; edited 1 time in total
Back to top
View user's profile Send private message
sbryzl
Master Cheater
Reputation: 6

Joined: 25 Jul 2016
Posts: 252

PostPosted: Thu Mar 11, 2021 6:14 pm    Post subject: Reply with quote

You should have cheat engine auto create a template at that location so there's real text to work with instead of pictures.
tools -> auto assemble -> template -> full injection
Back to top
View user's profile Send private message
Paprikaskrumpli
Cheater
Reputation: 0

Joined: 19 Dec 2020
Posts: 29

PostPosted: Fri Mar 12, 2021 3:07 am    Post subject: Reply with quote

sbryzl wrote:
You should have cheat engine auto create a template at that location so there's real text to work with instead of pictures.
tools -> auto assemble -> template -> full injection


I might be misunderstanding what you are saying, but that is not quite what I'm looking for.

I'm looking for a way to find the address of that function from my c++ code.
Back to top
View user's profile Send private message
Fear3d
How do I cheat?
Reputation: 0

Joined: 27 Feb 2021
Posts: 6

PostPosted: Fri Mar 12, 2021 7:26 am    Post subject: Reply with quote

I might be misunderstanding the issue, since I'm kind of a noob, but can you not have your code search for an array of bytes that are unique to that function? It tells you which bytes represent the instructions of the function, in the 'Bytes' column of the disassembler window.

So like, in your screenshot the bytes that represent the very start of that function are '55 8B EC 57 56 53 81 EC' and so forth. After some number of bytes, it should result in an array that is unique. I believe that if you were to highlight the first instruction in the function, press ctrl + a to go to the auto assembler, and go to 'template' and then 'aob injection', CE should automatically generate the unique array of bytes for you.

I get that you don't actually want to make an AOB script in CE, but I mean, you could just copy the AOB array that the template generates, to use in your own code. It might be easier that way, so that you don't have to manually ensure that the AOB is unique, and you also don't have to manually concern yourself with bytes that are subject to change (i.e. memory address).

Dunno whether or not there's a better way to go about it, but if I'm understanding you correctly, I believe this should be a doable solution to your problem.
Back to top
View user's profile Send private message
Paprikaskrumpli
Cheater
Reputation: 0

Joined: 19 Dec 2020
Posts: 29

PostPosted: Fri Mar 12, 2021 2:50 pm    Post subject: Reply with quote

Fear3d wrote:
I might be misunderstanding the issue, since I'm kind of a noob, but can you not have your code search for an array of bytes that are unique to that function? It tells you which bytes represent the instructions of the function, in the 'Bytes' column of the disassembler window.

So like, in your screenshot the bytes that represent the very start of that function are '55 8B EC 57 56 53 81 EC' and so forth. After some number of bytes, it should result in an array that is unique. I believe that if you were to highlight the first instruction in the function, press ctrl + a to go to the auto assembler, and go to 'template' and then 'aob injection', CE should automatically generate the unique array of bytes for you.

I get that you don't actually want to make an AOB script in CE, but I mean, you could just copy the AOB array that the template generates, to use in your own code. It might be easier that way, so that you don't have to manually ensure that the AOB is unique, and you also don't have to manually concern yourself with bytes that are subject to change (i.e. memory address).

Dunno whether or not there's a better way to go about it, but if I'm understanding you correctly, I believe this should be a doable solution to your problem.


Yeah I know about this stuff, I made a codefinder and an asm injector once, but I'm looking for a way to get the address of the function directly, with a more elegant - less brute force solution. Like an offset from a module, or some pointer to it. My question is regarding how the game and cheat engine finds it.
Like enumerating process modules, getting the base of Terraria.exe and then using an offset to access a variable, or code.
Thank you for your answer tho!
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 471

Joined: 09 May 2003
Posts: 25859
Location: The netherlands

PostPosted: Fri Mar 12, 2021 5:38 pm    Post subject: Reply with quote

getting these specific addresses you'll have to either implement a .net debugger interface (can be based on a image so doesn't have to be live) , or inject a .net dll into the target which then gets the speicifc assembly, and class, and then get the method from there

https://github.com/cheat-engine/cheat-engine/tree/master/Cheat%20Engine/DotNetDataCollector

_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
Paprikaskrumpli
Cheater
Reputation: 0

Joined: 19 Dec 2020
Posts: 29

PostPosted: Sat Mar 13, 2021 3:02 am    Post subject: Reply with quote

Dark Byte wrote:
getting these specific addresses you'll have to either implement a .net debugger interface (can be based on a image so doesn't have to be live) , or inject a .net dll into the target which then gets the speicifc assembly, and class, and then get the method from there

https://github.com/cheat-engine/cheat-engine/tree/master/Cheat%20Engine/DotNetDataCollector


Thank you!
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine 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