View previous topic :: View next topic |
Author |
Message |
mindoff Advanced Cheater Reputation: 0
Joined: 12 Jun 2016 Posts: 96
|
Posted: Sat Mar 18, 2017 10:33 pm Post subject: How to look up mono function with name like A+B:FunctionC? |
|
|
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 |
|
|
Dark Byte Site Admin Reputation: 457
Joined: 09 May 2003 Posts: 25262 Location: The netherlands
|
Posted: Sun Mar 19, 2017 3:23 am Post subject: |
|
|
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.
Like my help? Join me on Patreon so i can keep helping |
|
Back to top |
|
|
mindoff Advanced Cheater Reputation: 0
Joined: 12 Jun 2016 Posts: 96
|
Posted: Sun Mar 19, 2017 4:11 am Post subject: |
|
|
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 |
|
|
Dark Byte Site Admin Reputation: 457
Joined: 09 May 2003 Posts: 25262 Location: The netherlands
|
Posted: Sun Mar 19, 2017 8:49 pm Post subject: |
|
|
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.
Like my help? Join me on Patreon so i can keep helping |
|
Back to top |
|
|
mindoff Advanced Cheater Reputation: 0
Joined: 12 Jun 2016 Posts: 96
|
Posted: Mon Mar 20, 2017 8:51 pm Post subject: |
|
|
OK,solved,rock and roll now,Thanks,CE is the best!!!!
|
|
Back to top |
|
|
|