using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
using System.Reflection.Emit;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using HarmonyLib;
using Microsoft.CodeAnalysis;
using MoreCompany;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyCompany("NoMoreCompanyLogo")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyDescription("Removes the more company logo from the main menu screen")]
[assembly: AssemblyFileVersion("1.0.2.0")]
[assembly: AssemblyInformationalVersion("1.0.2+cde2c9e2694f831c002cec9f28b5ff9bc961b455")]
[assembly: AssemblyProduct("NoMoreCompanyLogo")]
[assembly: AssemblyTitle("NoMoreCompanyLogo")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.2.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.Module, AllowMultiple = false, Inherited = false)]
internal sealed class RefSafetyRulesAttribute : Attribute
{
public readonly int Version;
public RefSafetyRulesAttribute(int P_0)
{
Version = P_0;
}
}
}
namespace NoMoreCompanyLogo
{
[BepInPlugin("io.daxcess.nomorecompanylogo", "NoMoreCompanyLogo", "1.0.2")]
[BepInDependency(/*Could not decode attribute arguments.*/)]
public class Plugin : BaseUnityPlugin
{
private const string PLUGIN_GUID = "io.daxcess.nomorecompanylogo";
private const string PLUGIN_NAME = "NoMoreCompanyLogo";
private const string PLUGIN_VERSION = "1.0.2";
private void Awake()
{
Harmony.CreateAndPatchAll(Assembly.GetExecutingAssembly(), (string)null);
((BaseUnityPlugin)this).Logger.LogInfo((object)"Plugin NoMoreCompanyLogo is loaded!");
}
}
[HarmonyPatch]
internal static class MoreCompanyPatches
{
[HarmonyPatch(typeof(MenuManagerLogoOverridePatch), "Awake_Postfix")]
[HarmonyTranspiler]
private static IEnumerable<CodeInstruction> RemoveLogoPatchTranspiler(IEnumerable<CodeInstruction> instructions)
{
//IL_0002: Unknown result type (might be due to invalid IL or missing references)
//IL_0020: Unknown result type (might be due to invalid IL or missing references)
//IL_0026: Expected O, but got Unknown
//IL_004e: Unknown result type (might be due to invalid IL or missing references)
//IL_0054: Expected O, but got Unknown
return new CodeMatcher(instructions, (ILGenerator)null).MatchForward(false, (CodeMatch[])(object)new CodeMatch[1]
{
new CodeMatch((OpCode?)OpCodes.Ldstr, (object)"MenuContainer/MainButtons/HeaderImage", (string)null)
}).SetOperandAndAdvance((object)"INVALID OBJECT").MatchForward(false, (CodeMatch[])(object)new CodeMatch[1]
{
new CodeMatch((OpCode?)OpCodes.Ldstr, (object)"MenuContainer/LoadingScreen", (string)null)
})
.SetOperandAndAdvance((object)"INVALID OBJECT")
.InstructionEnumeration();
}
[HarmonyPatch(typeof(MenuManagerVersionDisplayPatch), "Postfix")]
[HarmonyTranspiler]
private static IEnumerable<CodeInstruction> DisableVersionTextOverride(IEnumerable<CodeInstruction> instructions)
{
//IL_0002: Unknown result type (might be due to invalid IL or missing references)
//IL_0020: Unknown result type (might be due to invalid IL or missing references)
//IL_0026: Expected O, but got Unknown
return new CodeMatcher(instructions, (ILGenerator)null).MatchForward(false, (CodeMatch[])(object)new CodeMatch[1]
{
new CodeMatch((OpCode?)OpCodes.Ldstr, (object)"v{0} (MC)", (string)null)
}).SetOperandAndAdvance((object)"v{0}").InstructionEnumeration();
}
}
public static class PluginInfo
{
public const string PLUGIN_GUID = "NoMoreCompanyLogo";
public const string PLUGIN_NAME = "NoMoreCompanyLogo";
public const string PLUGIN_VERSION = "1.0.2";
}
}