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 know which method is calling another one?

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

Joined: 29 Jun 2023
Posts: 6

PostPosted: Thu Jun 29, 2023 10:59 am    Post subject: How to know which method is calling another one? Reply with quote

Im using Mono Dissector and id like to know if theres a way to know which method is calling another one.
Back to top
View user's profile Send private message
LeFiXER
Grandmaster Cheater Supreme
Reputation: 20

Joined: 02 Sep 2011
Posts: 1069
Location: 0x90

PostPosted: Thu Jun 29, 2023 12:41 pm    Post subject: Reply with quote

Jit the method, set a bp (breakpoint. You can use F5 to set one on the selected line) on the ret opcode at the end of the function. When it triggers press F7 to step-in. This will return to the function that called it.
Back to top
View user's profile Send private message
DjRatmanIsBack
How do I cheat?
Reputation: 0

Joined: 29 Jun 2023
Posts: 6

PostPosted: Thu Jun 29, 2023 12:54 pm    Post subject: Reply with quote

LeFiXER wrote:
Jit the method, set a bp (breakpoint. You can use F5 to set one on the selected line) on the ret opcode at the end of the function. When it triggers press F7 to step-in. This will return to the function that called it.


There is no ret at the end of the method, it jumps to another method but i want the one who is calling the first.
Back to top
View user's profile Send private message
LeFiXER
Grandmaster Cheater Supreme
Reputation: 20

Joined: 02 Sep 2011
Posts: 1069
Location: 0x90

PostPosted: Thu Jun 29, 2023 4:05 pm    Post subject: Reply with quote

The jump instruction will direct you to the function that called it.
Back to top
View user's profile Send private message
DjRatmanIsBack
How do I cheat?
Reputation: 0

Joined: 29 Jun 2023
Posts: 6

PostPosted: Thu Jun 29, 2023 4:52 pm    Post subject: Reply with quote

LeFiXER wrote:
The jump instruction will direct you to the function that called it.


This is what is happening:

I can not create a server with +4 players, when trying it i get an error message saying that the limit is 4.

I go to the method called 'LobbyControler.FailedCreatingServer' and at the end of the method i see a line that says: jmp MainManager.SendError but this is not the one that is calling to the first one.

I want to find the method that has 4 as a limit and when trying to increase that numbers, it jumps to LobbyController.FailedCreatingServer
Back to top
View user's profile Send private message
LeFiXER
Grandmaster Cheater Supreme
Reputation: 20

Joined: 02 Sep 2011
Posts: 1069
Location: 0x90

PostPosted: Thu Jun 29, 2023 5:06 pm    Post subject: Reply with quote

The address of RIP will hold the address that called the function also.
Back to top
View user's profile Send private message
DjRatmanIsBack
How do I cheat?
Reputation: 0

Joined: 29 Jun 2023
Posts: 6

PostPosted: Fri Jun 30, 2023 4:57 am    Post subject: Reply with quote

LeFiXER wrote:
The address of RIP will hold the address that called the function also.


When setting a breakpoint on LobbyController.OnCreateRoomFailed the RIP register returns the same address of LobbyController.OnCreateRoomFailed
Back to top
View user's profile Send private message
LeFiXER
Grandmaster Cheater Supreme
Reputation: 20

Joined: 02 Sep 2011
Posts: 1069
Location: 0x90

PostPosted: Fri Jun 30, 2023 6:32 am    Post subject: Reply with quote

DjRatmanIsBack wrote:

When setting a breakpoint on LobbyController.OnCreateRoomFailed the RIP register returns the same address of LobbyController.OnCreateRoomFailed


But you said you were initially in the function LobbyControler.FailedCreatingServer. That's a different function that you mention.
Back to top
View user's profile Send private message
DjRatmanIsBack
How do I cheat?
Reputation: 0

Joined: 29 Jun 2023
Posts: 6

PostPosted: Fri Jun 30, 2023 7:07 am    Post subject: Reply with quote

LeFiXER wrote:
DjRatmanIsBack wrote:

When setting a breakpoint on LobbyController.OnCreateRoomFailed the RIP register returns the same address of LobbyController.OnCreateRoomFailed


But you said you were initially in the function LobbyControler.FailedCreatingServer. That's a different function that you mention.


I wrote FailedCreatingServer because i wasnt in the PC and i didnt remember the exact name XD anyway, its returning the same address.
Back to top
View user's profile Send private message
LeFiXER
Grandmaster Cheater Supreme
Reputation: 20

Joined: 02 Sep 2011
Posts: 1069
Location: 0x90

PostPosted: Fri Jun 30, 2023 7:29 am    Post subject: Reply with quote

You can try break and trace.
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 471

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

PostPosted: Fri Jun 30, 2023 8:11 am    Post subject: Reply with quote

Enable IPT logging and set a breakpoint at the function start
Then check the ipt log backtrace to see how it got there
(requires Intel cpu and windows 10 or later)

_________________
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
View user's profile Send private message MSN Messenger
DjRatmanIsBack
How do I cheat?
Reputation: 0

Joined: 29 Jun 2023
Posts: 6

PostPosted: Fri Jun 30, 2023 12:19 pm    Post subject: Reply with quote

Dark Byte wrote:
Enable IPT logging and set a breakpoint at the function start
Then check the ipt log backtrace to see how it got there
(requires Intel cpu and windows 10 or later)



It shows 22.000 calls. Is there any way to just get the beginning of the methods that are calling? because it shows the whole lines of all the methods.
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 471

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

PostPosted: Fri Jun 30, 2023 4:05 pm    Post subject: Reply with quote

the last instruction in the list is very likely the method call/jmp that brought you to that method

As for the start of the methods, assuming mono is enabled the addresses should have mono method names

_________________
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
View user's profile Send private message MSN Messenger
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