Newbie Spellweaver
- Joined
- Jul 22, 2020
- Messages
- 11
- Reaction score
- 0
//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));
}
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)); }
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.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?