feat: Improved pointer safety and performance for better adaptability. Also updated the README.

- Improved and organized pointer safety.
- Removed old, unused fields from the config.
- Introduced RyuJinConfigInternal to separate internal fields not directly related to the exposed config, used only by the Ryujin core.
- Updated README.md.
This commit is contained in:
keowu
2025-07-26 22:16:21 -03:00
parent 487f061d6c
commit ffe6cb9655
7 changed files with 22 additions and 21 deletions

View File

@@ -8,24 +8,21 @@ RYUJINCORE_API BOOL __stdcall RunRyujinCore(const char* strInputFilePath, const
if (!strInputFilePath || !strPdbFilePath || !strOutputFilePath) return FALSE;
if (config.m_strdProceduresToObfuscate.empty()) {
std::vector<std::string> strProcsProcessed;
std::vector<std::string> strProcsProcessed;
strProcsProcessed.reserve(config.m_strProceduresToObfuscate.procedureCount);
strProcsProcessed.reserve(config.m_strProceduresToObfuscate.procedureCount);
for (int i = 0; i < config.m_strProceduresToObfuscate.procedureCount; ++i)
strProcsProcessed.emplace_back(config.m_strProceduresToObfuscate.procedures[i]);
for (int i = 0; i < config.m_strProceduresToObfuscate.procedureCount; ++i)
strProcsProcessed.emplace_back(config.m_strProceduresToObfuscate.procedures[i]);
config.m_strdProceduresToObfuscate.assign(strProcsProcessed.begin(), strProcsProcessed.end());
}
std::shared_ptr<RyuJinConfigInternal> ryujConfigInternal = std::make_shared<RyuJinConfigInternal>();
ryujConfigInternal->m_strdProceduresToObfuscate.assign(strProcsProcessed.begin(), strProcsProcessed.end());
std::unique_ptr<Ryujin> ryujin = std::make_unique<Ryujin>(strInputFilePath, strPdbFilePath, strOutputFilePath);
ryujin.get()->listRyujinProcedures();
ryujin.get()->run(config);
ryujin.get()->run(config, ryujConfigInternal);
ryujin.reset();