Skip to content

Deterministic Postload#2

Open
SirCxyrtyx wants to merge 2 commits into
ME3Tweaks:mainfrom
SirCxyrtyx:main
Open

Deterministic Postload#2
SirCxyrtyx wants to merge 2 commits into
ME3Tweaks:mainfrom
SirCxyrtyx:main

Conversation

@SirCxyrtyx

Copy link
Copy Markdown
Member

By hooking a function in the activator dll that is called after decryption and directly before it calls Winmain in the exe, we can ensure postload asis are able to hook functions prior to any MassEffect{1|2|3}.exe code is run.

Comment thread src/dllmain.cpp
if (!GLEBinkProxy.AsiLoader->Activate())
{
GLogger.writeln(L"OnAttach: ERROR: loading of one or more ASI plugins failed!");
return false;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if an ASI mod fails to load we should probably skip it, not abort, otherwise one bad ASI will ruin the rest, like some of our older ASIs

Comment thread src/drm.cpp
GLogger.writeln(L"InstallDRMv4Hook: ERROR: failed to install post-drm hook (code = %d).", static_cast<int>(spiReturn));
return;
}
GLogger.writeln(L"InstallDRMv4Hook: successfully installed hook on Activation64.dll.");

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this work on DRM-free executables? Is Actionvation64 used?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably not. I could have it fall back to the old method if Activation64.dll is not found.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants