base adress of a dll process ?

Swift Games Accounts
  • This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.
  • ► You must register to download attachments!
Dec 6, 2012
Hello all,

I'm working on a trainer for Supreme Commander. This one is a little tricky to hack but it's okay, i write a asm code to be injected in the game code wich works perfectly in CE. The trainer is done but it's not work.

The reason is in cheat engine, when I look the code i want to modify, I see it stays in a dll process (MohoEngine.Moho::Sim::FlattenMapRect+227E7 from MohoEngine.dll i guess) and not inside "supremecommander.exe".

I try to look if the offset from the base adress of supremecommander.exe to MohoEngine.Moho::Sim::FlattenMapRect is static or not.... unfortunatly it changes verytime I start the game.

So there's a way to retrieve the base adress of this?


Dec 6, 2012
Hey there, if I understand your request correctly c5 just answered a similar question.

I believe you need to get the module address every time the game is started as I said c5 wrote something on that Check post #40

Apologies if this is not what your looking for im pretty tired and about to get some sleep.

rest well and have nice dreams ;)

and thanks for the link. ;)

So I found something, a code that returns the base adress of the dll associated with an exe (here :
You do not have permission to view link Log in or register now.
). This one found the Supremecommander.exe and the dll associated but NOT the mohoEngine.dll grrrrrr It seems that this dll was hidden or something.....
Dec 6, 2012
Direct link to my post

But if you already tried and couldn't get the address of the .dll, could it be that it wasn't just loaded yet?
Hello c5,

I check your code but my code is in c# and yours in c ++. Anyway, I check some ways to do it but it seems have abug somewhere, I got only some system dll names but never the good ones.....

So I remember and old asian wiseman says : "If U cannot take the mainroad, take the dusty little way..." And i found something ^^

To find the adress of the MohoEngine.dll I check in CE the dll's and the symbols (in menu "view"), i found :

SupremeCommander.exe : 0x00400000
MohoEngine.dll : 0xXXXXXXXX

HOHO! the adress of the dll ^^ so i search inside SupremeCommander.exe a addres who contains the 0xXXXXXXXX and I found directly some static adresse, after restarting the game 3-4 times, i see one static adress contains everytime the adress of the mohoengine.dll, GOT IT ^^

After that, i simply calculate the offset to go to the MohoEngine.Moho::Sim::FlattenMapRect function and and again the offset to reach the code i want to modify -> successfull ^^

And after i had to deal with asm but it was ok, the jumps from the original codes to the new memory and the jump back works good... I'm tired but happy the trainer works well, it makes the difference between the player and the ai player, max energy and mass works, it's ass-kicking time!!!!!!

Check the trainer section ^^

and thanks ;)



Kim Kong Trasher
Legacy Donator
Dank Tier VIP
Jul 19, 2012
Mankei Iland
Yeah, I didn't realize you are asking in c#. The code can be ported easily though. Glad you figured it out anyways :)