feat: Improve Custom Pass feature code, docs, and demos

- Improved the Custom Pass code to align with Ryujin coding standards.
- Added clear and helpful comments for better understanding of how RyujinCustomPassDemo works.
- Improved README.md for better structure and readability as user-facing documentation.
- Updated demo images for Ryujin and added more visual examples.
This commit is contained in:
keowu
2025-07-27 11:10:32 -03:00
parent 64cdfe6e71
commit d8c37b2d4c
5 changed files with 87 additions and 8 deletions

View File

@@ -2439,6 +2439,21 @@ BOOL RyujinObfuscationCore::Run(bool& RyujinRunOncePass) {
}
// Checking if we have any user-registered callbacks
if (m_config.m_callbacks.callbackCount > 0)
// Iterating over each registered callback
for (auto i = 0; i < m_config.m_callbacks.callbackCount; i++)
// If it's a valid address
if (m_config.m_callbacks.callbacks[i]) {
// We invoke the callback, passing the m_proc instance by reference to allow user modifications.
m_config.m_callbacks.callbacks[i](&m_proc);
// We update the Basic Blocks context to stay 1:1 with the user's modifications.
this->updateBasicBlocksContext();
}
if (RyujinRunOncePass) {
if (this->m_config.m_isMemoryProtection && (!this->m_config.m_isAntiDump || !this->m_config.m_isEncryptObfuscatedCode || !this->m_config.m_isRandomSection)) {
@@ -2455,11 +2470,6 @@ BOOL RyujinObfuscationCore::Run(bool& RyujinRunOncePass) {
}
if (m_config.m_callbacks.callbackCount > 0)
for (int i = 0; i < m_config.m_callbacks.callbackCount; i++)
if (m_config.m_callbacks.callbacks[i])
m_config.m_callbacks.callbacks[i](&m_proc);
return TRUE;
}