Removed security & anti-cheat measures
This commit is contained in:
@ -25,10 +25,6 @@
|
||||
#include "../EterBase/Debug.h"
|
||||
#include "../EterBase/CRC32.h"
|
||||
|
||||
#ifdef __THEMIDA__
|
||||
#include <ThemidaSDK.h>
|
||||
#endif
|
||||
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
|
||||
@ -585,10 +581,6 @@ bool CEterPack::Get(CMappedFile& out_file, const char * filename, LPCVOID * data
|
||||
}
|
||||
else if (COMPRESSED_TYPE_HYBRIDCRYPT == index->compressed_type || COMPRESSED_TYPE_HYBRIDCRYPT_WITHSDB == index->compressed_type)
|
||||
{
|
||||
#ifdef __THEMIDA__
|
||||
VM_START
|
||||
#endif
|
||||
|
||||
CLZObject * zObj = new CLZObject;
|
||||
|
||||
if( !m_pCSHybridCryptPolicy->DecryptMemory( std::string(filename), static_cast<const BYTE*>(*data), index->data_size, *zObj) )
|
||||
@ -613,9 +605,6 @@ bool CEterPack::Get(CMappedFile& out_file, const char * filename, LPCVOID * data
|
||||
{
|
||||
*data = zObj->GetBuffer();
|
||||
}
|
||||
#ifdef __THEMIDA__
|
||||
VM_END
|
||||
#endif
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@ -698,10 +687,6 @@ bool CEterPack::Get2(CMappedFile& out_file, const char * filename, TEterPackInde
|
||||
}
|
||||
else if (COMPRESSED_TYPE_HYBRIDCRYPT == index->compressed_type || COMPRESSED_TYPE_HYBRIDCRYPT_WITHSDB == index->compressed_type)
|
||||
{
|
||||
#ifdef __THEMIDA__
|
||||
VM_START
|
||||
#endif
|
||||
|
||||
CLZObject * zObj = new CLZObject;
|
||||
|
||||
if( !m_pCSHybridCryptPolicy->DecryptMemory( std::string(filename), static_cast<const BYTE*>(*data), index->data_size, *zObj) )
|
||||
@ -727,9 +712,6 @@ bool CEterPack::Get2(CMappedFile& out_file, const char * filename, TEterPackInde
|
||||
{
|
||||
*data = zObj->GetBuffer();
|
||||
}
|
||||
#ifdef __THEMIDA__
|
||||
VM_END
|
||||
#endif
|
||||
}
|
||||
|
||||
return true;
|
||||
@ -810,9 +792,6 @@ bool CEterPack::Extract()
|
||||
}
|
||||
else if (COMPRESSED_TYPE_HYBRIDCRYPT == index->compressed_type || COMPRESSED_TYPE_HYBRIDCRYPT_WITHSDB == index->compressed_type)
|
||||
{
|
||||
#ifdef __THEMIDA__
|
||||
VM_START
|
||||
#endif
|
||||
if( !m_pCSHybridCryptPolicy->DecryptMemory( std::string(index->filename), (const BYTE *) data + index->data_position, index->data_size, zObj) )
|
||||
return false;
|
||||
|
||||
@ -834,9 +813,6 @@ bool CEterPack::Extract()
|
||||
writeFile.Write(zObj.GetBuffer(), zObj.GetBufferSize());
|
||||
}
|
||||
zObj.Clear();
|
||||
#ifdef __THEMIDA__
|
||||
VM_END
|
||||
#endif
|
||||
}
|
||||
else if (COMPRESSED_TYPE_NONE == index->compressed_type)
|
||||
writeFile.Write((const char *) data + index->data_position, index->data_size);
|
||||
@ -891,9 +867,6 @@ bool CEterPack::Put(const char * filename, const char * sourceFilename, BYTE pac
|
||||
|
||||
if( packType == COMPRESSED_TYPE_HYBRIDCRYPT || packType == COMPRESSED_TYPE_HYBRIDCRYPT_WITHSDB )
|
||||
{
|
||||
#ifdef __THEMIDA__
|
||||
VM_START
|
||||
#endif
|
||||
m_pCSHybridCryptPolicy->GenerateCryptKey( std::string(filename) );
|
||||
|
||||
if( packType == COMPRESSED_TYPE_HYBRIDCRYPT_WITHSDB )
|
||||
@ -903,9 +876,6 @@ bool CEterPack::Put(const char * filename, const char * sourceFilename, BYTE pac
|
||||
return false;
|
||||
}
|
||||
}
|
||||
#ifdef __THEMIDA__
|
||||
VM_END
|
||||
#endif
|
||||
}
|
||||
|
||||
return Put(filename, pMappedData, iMappedDataSize, packType);
|
||||
@ -994,10 +964,6 @@ bool CEterPack::Put(const char * filename, LPCVOID data, long len, BYTE packType
|
||||
}
|
||||
else if (packType == COMPRESSED_TYPE_HYBRIDCRYPT || packType == COMPRESSED_TYPE_HYBRIDCRYPT_WITHSDB )
|
||||
{
|
||||
#ifdef __THEMIDA__
|
||||
VM_START
|
||||
#endif
|
||||
|
||||
if( !m_pCSHybridCryptPolicy->EncryptMemory( std::string(filename), (const BYTE *)data, len, zObj ) )
|
||||
{
|
||||
return false;
|
||||
@ -1005,10 +971,6 @@ bool CEterPack::Put(const char * filename, LPCVOID data, long len, BYTE packType
|
||||
|
||||
data = zObj.GetBuffer();
|
||||
len = zObj.GetBufferSize();
|
||||
#ifdef __THEMIDA__
|
||||
VM_END
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user