using System;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Logging;
using MemoryBoosterTurboMaxEnterprise.EnterpriseCallbacks;
using Microsoft.CodeAnalysis;
using Ostranauts.Core;
using UnityEngine.Events;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: IgnoresAccessChecksTo("Assembly-CSharp")]
[assembly: AssemblyCompany("MemoryBoosterTurboMaxEnterprise")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.1.0")]
[assembly: AssemblyInformationalVersion("1.0.1+e9f7dd6571974093a7beaf903ba16f3186c5b5a0")]
[assembly: AssemblyProduct("MemoryBoosterTurboMaxEnterprise")]
[assembly: AssemblyTitle("MemoryBoosterTurboMaxEnterprise")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.1.0")]
[module: UnverifiableCode]
[module: RefSafetyRules(11)]
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;
}
}
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
[AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)]
internal sealed class RefSafetyRulesAttribute : Attribute
{
public readonly int Version;
public RefSafetyRulesAttribute(int P_0)
{
Version = P_0;
}
}
}
internal static class LCMPluginInfo
{
public const string PLUGIN_GUID = "MemoryBoosterTurboMaxEnterprise";
public const string PLUGIN_NAME = "MemoryBoosterTurboMaxEnterprise";
public const string PLUGIN_VERSION = "1.0.1";
}
namespace MemoryBoosterTurboMaxEnterprise
{
[BepInPlugin("MemoryBoosterTurboMaxEnterprise", "MemoryBoosterTurboMaxEnterprise", "1.0.1")]
public class RobynSoftEnterprisePlugin : BaseUnityPlugin
{
[CompilerGenerated]
private static class <>O
{
public static UnityAction <0>__LoadGameEnterpriseCallback;
}
internal static ManualLogSource Log;
private void Awake()
{
//IL_0031: Unknown result type (might be due to invalid IL or missing references)
//IL_0036: Unknown result type (might be due to invalid IL or missing references)
//IL_003c: Expected O, but got Unknown
//IL_0057: Unknown result type (might be due to invalid IL or missing references)
//IL_005c: Unknown result type (might be due to invalid IL or missing references)
//IL_0062: Expected O, but got Unknown
Log = ((BaseUnityPlugin)this).Logger;
Log.LogInfo((object)"Memory Booster Turbo Max Enterprise Edition is now loaded!\n Version: 1.0.1\n License: Enterprise (VALIDATED)\n Patent-No: US-12382966-B1");
UnityEvent onGameFinishedLoading = CrewSim.OnGameFinishedLoading;
object obj = <>O.<0>__LoadGameEnterpriseCallback;
if (obj == null)
{
UnityAction val = LoadGameEnterpriseListeners.LoadGameEnterpriseCallback;
<>O.<0>__LoadGameEnterpriseCallback = val;
obj = (object)val;
}
onGameFinishedLoading.AddListener((UnityAction)obj);
UnityEvent onSaveFinished = LoadManager.OnSaveFinished;
object obj2 = <>O.<0>__LoadGameEnterpriseCallback;
if (obj2 == null)
{
UnityAction val2 = LoadGameEnterpriseListeners.LoadGameEnterpriseCallback;
<>O.<0>__LoadGameEnterpriseCallback = val2;
obj2 = (object)val2;
}
onSaveFinished.AddListener((UnityAction)obj2);
}
}
}
namespace MemoryBoosterTurboMaxEnterprise.EnterpriseCallbacks
{
public static class LoadGameEnterpriseListeners
{
public static void LoadGameEnterpriseCallback()
{
RobynSoftEnterprisePlugin.Log.LogMessage((object)"Game has finished saving or loading, engaging enterprise level algorithms to compact heap!");
try
{
GC.Collect();
GC.WaitForPendingFinalizers();
GC.Collect();
}
catch (Exception arg)
{
RobynSoftEnterprisePlugin.Log.LogError((object)$"Memory Booster Turbo Max Enterprise Edition has encountered an error during GC Compacting: {arg}");
}
}
}
}
namespace System.Runtime.CompilerServices
{
[AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)]
internal sealed class IgnoresAccessChecksToAttribute : Attribute
{
public IgnoresAccessChecksToAttribute(string assemblyName)
{
}
}
}