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 


call "GameCode"

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
KalasDev
Master Cheater
Reputation: 1

Joined: 29 May 2016
Posts: 311

PostPosted: Sun May 07, 2017 8:40 am    Post subject: call "GameCode" Reply with quote

I'm really confused, sunbeam told to "createthread" but I'm new to this and I don't understand how this code can be executed just by making a Script:

call TheForest.DebugConsole:_addAllItems

the Image of Mono Dissect:

http://fearlessrevolution.com/download/file.php?id=3012
Back to top
View user's profile Send private message
panraven
Grandmaster Cheater
Reputation: 54

Joined: 01 Oct 2008
Posts: 938

PostPosted: Sun May 07, 2017 10:00 am    Post subject: Reply with quote

The function signature is
private void _addAllItems(object o)
which has 2 input parameter, the not-shown this-ptr (of class DebugConsole), and object o.

For this particular function, it does not refer/used the this-ptr or object, so it seems can be called with for example null values instead.
But in general the input parameters of a function should be properly obtained and supply to the call.

Code:

globalalloc(_minimum,256)

_minimum:
xor   eax,eax
push  eax   ///  the Object o parameter, but not used
push  eax   ///  DebugConsole Instance ptr, but not used
mov   eax,"TheForest:DebugConsole:_addAllItems"
call  eax
add   esp,8 /// restore stack
ret

createthread(_minimum)


Also see
http://forum.cheatengine.org/viewtopic.php?t=604041
for the possible need of thread attaching.

bye~

_________________
- Retarded.
Back to top
View user's profile Send private message
STN
I post too much
Reputation: 41

Joined: 09 Nov 2005
Posts: 2672

PostPosted: Sun May 07, 2017 10:01 am    Post subject: Reply with quote

Please be considerate and don't use the site as image hoster (it doesn't have the server capability to support that. I replaced the image on FRF with imgur (can't delete the image for some reason).

Thank you

_________________
Cheat Requests/Tables- Fearless Cheat Engine
https://fearlessrevolution.com
Back to top
View user's profile Send private message
KalasDev
Master Cheater
Reputation: 1

Joined: 29 May 2016
Posts: 311

PostPosted: Sun May 07, 2017 11:07 am    Post subject: Reply with quote

panraven wrote:
The function signature is
private void _addAllItems(object o)
which has 2 input parameter, the not-shown this-ptr (of class DebugConsole), and object o.

For this particular function, it does not refer/used the this-ptr or object, so it seems can be called with for example null values instead.
But in general the input parameters of a function should be properly obtained and supply to the call.

Code:

globalalloc(_minimum,256)

_minimum:
xor   eax,eax
push  eax   ///  the Object o parameter, but not used
push  eax   ///  DebugConsole Instance ptr, but not used
mov   eax,"TheForest:DebugConsole:_addAllItems"
call  eax
add   esp,8 /// restore stack
ret

createthread(_minimum)


Also see
http://forum.cheatengine.org/viewtopic.php?t=604041
for the possible need of thread attaching.

bye~


Sorry I'm really new at this, but what you posted is basically it? do I need to add anything else?
Back to top
View user's profile Send private message
panraven
Grandmaster Cheater
Reputation: 54

Joined: 01 Oct 2008
Posts: 938

PostPosted: Sun May 07, 2017 11:50 am    Post subject: Reply with quote

It is an AA script in a memory record, may be an [ENABLE] tag?
Code:

[ENABLE]
... previous script


I guess the main different against an injection script generated from CE template is the AA command
createThread(address) ;
Code:

CE help:
CREATETHREAD(address) :Will spawn a thread in the process at the specified address

Without the command, the script will not be executed, since it is not in any normal execution paths of the game process.

btw, the mono symbolic function address is like this:
namesapce:className:functionName (may need double quote in some case, "namespace:" may omitted if for default namespace)
Not to confused with DotNet symbolic function address,
name.space.path.className::functionName (double :Smile

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