using System; using System.Diagnostics; using System.IO; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using BepInEx; using BepInEx.Core.Logging.Interpolation; using BepInEx.Logging; using BepInEx.Unity.IL2CPP; using Il2CppInterop.Runtime.Injection; using Microsoft.CodeAnalysis; using UnityEngine; using bft_mod; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: TargetFramework(".NETCoreApp,Version=v6.0", FrameworkDisplayName = ".NET 6.0")] [assembly: AssemblyCompany("BFT")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyCopyright("Copyright © 2023")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0+f5c7ea763761c9fdef962aa9be063765a07b7ed1")] [assembly: AssemblyProduct("ChaosTricksPlugin")] [assembly: AssemblyTitle("ChaosTricksPlugin")] [assembly: AssemblyVersion("1.0.0.0")] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)] internal sealed class NullableAttribute : Attribute { public readonly byte[] NullableFlags; public NullableAttribute(byte P_0) { NullableFlags = new byte[1] { P_0 }; } public NullableAttribute(byte[] P_0) { NullableFlags = P_0; } } [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)] internal sealed class NullableContextAttribute : Attribute { public readonly byte Flag; public NullableContextAttribute(byte P_0) { Flag = P_0; } } } namespace ChaosTricksPlugin { public static class PluginInfo { public const string PLUGIN_GUID = "36601542-7EB9-44B2-8036-57FC97579AA0"; public const string PLUGIN_NAME = "ChaosTricks"; public const string PLUGIN_VERSION = "1.1.10"; } [BepInPlugin("36601542-7EB9-44B2-8036-57FC97579AA0", "ChaosTricks", "1.1.10")] public class ChaosTricksPlugin : BasePlugin { public override void Load() { //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Expected O, but got Unknown //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Expected O, but got Unknown //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Expected O, but got Unknown //IL_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Expected O, but got Unknown ManualLogSource log = ((BasePlugin)this).Log; bool flag = default(bool); BepInExInfoLogInterpolatedStringHandler val = new BepInExInfoLogInterpolatedStringHandler(34, 1, ref flag); if (flag) { ((BepInExLogInterpolatedStringHandler)val).AppendLiteral("BFT ChaosTricks plugin "); ((BepInExLogInterpolatedStringHandler)val).AppendFormatted("36601542-7EB9-44B2-8036-57FC97579AA0"); ((BepInExLogInterpolatedStringHandler)val).AppendLiteral(" is loading"); } log.LogInfo(val); AppDomain.CurrentDomain.AssemblyResolve += AssemblyResolve; Process.GetCurrentProcess().Exited += delegate { ((BasePlugin)this).Unload(); }; if (!ClassInjector.IsTypeRegisteredInIl2Cpp(typeof(InteractiveMod))) { ClassInjector.RegisterTypeInIl2Cpp(); ManualLogSource log2 = ((BasePlugin)this).Log; val = new BepInExInfoLogInterpolatedStringHandler(48, 0, ref flag); if (flag) { ((BepInExLogInterpolatedStringHandler)val).AppendLiteral("BFT ChaosTricks RegisterTypeInIl2Cpp is finished"); } log2.LogInfo(val); GameObject val2 = new GameObject(); ((Object)val2).hideFlags = (HideFlags)(((Object)val2).hideFlags | 0x3D); ((Object)val2).hideFlags = (HideFlags)(((Object)val2).hideFlags | 4); Object.DontDestroyOnLoad((Object)val2); InteractiveMod obj = val2.AddComponent(); ((Object)obj).hideFlags = (HideFlags)(((Object)obj).hideFlags | 0x3D); ((Object)obj).hideFlags = (HideFlags)(((Object)obj).hideFlags | 4); ManualLogSource log3 = ((BasePlugin)this).Log; val = new BepInExInfoLogInterpolatedStringHandler(40, 0, ref flag); if (flag) { ((BepInExLogInterpolatedStringHandler)val).AppendLiteral("BFT ChaosTricks AddComponent is finished"); } log3.LogInfo(val); } ((BasePlugin)this).Log.LogInfo((object)"BFT mod loading is finished"); } public override bool Unload() { ((BasePlugin)this).Log.LogInfo((object)"BFT mod unloading"); AppDomain.CurrentDomain.AssemblyResolve -= AssemblyResolve; return ((BasePlugin)this).Unload(); } private Assembly AssemblyResolve(object sender, ResolveEventArgs args) { //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Expected O, but got Unknown try { AssemblyName assemblyName = new AssemblyName(args.Name); string path = Path.Combine(Paths.PluginPath, assemblyName.Name + ".dll"); return File.Exists(path) ? Assembly.LoadFile(path) : null; } catch (Exception ex) { ManualLogSource log = ((BasePlugin)this).Log; bool flag = default(bool); BepInExErrorLogInterpolatedStringHandler val = new BepInExErrorLogInterpolatedStringHandler(30, 2, ref flag); if (flag) { ((BepInExLogInterpolatedStringHandler)val).AppendLiteral("BFT mod AssemblyResolve: "); ((BepInExLogInterpolatedStringHandler)val).AppendFormatted(ex); ((BepInExLogInterpolatedStringHandler)val).AppendLiteral(" for "); ((BepInExLogInterpolatedStringHandler)val).AppendFormatted(args.Name); } log.LogError(val); return null; } } } }