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 


How to look up mono function with name like A+B:FunctionC?

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

Joined: 12 Jun 2016
Posts: 36

PostPosted: Sat Mar 18, 2017 10:33 pm    Post subject: How to look up mono function with name like A+B:FunctionC? Reply with quote

I found some function need to modify in Mono dissector dispayed as
SuffocationMonitor+Instance >> methods >> IsFullBreath

The function displayed in Memory Viewer is
Instance:IsFullBreath

So I'm trying to lookup like
Code:

{$lua}
LaunchMonoDataCollector()
mono_symbolLookupCallback("Instance:IsFullBreath")

not working,won't compile the lua

then I try to call like this

Code:

{$lua}
LaunchMonoDataCollector()
mono_symbolLookupCallback("SuffocationMonitor:Instance:IsFullBreath")


and

Code:

{$lua}
LaunchMonoDataCollector()
mono_symbolLookupCallback("SuffocationMonitor+Instance:IsFullBreath")


Still not working,can't compile lua

So how can I lookup function like this struct correctly?
Any example?

And by the way,the game name is Oxygen Not Included

The full AA I'm trying to write is like
Code:

{$lua}
LaunchMonoDataCollector()
mono_symbolLookupCallback("SuffocationMonitor+Instance:IsFullBreath")

{$asm}
define(InfBreath_Entry, "SuffocationMonitor+Instance:IsFullBreath"+13)
define(InfBreath_bytes, F3 0F 10 40 48)

[ENABLE]
assert(InfBreath_Entry, InfBreath_bytes)
globalalloc(InfBreath_Code,0x1000)

InfBreath_Code:
mov [rax+48], (float)100.0
movss xmm0,[rax+48]

jmp InfBreath_Exit

InfBreath_Entry:
jmp InfBreath_Code

InfBreath_Exit:

[DISABLE]
InfBreath_Entry:
db InfBreath_bytes
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 332

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

PostPosted: Sun Mar 19, 2017 3:23 am    Post subject: Reply with quote

could be a parser issue or even deeper.
see if you can find it with the lower level mono api's. (check monoscript. lua for those functions)
mainly get the class, and then search the method inside the class. (and in worst case scenario jusy enumerate all classes till you find SuffocationMonitor+Instance or whatever it's real name is

_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Back to top
View user's profile Send private message MSN Messenger
mindoff
Cheater
Reputation: 0

Joined: 12 Jun 2016
Posts: 36

PostPosted: Sun Mar 19, 2017 4:11 am    Post subject: Reply with quote

I think the name is OK,but I don't know how lua compile with it.
The code I found can be presented as C# like this.

Code:

public class SuffocationMonitor : GameStateMachine<SuffocationMonitor, SuffocationMonitor.Instance>
{
   public new class Instance : GameStateMachine<SuffocationMonitor, SuffocationMonitor.Instance, IStateMachineTarget>.GameInstance
   {
      public bool IsFullBreath()
      {
         return this.breath.value == this.breath.GetMax();
      }
   }
}


And the new keyword means hiding some method

http://stackoverflow.com/questions/1014295/new-keyword-in-method-signature
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 332

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

PostPosted: Sun Mar 19, 2017 8:49 pm    Post subject: Reply with quote

I'm talking about monoscript.lua

it has some functions you can use to enumerate the classes
Code:

mono_enumAssemblies()
mono_getImageFromAssembly(assembly)
mono_image_enumClasses(image)
mono_class_enumMethods(class)


just look at monoscript.lua on how to use these.

_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Back to top
View user's profile Send private message MSN Messenger
mindoff
Cheater
Reputation: 0

Joined: 12 Jun 2016
Posts: 36

PostPosted: Mon Mar 20, 2017 8:51 pm    Post subject: Reply with quote

OK,solved,rock and roll now,Thanks,CE is the best!!!! Very Happy
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