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 


Finding static address in Cemu

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

Joined: 31 Oct 2022
Posts: 7

PostPosted: Mon Oct 31, 2022 7:07 am    Post subject: Finding static address in Cemu Reply with quote

I'm new to cheat engine and learning it with using Cemu Emulator.

In Monster Hunter 3 Ultimate, I am trying to find static address for monster's HP.
In this case, the address [r13+rsi+000008B8] has monster's HP.
I figured out r13 is based address so if the value of rsi is fixed it's very easy to find locate HP's address.
However rsi is changing every time I reboot the game.
So I searched address 2FD106F0 and it has three results.
But there are no static address. So I can't figure out what value rsi has every launching the game.

Any clues to solve this issue?
Sorry for my bad English.

1E695D8AB51 - movbe [r13+rsi+000008B8],edx

RAX=00000BE0
RBX=FFFFFFFB
RCX=2FD111C8
RDX=00000B5C
RSI=2FD106F0
RDI=000000FF
RBP=0E232D78
RSP=1E677A10B10
RIP=1E695D8AB5B

Probable base pointer =2FD106F0

1E695D8AB41 - setg byte ptr [rsp+0000028D]
1E695D8AB49 - sete byte ptr [rsp+0000028E]
1E695D8AB51 - movbe [r13+rsi+000008B8],edx
1E695D8AB5B - jns 1E695D8AB7D
1E695D8AB5D - nop dword ptr [rax+00]

Edit:
1.pointer scans did not work. There no results (maybe because Cemu emulator is big endian?)

2.There are lots of examples to find static address and most of them is
["based address" + offset] (like [edx + F8])
However I could not find the examples of the pattern of having 2 registers + offset such as [eax+rsi+000008B8]. I would like to know how to handle of this pattern.
Back to top
View user's profile Send private message
Bloodybone
Newbie cheater
Reputation: 0

Joined: 07 Dec 2016
Posts: 21
Location: Germany

PostPosted: Mon Oct 31, 2022 2:40 pm    Post subject: Reply with quote

Something that seems to work for me with Cemu is calling "Cemu.memory_getBase" and using that value as the Base Address.

In lua I would then write something like this:
CemuMemoryBase = executeCode(getAddress("Cemu.memory_getBase"),0,2000)

And then the Lua Global "CemuMemoryBase" would hold the Base Address.
You can then take whatever address you have subtact the Base from that, take the Offset and add it to the Table.

Example:
Base = 2FD00000(returned from the function)
Address I have = 2FD106F0
2FD106F0 - 2FD00000 = 106F0(Offset)

I would then add the Address "$CemuMemoryBase+106F0" to the Table

Edit:
I would just add a Script that has to be enabled first which would have something like this inside:
Code:
[ENABLE]
{$lua}
if syntaxcheck then return end
CemuMemoryBase = executeCode(getAddress("Cemu.memory_getBase"),0,2000)
[DISABLE]
Back to top
View user's profile Send private message
mitosu7410
How do I cheat?
Reputation: 0

Joined: 31 Oct 2022
Posts: 7

PostPosted: Mon Oct 31, 2022 9:29 pm    Post subject: Reply with quote

Bloodybone wrote:
Something that seems to work for me with Cemu is calling "Cemu.memory_getBase" and using that value as the Base Address.

In lua I would then write something like this:
CemuMemoryBase = executeCode(getAddress("Cemu.memory_getBase"),0,2000)

And then the Lua Global "CemuMemoryBase" would hold the Base Address.
You can then take whatever address you have subtact the Base from that, take the Offset and add it to the Table.

Example:
Base = 2FD00000(returned from the function)
Address I have = 2FD106F0
2FD106F0 - 2FD00000 = 106F0(Offset)

I would then add the Address "$CemuMemoryBase+106F0" to the Table

Edit:
I would just add a Script that has to be enabled first which would have something like this inside:
Code:
[ENABLE]
{$lua}
if syntaxcheck then return end
CemuMemoryBase = executeCode(getAddress("Cemu.memory_getBase"),0,2000)
[DISABLE]



I tried that and seemed to work.
However sometimes the offset changes so I cannot locate HP's address correctly.
I think the address that manages monster's HP and something like that is dynamic address and the game allocates memory with structure or that kind of thing (that holds monster's information) when I go to quests.

How can I find the address to the structure?

Edit
When I tried to find the offset with this method, the offsets are below.
First time launching the game: 2FD1 0F98
Second time: 2FD1 0F98
Third time: 2FD1 0FB8

First and second time were the same offset so I could find HP's address.
However when I launched the game for the third time the offset slightly changed so this method did not work.
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 470

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

PostPosted: Tue Nov 01, 2022 1:05 am    Post subject: Reply with quote

try this:
find the address you're looking for (2FD10F98)
do an unknown initial value scan (big endian type likely)

play until the address changes and find it again (do a second scantab)

e.g: 2FD10FB8

so a difference of 0x20 (32)
go to the tab where you did an unknown initial value scan and scan for increase by 32

repeat until you have a decent idea where the pointer is located

get the offset from the base and apply that to the formula to get the hp address

[base+pointeroffset]=virtual address inside the game
base+that virtual address+small offset you have to calculate=address of hp

_________________
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
mitosu7410
How do I cheat?
Reputation: 0

Joined: 31 Oct 2022
Posts: 7

PostPosted: Tue Nov 01, 2022 3:07 am    Post subject: Reply with quote

Dark Byte wrote:
try this:
find the address you're looking for (2FD10F98)
do an unknown initial value scan (big endian type likely)

play until the address changes and find it again (do a second scantab)

e.g: 2FD10FB8

so a difference of 0x20 (32)
go to the tab where you did an unknown initial value scan and scan for increase by 32

repeat until you have a decent idea where the pointer is located

get the offset from the base and apply that to the formula to get the hp address

[base+pointeroffset]=virtual address inside the game
base+that virtual address+small offset you have to calculate=address of hp


Thank you!! That worked very well!!

I found static address that stores "virtual address" and I want to use "virtual address" as an offset but cheat engine treats it as little endian so the address is messed up. How can I handle of it?

example:
Address A →value 2FD0EB80 stored as big endian (virtual address)
Use address A as a pointer but outputs like "80EBD02F"
Back to top
View user's profile Send private message
SotiCoto
Newbie cheater
Reputation: 0

Joined: 21 Oct 2017
Posts: 10

PostPosted: Wed Oct 02, 2024 12:23 pm    Post subject: Reply with quote

I also am desperate for a solution to this problem.

Also I found this thread a few days ago and have had immense difficulty just finding my way back to it... damned search engines.


There are quite a few topics on this and other boards about using CE for MH3U in Cemu... but most of them end either with no reply, or with the question asker vaguely replying that they figured it out themselves and not bothering to explain what they did.

I don't know any Lua script / AoB Scan stuff, and frankly I haven't been able to figure out how it works from looking at (non-working) tables people have already made for Cemu+MH3U.


In my case I'm trying to lock the stamina bar.
I know the offset. That is 648.
The R13 is set every time I boot up Cemu... and the other address changes every time I step out of Moga Village into the wilds...

Presumably I need to figure out how to script something to find the Base address (the R13) and the other address (the one that changes when leaving Moga) and combine them into some aliased variable that I could reference in a pointer... but I can't figure out how to do that.
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