Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

[HELP] Compiled GetMainInfo prevents opening main.exe (MUEMU S6)

Newbie Spellweaver
Joined
Jul 22, 2020
Messages
11
Reaction score
0
Hello ppl

I'm having a hard time trying to build with custom sources, everytime I make any change in GetMainInfo struct "MAIN_FILE_INFO", the generated main.emu prevents the game starting. The very first time I got this error, I was trying to add custom rf gloves, and the game stopped working just after declaring "CUSTOM_RF_GLOVES CustomGloves[MAX_CUSTOM_GLOVES]", even before loading the "CustomGloves.txt". So I tried adding a simple and unused variable for testing purposes, and turns out that changes in any struct included ("MAIN_FILE_INFO", "CUSTOM_JEWEL_INFO", "CUSTOM_WING_INFO", etc) will prevent the game from opening. I already downloaded another main.exe, but it's date is prior to mine, and it whould not even start the game without changing the structs. Thing is, building the main.dll (with custom sources) and the standard GetMainInfo (without custom sources) seems to work good.
Sem título - [HELP] Compiled GetMainInfo prevents opening main.exe (MUEMU S6) - RaGEZONE Forums


Has anyone had similar issues? Also just doing the includes seems to work fine, but as soon changing the struct, the game stops opening. I'm trying make my own files, because I think files are too much polluted these days. Ty in advance!

Edit:

Something I noticed: In my files (emu source) there is an address that is different from other sources with customs, but changing it "0xDA" prevents the game start without any customs. Can this be related?
Sem título1 - [HELP] Compiled GetMainInfo prevents opening main.exe (MUEMU S6) - RaGEZONE Forums
 

Attachments

You must be registered for see attachments list
Last edited:
Joined
Oct 8, 2006
Messages
743
Reaction score
290
Decryption for reading the main.emu content should have the same keys.
Check reading the data and writing the data from/to main.emu file.
C++:
//Writing the data to main.emu from GetMainInfo
for(int n=0;n < sizeof(MAIN_FILE_INFO);n++)
{
    ((BYTE*)&info)[n] ^= (BYTE)(0xDA^LOBYTE(n));
    ((BYTE*)&info)[n] -= (BYTE)(0x95^HIBYTE(n));
}


//Reading the main.emu file from client's DLL
for(int n=0;n < sizeof(MAIN_FILE_INFO);n++)
{
    ((BYTE*)&this->m_MainInfo)[n] += (BYTE)(0x95^HIBYTE(n));
    ((BYTE*)&this->m_MainInfo)[n] ^= (BYTE)(0xDA^LOBYTE(n));
}
 
Upvote 0
Newbie Spellweaver
Joined
Jul 22, 2020
Messages
11
Reaction score
0
Decryption for reading the main.emu content should have the same keys.
Check reading the data and writing the data from/to main.emu file.
C++:
//Writing the data to main.emu from GetMainInfo
for(int n=0;n < sizeof(MAIN_FILE_INFO);n++)
{
    ((BYTE*)&info)[n] ^= (BYTE)(0xDA^LOBYTE(n));
    ((BYTE*)&info)[n] -= (BYTE)(0x95^HIBYTE(n));
}


//Reading the main.emu file from client's DLL
for(int n=0;n < sizeof(MAIN_FILE_INFO);n++)
{
    ((BYTE*)&this->m_MainInfo)[n] += (BYTE)(0x95^HIBYTE(n));
    ((BYTE*)&this->m_MainInfo)[n] ^= (BYTE)(0xDA^LOBYTE(n));
}

Yeah, they are matching. Didn't knew it was just a key, so unfortunately, looks like it's not related (since building without customs runs good). Any thougth on what could prevent main.exe opening?
 
Upvote 0
Joined
Oct 8, 2006
Messages
743
Reaction score
290
Yeah, they are matching. Didn't knew it was just a key, so unfortunately, looks like it's not related (since building without customs runs good). Any thougth on what could prevent main.exe opening?
Yes, it could be bad format when you load the config files. Also, make sure you debug the GetMainInfo and make sure the configs are loaded correctly without errors when you generate the main.emu. As far as I know, the main.emu generator can run by default even if one loaded file is bad. Also, the class size/struct size must be exactly the size of GetMainInfo structs in both client source and GetMainInfo source, cause that would represent a bad memory copy when creating that class object for the config file. By size, I mean, the correct attributes in size which that class is having, so you can't have a class which is missing a single byte in GetMainInfo source, but existing in client source, and vice-versa.
The loading of configs is determined by sizes of structs/classes. Even the main.emu class (MAIN_FILE_INFO) must be of the exact size in attributes, otherwise it will not load the main.emu file cause of the bad size of it. (Can't copy a 12 bytes class into 8 bytes class => overflowing. You can load 8 bytes into a 12 bytes class, but it's gonna have a missing byte which can lead to bad memory copy of incorrect data from the file).
 
Last edited:
Upvote 0
Newbie Spellweaver
Joined
Jul 22, 2020
Messages
11
Reaction score
0
The weird thing about it is that even with the class and struct declared on the main.dll source, the game will only open without changing on GetMainInfo MAIN_INFO. The game runs good with the class on main.dll, but as soon as there are any changes on it, it no longer opens. I'm leaving links for download of my client and my sources, if you could please kindly take you time and review it for me, I would appreciate very much.
And the fact that the main.emu file become 1kb bigger with the custom source seems to me that the custom classe is saved in the file.

Client:
Main_info + sources:

on the main_info folder there are 2 applications, one with the STD suffix, meaning it was compiled without changes on the MAIN_FILE_INFO, wich runs good. But feel free to compile commenting the custom gloves source to see what i mean.
Thank you very much for your attention
 
Upvote 0
Back
Top