Process GameAssembly.dll and global.metadata.dll from runtime #861
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This is an enhancement on top of #611 as the previous pull request added submodules.
Il2CppDumper version 6.7.40
as nuget.This was done locally using js6pak/dotnet-link
Approval of this pull request will need to make krulci/Il2CppDumper@7e418fe as nuget
This feature can be enabled in config with
UseRuntimeAssemblies
optionApplicationData
as an option forIL2CPPInteropAssembliesPath
optionMotivation and Context
Il2CppInterop.Runtime+RuntimeModuleDump
will retrieveGameAssembly.dll
from current process handle after temporarily setting memory protection toexecute_read_write
. Memory protection will be restore to its original state after module memory is read.Il2CppInterop.Runtime+RuntimeModuleDump
will fix all sections so it can be processed byIl2CppDumper
.Il2CppInterop.Runtime+RuntimeModuleDump
will also extractglobal-metadata.dat
from current process handle.This feature is for games with
global-metadata.dat
embedded inGameAssembly.dll
.Il2CppDumper
to processList<Mono.Cecil.AssemblyDefinition>
sinceCpp2IL
is incompetent with memory dumped file.ApplicationData
was added to reduce the need of initialization toolchain rerun for environment whereBepInEx
is removed upon exit.MetadataSignatureToScan
andObfuscatedMetadataHeaderOffset
are a config entry that is supplied toIl2CppInterop.Runtime+RuntimeModuleDump
for pattern matching. Default value is a relative consistent value starts from offset 252 of multipleglobal-metadata.dat
investigated.MagicToFix
is a config entry that is supplied toIl2CppInterop.Runtime+RuntimeModuleDump
when the first 8 bytes ofglobal-metadata.dat
is obfuscated to determineglobal-metadata.dat
's version.How Has This Been Tested?
Tested with PrincessConnectReDive (JP)
Chainloader startup complete
Tested with Umamusume (JP)
Chainloader startup complete
Screenshots (if appropriate):
Types of changes
Checklist: