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 


In AutoAssembler, how do you check Structure name?

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

Joined: 06 Dec 2010
Posts: 186

PostPosted: Sun Dec 19, 2021 3:50 am    Post subject: In AutoAssembler, how do you check Structure name? Reply with quote

I have the Player structure named by the CE Dissector. I want to test for this name in AA.

For example:
Structure #1
PlayerStructure
00
04
08
0C
10

Structure #2
EnemyStructure
00
04
08
0C
10

In AA I want to test for the string, PlayerStructure, which is discovered by dissector. How do I do this?

_________________
Life can be a blitz. What's right and wrong will fly right past you without you having to do a thing about it.

"Cheating only means you want to hold on to the things you value."
Back to top
View user's profile Send private message MSN Messenger
Dark Byte
Site Admin
Reputation: 457

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

PostPosted: Sun Dec 19, 2021 4:36 am    Post subject: Reply with quote

can't you just compare the first 2 bytes of the start of the base address?
If it's what I think you're referring to (rtti info) the vtable should be pointing to a static. So if it's already a static that's a good reference to compare against (even holds up with randomization of the loaded module, as the first 2 bytes don't change on relocate)

but if you insist,
https://github.com/cheat-engine/cheat-engine/blob/master/Cheat%20Engine/rttihelper.pas and implement that in AA (line 117 is where the fun part begins)

or, if you are lazy ,and it's not on a high performance point, and I am assuming rcx holds the instance base address:
Code:

push rax
{$luacode base=rcx result=rax}
if getRTTIClassName(base)=='PlayerStructure' then result=1 else result=1 end
{$luacode}
cmp rax,1
pop rax
je playerStructure

EnemyStructure:
//handle EnemyStructure

PlayerStructure:
//handle PlayerStructure

_________________
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
gaming04
Expert Cheater
Reputation: 0

Joined: 06 Dec 2010
Posts: 186

PostPosted: Thu Dec 23, 2021 4:10 am    Post subject: Reply with quote

unfortunately, auto assembler only finds error. How do i fix it?

and another error if i switch {$luacode} into {$asm}



report2.png
 Description:
 Filesize:  18.95 KB
 Viewed:  2962 Time(s)

report2.png



report.png
 Description:
 Filesize:  22.89 KB
 Viewed:  2963 Time(s)

report.png



_________________
Life can be a blitz. What's right and wrong will fly right past you without you having to do a thing about it.

"Cheating only means you want to hold on to the things you value."
Back to top
View user's profile Send private message MSN Messenger
Dark Byte
Site Admin
Reputation: 457

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

PostPosted: Thu Dec 23, 2021 3:02 pm    Post subject: Reply with quote

looks like dll injection of luaclient failed

is this a selfcompiled build?

_________________
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
gaming04
Expert Cheater
Reputation: 0

Joined: 06 Dec 2010
Posts: 186

PostPosted: Fri Jan 07, 2022 12:19 am    Post subject: Reply with quote

No, I am using latest public release.
_________________
Life can be a blitz. What's right and wrong will fly right past you without you having to do a thing about it.

"Cheating only means you want to hold on to the things you value."
Back to top
View user's profile Send private message MSN Messenger
gaming04
Expert Cheater
Reputation: 0

Joined: 06 Dec 2010
Posts: 186

PostPosted: Sun Jan 16, 2022 7:30 pm    Post subject: Reply with quote

bump.

Also, I note that I am using the {luacode} inside [Enable] and [Disable]

P.S. I have decided to simply search for the first two bytes. But I have no idea how to retrieve the first two bytes from 64-bit addresses. How can I do this?

_________________
Life can be a blitz. What's right and wrong will fly right past you without you having to do a thing about it.

"Cheating only means you want to hold on to the things you value."
Back to top
View user's profile Send private message MSN Messenger
gaming04
Expert Cheater
Reputation: 0

Joined: 06 Dec 2010
Posts: 186

PostPosted: Thu May 18, 2023 12:10 pm    Post subject: bump Reply with quote

bump.

I can really use some help. It has been a few years since I last posted in this thread but I still haven't been able to figure it out. I want to test for an Address name as pointed out in the pictures. Can anyone help me?

I'm trying to test for the class name using auto assembler.



CE_NPC.png
 Description:
This is the NPC structure that I would like to test for.
 Filesize:  29.49 KB
 Viewed:  1629 Time(s)

CE_NPC.png



CE_Player.png
 Description:
This is the player structure that I would like to test for.
 Filesize:  36.63 KB
 Viewed:  1627 Time(s)

CE_Player.png



_________________
Life can be a blitz. What's right and wrong will fly right past you without you having to do a thing about it.

"Cheating only means you want to hold on to the things you value."
Back to top
View user's profile Send private message MSN Messenger
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4197

PostPosted: Thu May 18, 2023 12:30 pm    Post subject: Reply with quote

You can try to set the data type to 4-byte hex and compare to that, or, if it really is a pointer, you can expand the pointer and compare to a unique value that resides inside of that pointer tree.

That is, assuming that I am understanding your question.
Back to top
View user's profile Send private message
gaming04
Expert Cheater
Reputation: 0

Joined: 06 Dec 2010
Posts: 186

PostPosted: Thu May 18, 2023 12:45 pm    Post subject: Reply with quote

++METHOS wrote:
You can try to set the data type to 4-byte hex and compare to that, or, if it really is a pointer, you can expand the pointer and compare to a unique value that resides inside of that pointer tree.

That is, assuming that I am understanding your question.


I want to do something like this:

Code:


if $GetClassName([eax+30]) = "CR4Player" then isPlayer=true else isPlayer=false



[/code]



CE_Error.png
 Description:
This is my effort. It is met with an error.
 Filesize:  43 KB
 Viewed:  1617 Time(s)

CE_Error.png



_________________
Life can be a blitz. What's right and wrong will fly right past you without you having to do a thing about it.

"Cheating only means you want to hold on to the things you value."
Back to top
View user's profile Send private message MSN Messenger
Dark Byte
Site Admin
Reputation: 457

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

PostPosted: Thu May 18, 2023 5:17 pm    Post subject: Reply with quote

that's just the initial syntaxchecl error. ignore it and click yes on the error and then check the box. Does it check?
_________________
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


Last edited by Dark Byte on Thu May 18, 2023 5:24 pm; edited 2 times in total
Back to top
View user's profile Send private message MSN Messenger
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4197

PostPosted: Thu May 18, 2023 5:17 pm    Post subject: Reply with quote

If you cannot get the lua to work, then you may still be able to use pure assembly. Have you expanded that pointer and performed a comparative analysis to see if anything is viable?
Back to top
View user's profile Send private message
gaming04
Expert Cheater
Reputation: 0

Joined: 06 Dec 2010
Posts: 186

PostPosted: Sun May 28, 2023 12:46 pm    Post subject: Reply with quote

Dark Byte wrote:
that's just the initial syntaxchecl error. ignore it and click yes on the error and then check the box. Does it check?


Yes, the checkbox checks but the code does not work.

_________________
Life can be a blitz. What's right and wrong will fly right past you without you having to do a thing about it.

"Cheating only means you want to hold on to the things you value."
Back to top
View user's profile Send private message MSN Messenger
Dark Byte
Site Admin
Reputation: 457

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

PostPosted: Sun May 28, 2023 6:12 pm    Post subject: Reply with quote

print out info when you're not sure what goes wrong. It could be your address is wrong, the wrong register is used, etc...
e.g:
Code:

printf("base=%x  rttiname=%s result was %d",base, getRTTIClassName(base), result)

_________________
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
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