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 


Cheat Engine mono's JIT functionality

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
rujohn
How do I cheat?
Reputation: 0

Joined: 16 Jul 2014
Posts: 5

PostPosted: Sat Dec 31, 2016 8:55 am    Post subject: Cheat Engine mono's JIT functionality Reply with quote

Hi, I was wondering how does the JIT function works.
Does the mono.dll contains in it address of function for every name in the structures?
Can it work also on class fields (or atleast get the offset)?

Thanks
Back to top
View user's profile Send private message
panraven
Grandmaster Cheater
Reputation: 62

Joined: 01 Oct 2008
Posts: 958

PostPosted: Sat Dec 31, 2016 10:12 am    Post subject: Reply with quote

@"... how does the JIT function works.
Does the mono.dll contains in it address of function for every name in the structures? "

There are api exposed in mono.dll to do variate function.

You can check cheat engine source, for example, enter search "mono_jit_info_get_method"
at git https://github.com/cheat-engine/cheat-engine/search?utf8=%E2%9C%93&q=mono_jit_info_get_method and look for the *.cpp.

To lookup what the api actually do, may search its source (eg. https://github.com/mono/mono/blob/master/mono/metadata/jit-info.c ),
but heard that unity use a older/custom mono.dll. Anyway, I find this convenient on navigating the api/struct thing:
http://code.metager.de/source/search?q=mono_jit_info_get_method&project=mono


@"Can it work also on class fields (or atleast get the offset)? "

In CE AA script, it may be a simple job:

step::

Code:

1/ know the 'NameSpace' and 'ClassName' of the target class

2/ in AA, to enable mono data collector, use this command:
  useMono() 

3/ to obtain INSTANCE field OFFSET of the target class, use one of these command:
  a/ getMonoStruct(ClassName) // if 'NameSpace' is Defalut or unnamed
  b/ getMonoStruct(symbol,NameSpace:ClassName) // this is format 2, when namespace is necessary to refer the class.
  c/  getMonoStruct(symbol,:ClassName) // this is to use format 2 when 'NameSpace' is Defalut or unnamed, may be necessary when need 2 or more structure but may cause field name clashing.

4/ if command 3 execute successfully, a ce AA script structure will be defined as

structure symbol
field1: resb 4
field2: resb 8 // depend on the field type
...
fieldN: resb 4
ends

  you can then use the field off set in asm instruct as:
  mov  edi,[ebp+08] // get instance this pointer
  mov  eax,[edi+MaxHealth] // if no name clashing
  mov  eax,[edi+playerControl.MaxHealth] // if there may be name clashing, the symbol of structure (playerControl) part is needed.


note that ce mono feature may conflict with some debug function (I don't know the exact cause and effect)

note2: for static field, a script may be generated from the mono-explorer(?, menu/MONO/mono dissect) by right-click on the static field.

bye~

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