Commit Graph
243 Commits
Author SHA1 Message Date
ghorsington 39b84a2b4e Remove remaining "unhollow" wording 2022-08-14 17:19:09 +03:00
ghorsington 9e87075129 Use new version handler for Il2CppInteropManager 2022-08-14 17:19:09 +03:00
ghorsington 579ee8511b Add extended Unity version resolver; reorganise projects
The new resolver resides in BepInEx.Unity.Core
The resolver is based on multiple heuristics and integrates all workarounds we currently use so this shouldn't be a breaking change
2022-08-14 17:19:09 +03:00
ghorsington 828ef20996 UnityMono: Resolve assemblies into memory using mono API
This fixes several issues with loading assemblies. In turn, this commit also removes old Location/CodeBase fixes since now assemblies are resolved automatically correctly.

Additionally, integrate the mono loader into preloading which fixes assembly location resolving
2022-08-14 17:19:08 +03:00
ghorsington d190b069a1 Restructure versioning and project configuration
To simplify versioning and configuration:

* Removed BepInEx.Shared
* Removed BuildInfoAttribute
* Moved shared configuration to Directory.Build.props
* Refactored to use VersionSuffix and SourceRevisionId for embedding BE and commit hash info
* Enabled debug info embedding
2022-08-14 17:19:06 +03:00
ghorsington 28487d237a Disable Il2CppInterop parallel writing on Wine
At the moment high parallel I/O causes issues on Wine, so it's better to disable it for the time being
2022-08-14 17:18:59 +03:00
ghorsington d42f342d15 Bump Il2CppInterop 2022-08-14 17:18:59 +03:00
ghorsington dcab274a77 Bump Il2CppInterop version 2022-08-14 17:18:59 +03:00
Kasuromi cbb864dfde Pass in delegate instead of function pointer 2022-08-14 17:18:59 +03:00
Kasuromi e0023bb834 Wrap detour on create 2022-08-14 17:18:59 +03:00
js6pak ef89754d48 Add the using back 2022-08-14 17:18:59 +03:00
Kasuromi 0c0b8cfe10 it was still needed 2022-08-14 17:18:59 +03:00
ghorsington 9224a2a820 Update Il2CppInterop 2022-08-14 17:18:59 +03:00
js6pak 0e58099a83 Allow changing preloader log name with an env variable 2022-08-14 17:18:59 +03:00
js6pak 9743fb4c13 Preloader fail fast 2022-08-14 17:18:58 +03:00
ghorsington c184450015 Fix BepInExLogger not logging exceptions 2022-08-14 17:18:58 +03:00
js6pak 5ba319927f Add linux support 2022-08-14 17:18:58 +03:00
js6pak 8d26da3cda Centralize the delegate workaround 2022-08-14 17:18:58 +03:00
ghorsington 266a2c87db Use new Il2CppInterop detour provider, add Il2CppInterop.HarmonySupport 2022-08-14 17:18:58 +03:00
ghorsington 59097dbb73 Update Il2CppInterop; use new runner API 2022-08-14 17:18:58 +03:00
ghorsington abb10739db Target latest Il2CppInterop code 2022-08-14 17:18:58 +03:00
Kasuromi 01635d9f02 Cache Harmony Delegates & Runtime Invoke 2022-08-14 17:18:58 +03:00
ghorsington 68cadbf697 Fix hook logs not showing 2022-08-14 17:18:58 +03:00
ghorsington 6ca26f4b59 Clean up after merge 2022-08-14 17:18:58 +03:00
Kasuromi 83b72d568b Add config option for forced detour provider 2022-08-14 17:18:58 +03:00
Kasuromi 9432878863 Remove unused method 2022-08-14 17:18:58 +03:00
Kasuromi 2797bef7d6 Add Dobby Detour Provider 2022-08-14 17:18:58 +03:00
Kasuromi 136063957d Cleanup imports and rename region 2022-08-14 17:18:58 +03:00
Kasuromi 8743674bf2 Create NativeDetourHelper and internalize funchook 2022-08-14 17:18:58 +03:00
Kasuromi 6897bb0526 Deprecate FastNativeDetour in favor of Funchook 2022-08-14 17:18:58 +03:00
ghorsington 0da14c507c BepInEx.IL2CPP: Move runtime info logging to preloader 2022-08-14 17:18:58 +03:00
ghorsington 5afef9a1db FastNativeDetour: temporary fix for net6.0 support 2022-08-14 17:18:58 +03:00
ghorsington 7a54a77946 BepInEx.IL2CPP: Remove old MonoExtensions 2022-08-14 17:18:58 +03:00
ghorsington b80f29784c BepInEx.IL2CPP: Fix mutex checks 2022-08-14 17:18:58 +03:00
ghorsington a8dbe2c481 BepInEx.IL2CPP: fix ReferenceLibs copying to output 2022-08-14 17:18:58 +03:00
ghorsington a1c7f5c4b1 ConsoleManager: refactor useWinApiEncoder -> useManagedEncoder 2022-08-14 17:18:58 +03:00
ghorsington 57658bdbb7 BepInEx.IL2CPP: retarget to net6.0, switch to Il2CppInterop 2022-08-14 17:18:58 +03:00
Dusk Banks 43c883153d [WIP] UnityDoorstop 4 support 2022-08-14 17:18:57 +03:00
Lounger ca9a9127c4 Add UnhollowerDeobfuscationRegex config option 2022-07-11 06:06:58 +02:00
ghorsington 3febd6a3ba WindowsPageAllocator: Fix allocation issues on macOS
On macOS (if using e.g. Crossover), VirtualQuery can report a memory address as free but still fail to reserve the memory with VirtualAlloc (fails with error code 0x170C240 for some reason).

To fix this, memory is now reserved directly in the loop to ensure it can be reserved. If reservation fails, the next address is tried.
2022-06-19 21:50:49 +03:00
ghorsington fbb856702f PageAllocator: fix allocation unit to correct value 2022-06-19 21:38:30 +03:00
ghorsington f2fde2db12 Bump Il2CppAssemblyUnhollower 2022-06-18 21:52:17 +03:00
ghorsington 686c956fa4 Fix VirtualQuery signature on x64
In WinAPI MEMORY_BASIC_INFORMATION is not a real struct but rather a macro that resolves either to _MEMORY_BASIC_INFORMATION32 or _MEMORY_BASIC_INFORMATION64, see

https://github.com/Leandros/WindowsHModular/blob/master/include/win32/io.h#L120-L147

Because of this, hooking might fail because some valid memory pages will get skipped or some invalid pages might be used.
2022-06-18 20:40:23 +03:00
ghorsington 4f2226f1db Add UnhollowedAssembliesPath config option and similar --unhollowed-path CLI arg 2022-06-05 17:16:18 +03:00
ghorsington 5d77398a5c Bump Unhollower version 2022-05-24 20:42:10 +03:00
ghorsington bf37162544 Bump Unhollower version 2022-05-22 10:57:01 +03:00
js6pak 95c599b1da Run basic AttributeRestoration for cpp2il 2022-05-06 13:51:47 +02:00
ghorsington 5ff56c2ca5 WindowsPageAllocator: don't throw on invalid address resolving 2022-05-05 22:48:42 +03:00
ghorsington eaf38ef536 Bump package versions 2022-05-02 18:58:36 +03:00
ghorsington fba4461f0e Bump Il2CppUnhollower 2022-04-30 14:19:27 +03:00