panraven Grandmaster Cheater
Reputation: 62
Joined: 01 Oct 2008 Posts: 958
|
Posted: Sat Dec 31, 2016 10:12 am Post subject: |
|
|
@"... 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. |
|