Decompiled source of BlockerBotBypass v1.0.1

GDWeave/mods/BlockerBotBypass/BlockerBotBypass.dll

Decompiled 3 weeks ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using GDWeave.Godot;
using GDWeave.Godot.Variants;
using GDWeave.Modding;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(/*Could not decode attribute arguments.*/)]
[assembly: TargetFramework(".NETCoreApp,Version=v8.0", FrameworkDisplayName = ".NET 8.0")]
[assembly: AssemblyCompany("BlockerBotBypass")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0.0+beccbec48b7ee04ea177633ba9c12176991ff777")]
[assembly: AssemblyProduct("BlockerBotBypass")]
[assembly: AssemblyTitle("BlockerBotBypass")]
[assembly: AssemblyVersion("1.0.0.0")]
[module: RefSafetyRules(11)]
public class BlockerBotBypass : IScriptMod
{
	[CompilerGenerated]
	private sealed class <Modify>d__1 : global::System.Collections.Generic.IEnumerable<Token>, global::System.Collections.IEnumerable, global::System.Collections.Generic.IEnumerator<Token>, global::System.Collections.IEnumerator, global::System.IDisposable
	{
		private int <>1__state;

		private Token <>2__current;

		private int <>l__initialThreadId;

		private string path;

		public string <>3__path;

		private global::System.Collections.Generic.IEnumerable<Token> tokens;

		public global::System.Collections.Generic.IEnumerable<Token> <>3__tokens;

		public BlockerBotBypass <>4__this;

		private MultiTokenWaiter <waiter>5__1;

		private global::System.Collections.Generic.IEnumerator<Token> <>s__2;

		private Token <token>5__3;

		Token global::System.Collections.Generic.IEnumerator<Token>.Current
		{
			[DebuggerHidden]
			get
			{
				return <>2__current;
			}
		}

		object global::System.Collections.IEnumerator.Current
		{
			[DebuggerHidden]
			get
			{
				return <>2__current;
			}
		}

		[DebuggerHidden]
		public <Modify>d__1(int <>1__state)
		{
			this.<>1__state = <>1__state;
			<>l__initialThreadId = Environment.CurrentManagedThreadId;
		}

		[DebuggerHidden]
		void global::System.IDisposable.Dispose()
		{
			int num = <>1__state;
			if (num != -3 && (uint)(num - 1) > 18u)
			{
				return;
			}
			try
			{
			}
			finally
			{
				<>m__Finally1();
			}
		}

		private bool MoveNext()
		{
			//IL_019e: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a8: Expected O, but got Unknown
			//IL_01c4: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ce: Expected O, but got Unknown
			//IL_01f0: Unknown result type (might be due to invalid IL or missing references)
			//IL_01fa: Expected O, but got Unknown
			//IL_0214: Unknown result type (might be due to invalid IL or missing references)
			//IL_021e: Expected O, but got Unknown
			//IL_0219: Unknown result type (might be due to invalid IL or missing references)
			//IL_0223: Expected O, but got Unknown
			//IL_0245: Unknown result type (might be due to invalid IL or missing references)
			//IL_024f: Expected O, but got Unknown
			//IL_026b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0275: Expected O, but got Unknown
			//IL_0297: Unknown result type (might be due to invalid IL or missing references)
			//IL_02a1: Expected O, but got Unknown
			//IL_02c3: Unknown result type (might be due to invalid IL or missing references)
			//IL_02cd: Expected O, but got Unknown
			//IL_02ea: Unknown result type (might be due to invalid IL or missing references)
			//IL_02f4: Expected O, but got Unknown
			//IL_0311: Unknown result type (might be due to invalid IL or missing references)
			//IL_031b: Expected O, but got Unknown
			//IL_033e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0348: Expected O, but got Unknown
			//IL_036b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0375: Expected O, but got Unknown
			//IL_0398: Unknown result type (might be due to invalid IL or missing references)
			//IL_03a2: Expected O, but got Unknown
			//IL_03bd: Unknown result type (might be due to invalid IL or missing references)
			//IL_03c7: Expected O, but got Unknown
			//IL_03c2: Unknown result type (might be due to invalid IL or missing references)
			//IL_03cc: Expected O, but got Unknown
			//IL_03ef: Unknown result type (might be due to invalid IL or missing references)
			//IL_03f9: Expected O, but got Unknown
			//IL_041c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0426: Expected O, but got Unknown
			//IL_0449: Unknown result type (might be due to invalid IL or missing references)
			//IL_0453: Expected O, but got Unknown
			//IL_011c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0126: Expected O, but got Unknown
			try
			{
				switch (<>1__state)
				{
				default:
					return false;
				case 0:
					<>1__state = -1;
					<waiter>5__1 = new MultiTokenWaiter(new Func<Token, bool>[2]
					{
						(Token t) => (int)t.Type == 2,
						delegate(Token t)
						{
							//IL_000d: Unknown result type (might be due to invalid IL or missing references)
							//IL_0013: Expected O, but got Unknown
							//IL_003b: Unknown result type (might be due to invalid IL or missing references)
							//IL_0045: Expected O, but got Unknown
							ConstantToken val = (ConstantToken)((t is ConstantToken) ? t : null);
							if (val == null)
							{
								return false;
							}
							Variant value = val.Value;
							IntVariant val2 = (IntVariant)(object)((value is IntVariant) ? value : null);
							return val2 != null && ((Variant)val2).Equals((Variant)new IntVariant(6L, false));
						}
					}, false, false);
					<>s__2 = tokens.GetEnumerator();
					<>1__state = -3;
					break;
				case 1:
					<>1__state = -3;
					<>2__current = new Token((TokenType)38, (uint?)null);
					<>1__state = 2;
					return true;
				case 2:
					<>1__state = -3;
					<>2__current = (Token)new IdentifierToken("packets_recieved");
					<>1__state = 3;
					return true;
				case 3:
					<>1__state = -3;
					<>2__current = new Token((TokenType)12, (uint?)null);
					<>1__state = 4;
					return true;
				case 4:
					<>1__state = -3;
					<>2__current = (Token)new ConstantToken((Variant)new IntVariant(0L, false));
					<>1__state = 5;
					return true;
				case 5:
					<>1__state = -3;
					<>2__current = new Token((TokenType)14, (uint?)null);
					<>1__state = 6;
					return true;
				case 6:
					<>1__state = -3;
					<>2__current = (Token)new IdentifierToken("packets_recieved");
					<>1__state = 7;
					return true;
				case 7:
					<>1__state = -3;
					<>2__current = new Token((TokenType)12, (uint?)null);
					<>1__state = 8;
					return true;
				case 8:
					<>1__state = -3;
					<>2__current = new Token((TokenType)80, (uint?)null);
					<>1__state = 9;
					return true;
				case 9:
					<>1__state = -3;
					<>2__current = (Token)new IdentifierToken("packets_recieved");
					<>1__state = 10;
					return true;
				case 10:
					<>1__state = -3;
					<>2__current = (Token)new IdentifierToken("Network.LOBBY_MEMBERS.size");
					<>1__state = 11;
					return true;
				case 11:
					<>1__state = -3;
					<>2__current = new Token((TokenType)80, (uint?)null);
					<>1__state = 12;
					return true;
				case 12:
					<>1__state = -3;
					<>2__current = new Token((TokenType)81, (uint?)null);
					<>1__state = 13;
					return true;
				case 13:
					<>1__state = -3;
					<>2__current = new Token((TokenType)17, (uint?)null);
					<>1__state = 14;
					return true;
				case 14:
					<>1__state = -3;
					<>2__current = (Token)new ConstantToken((Variant)new IntVariant(1L, false));
					<>1__state = 15;
					return true;
				case 15:
					<>1__state = -3;
					<>2__current = new Token((TokenType)81, (uint?)null);
					<>1__state = 16;
					return true;
				case 16:
					<>1__state = -3;
					<>2__current = new Token((TokenType)86, (uint?)null);
					<>1__state = 17;
					return true;
				case 17:
					<>1__state = -3;
					<>2__current = new Token((TokenType)89, (uint?)null);
					<>1__state = 18;
					return true;
				case 18:
					<>1__state = -3;
					goto IL_048c;
				case 19:
					{
						<>1__state = -3;
						goto IL_048c;
					}
					IL_048c:
					<token>5__3 = null;
					break;
				}
				if (((global::System.Collections.IEnumerator)<>s__2).MoveNext())
				{
					<token>5__3 = <>s__2.Current;
					if (<waiter>5__1.Check(<token>5__3))
					{
						<>2__current = <token>5__3;
						<>1__state = 1;
						return true;
					}
					<>2__current = <token>5__3;
					<>1__state = 19;
					return true;
				}
				<>m__Finally1();
				<>s__2 = null;
				return false;
			}
			catch
			{
				//try-fault
				((global::System.IDisposable)this).Dispose();
				throw;
			}
		}

		bool global::System.Collections.IEnumerator.MoveNext()
		{
			//ILSpy generated this explicit interface implementation from .override directive in MoveNext
			return this.MoveNext();
		}

		private void <>m__Finally1()
		{
			<>1__state = -1;
			if (<>s__2 != null)
			{
				((global::System.IDisposable)<>s__2).Dispose();
			}
		}

		[DebuggerHidden]
		void global::System.Collections.IEnumerator.Reset()
		{
			//IL_0000: Unknown result type (might be due to invalid IL or missing references)
			throw new NotSupportedException();
		}

		[DebuggerHidden]
		global::System.Collections.Generic.IEnumerator<Token> global::System.Collections.Generic.IEnumerable<Token>.GetEnumerator()
		{
			<Modify>d__1 <Modify>d__;
			if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId)
			{
				<>1__state = 0;
				<Modify>d__ = this;
			}
			else
			{
				<Modify>d__ = new <Modify>d__1(0)
				{
					<>4__this = <>4__this
				};
			}
			<Modify>d__.path = <>3__path;
			<Modify>d__.tokens = <>3__tokens;
			return <Modify>d__;
		}

		[DebuggerHidden]
		global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator()
		{
			return (global::System.Collections.IEnumerator)((global::System.Collections.Generic.IEnumerable<Token>)this).GetEnumerator();
		}
	}

	public bool ShouldRun(string path)
	{
		return path == "res://Scenes/Menus/Loading Menu/loading_menu.gdc";
	}

	[IteratorStateMachine(typeof(<Modify>d__1))]
	public global::System.Collections.Generic.IEnumerable<Token> Modify(string path, global::System.Collections.Generic.IEnumerable<Token> tokens)
	{
		MultiTokenWaiter waiter = new MultiTokenWaiter(new Func<Token, bool>[2]
		{
			(Token t) => (int)t.Type == 2,
			delegate(Token t)
			{
				//IL_000d: Unknown result type (might be due to invalid IL or missing references)
				//IL_0013: Expected O, but got Unknown
				//IL_003b: Unknown result type (might be due to invalid IL or missing references)
				//IL_0045: Expected O, but got Unknown
				ConstantToken val = (ConstantToken)((t is ConstantToken) ? t : null);
				if (val == null)
				{
					return false;
				}
				Variant value = val.Value;
				IntVariant val2 = (IntVariant)(object)((value is IntVariant) ? value : null);
				return val2 != null && ((Variant)val2).Equals((Variant)new IntVariant(6L, false));
			}
		}, false, false);
		global::System.Collections.Generic.IEnumerator<Token> enumerator = tokens.GetEnumerator();
		try
		{
			while (((global::System.Collections.IEnumerator)enumerator).MoveNext())
			{
				Token token = enumerator.Current;
				if (waiter.Check(token))
				{
					yield return token;
					yield return new Token((TokenType)38, (uint?)null);
					yield return (Token)new IdentifierToken("packets_recieved");
					yield return new Token((TokenType)12, (uint?)null);
					yield return (Token)new ConstantToken((Variant)new IntVariant(0L, false));
					yield return new Token((TokenType)14, (uint?)null);
					yield return (Token)new IdentifierToken("packets_recieved");
					yield return new Token((TokenType)12, (uint?)null);
					yield return new Token((TokenType)80, (uint?)null);
					yield return (Token)new IdentifierToken("packets_recieved");
					yield return (Token)new IdentifierToken("Network.LOBBY_MEMBERS.size");
					yield return new Token((TokenType)80, (uint?)null);
					yield return new Token((TokenType)81, (uint?)null);
					yield return new Token((TokenType)17, (uint?)null);
					yield return (Token)new ConstantToken((Variant)new IntVariant(1L, false));
					yield return new Token((TokenType)81, (uint?)null);
					yield return new Token((TokenType)86, (uint?)null);
					yield return new Token((TokenType)89, (uint?)null);
				}
				else
				{
					yield return token;
				}
			}
		}
		finally
		{
			((global::System.IDisposable)enumerator)?.Dispose();
		}
	}
}
namespace GDWeave.Sample;

public class Config
{
}
public class Mod : IMod, global::System.IDisposable
{
	public Config Config;

	public Mod(IModInterface modInterface)
	{
		Config = modInterface.ReadConfig<Config>();
		modInterface.RegisterScriptMod((IScriptMod)(object)new BlockerBotBypass());
		modInterface.Logger.Information("[Blocker Bot Bypass] Loaded!");
	}

	public void Dispose()
	{
	}
}