Decompiled source of EXOS MMORPG v1.2.6

plugins/CookieMilk-ElementalFalls/ElementalFalls.dll

Decompiled 6 months ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.Globalization;
using System.IO;
using System.IO.Compression;
using System.Linq;
using System.Net;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Serialization;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Cryptography;
using System.Security.Permissions;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading;
using BepInEx;
using BepInEx.Bootstrap;
using BepInEx.Configuration;
using BepInEx.Logging;
using HarmonyLib;
using HarmonyLib.Public.Patching;
using JetBrains.Annotations;
using Mono.Cecil;
using Mono.Cecil.Cil;
using Mono.Collections.Generic;
using MonoMod.Utils;
using PieceManager;
using ServerSync;
using UnityEngine;
using UnityEngine.Diagnostics;
using UnityEngine.UI;

[assembly: TargetFramework(".NETFramework,Version=v4.6.2", FrameworkDisplayName = ".NET Framework 4.6.2")]
[assembly: CompilationRelaxations(8)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("ElementalFalls")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: AssemblyProduct("ElementalFalls")]
[assembly: AssemblyCopyright("Copyright ©  2022")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("E0E2F92E-557C-4A05-9D89-AA92A0BD75C4")]
[assembly: AssemblyFileVersion("1.2.2")]
[assembly: AssemblyCompany("CookieMilk")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.2.2.0")]
[module: UnverifiableCode]
[module: SuppressIldasm]
[module: ConfusedBy("Confuser.Core 1.6.0+447341964f")]
internal class <Module>
{
	internal struct qTlwluMfboqHwpvxffFKximbxSPc
	{
		internal uint mLrNajdgZMrHnyFvJIuOgziMkIcd;

		internal void vktztXwgzHmcejCzUrVqJJFeasLO()
		{
			mLrNajdgZMrHnyFvJIuOgziMkIcd = 1024u;
		}

		internal uint VvRXueeCQWAkOrVODLwRaaIfwXbu(LskAzAdzfpHXVrCiFZhdoulFHvEi rangeDecoder)
		{
			uint num = (rangeDecoder.qByCOzHNMtXJiNmLCeiIfYENyrpP >> 11) * mLrNajdgZMrHnyFvJIuOgziMkIcd;
			while (true)
			{
				int num2 = -715723310;
				while (true)
				{
					uint num3;
					int num4;
					switch ((num3 = (uint)num2 ^ 0x95403359u) % 6)
					{
					case 0u:
						break;
					case 4u:
						num4 = 1477453086;
						goto IL_005b;
					case 3u:
						if (rangeDecoder.vmdZTGeNaTHbrJQKyusEODnKrBCHA < num)
						{
							num2 = ((int)num3 * -1915428266) ^ 0x571D7357;
							continue;
						}
						goto IL_0192;
					case 1u:
						goto IL_00c7;
					default:
						num4 = 860682041;
						goto IL_005b;
					case 2u:
						goto IL_0259;
						IL_009f:
						num2 = -974579197;
						continue;
						IL_005b:
						while (true)
						{
							uint num5;
							switch ((num5 = (uint)num4 ^ 0x362932A3u) % 13)
							{
							case 9u:
								break;
							default:
								goto IL_009f;
							case 0u:
								goto IL_00c7;
							case 7u:
								rangeDecoder.qByCOzHNMtXJiNmLCeiIfYENyrpP <<= 8;
								num4 = (int)(num5 * 602281643) ^ -108335848;
								continue;
							case 8u:
								mLrNajdgZMrHnyFvJIuOgziMkIcd -= mLrNajdgZMrHnyFvJIuOgziMkIcd >> 5;
								num4 = ((int)num5 * -290081153) ^ -76585236;
								continue;
							case 10u:
							{
								mLrNajdgZMrHnyFvJIuOgziMkIcd += 2048 - mLrNajdgZMrHnyFvJIuOgziMkIcd >> 5;
								int num8;
								int num9;
								if (rangeDecoder.qByCOzHNMtXJiNmLCeiIfYENyrpP >= 16777216)
								{
									num8 = 1686229989;
									num9 = num8;
								}
								else
								{
									num8 = 1440953165;
									num9 = num8;
								}
								num4 = num8 ^ ((int)num5 * -862749042);
								continue;
							}
							case 6u:
								rangeDecoder.vmdZTGeNaTHbrJQKyusEODnKrBCHA = (rangeDecoder.vmdZTGeNaTHbrJQKyusEODnKrBCHA << 8) | (byte)\u206c\u202d\u200f\u206c\u206a\u206c\u206d\u200d\u206e\u202d\u206c\u200e\u206e\u202d\u200b\u200d\u202c\u202e\u206d\u200b\u200e\u202a\u202b\u200f\u206e\u206a\u202d\u206f\u206a\u206b\u206d\u206d\u202e\u206a\u202e\u206a\u202d\u200f\u200f\u202d\u202e(rangeDecoder.qKCirHDjvqqAzktXForAkcOxADfHA);
								num4 = ((int)num5 * -215271962) ^ 0x725AF3A0;
								continue;
							case 12u:
								goto IL_0192;
							case 1u:
								rangeDecoder.qByCOzHNMtXJiNmLCeiIfYENyrpP = num;
								num4 = ((int)num5 * -1727276117) ^ 0x91E47AC;
								continue;
							case 11u:
								rangeDecoder.qByCOzHNMtXJiNmLCeiIfYENyrpP <<= 8;
								num4 = ((int)num5 * -974167893) ^ 0x34EF329F;
								continue;
							case 3u:
								rangeDecoder.vmdZTGeNaTHbrJQKyusEODnKrBCHA -= num;
								num4 = (int)((num5 * 1431274858) ^ 0x7248E295);
								continue;
							case 2u:
							{
								int num6;
								int num7;
								if (rangeDecoder.qByCOzHNMtXJiNmLCeiIfYENyrpP >= 16777216)
								{
									num6 = -318936568;
									num7 = num6;
								}
								else
								{
									num6 = -2047550119;
									num7 = num6;
								}
								num4 = num6 ^ (int)(num5 * 643082157);
								continue;
							}
							case 4u:
								rangeDecoder.vmdZTGeNaTHbrJQKyusEODnKrBCHA = (rangeDecoder.vmdZTGeNaTHbrJQKyusEODnKrBCHA << 8) | (byte)\u206c\u202d\u200f\u206c\u206a\u206c\u206d\u200d\u206e\u202d\u206c\u200e\u206e\u202d\u200b\u200d\u202c\u202e\u206d\u200b\u200e\u202a\u202b\u200f\u206e\u206a\u202d\u206f\u206a\u206b\u206d\u206d\u202e\u206a\u202e\u206a\u202d\u200f\u200f\u202d\u202e(rangeDecoder.qKCirHDjvqqAzktXForAkcOxADfHA);
								num4 = (int)(num5 * 349129394) ^ -1356711769;
								continue;
							case 5u:
								goto IL_0259;
							}
							break;
						}
						goto case 4u;
						IL_0259:
						return 1u;
						IL_0192:
						rangeDecoder.qByCOzHNMtXJiNmLCeiIfYENyrpP -= num;
						num4 = 415686995;
						goto IL_005b;
						IL_00c7:
						return 0u;
					}
					break;
				}
			}
		}

		static int \u206c\u202d\u200f\u206c\u206a\u206c\u206d\u200d\u206e\u202d\u206c\u200e\u206e\u202d\u200b\u200d\u202c\u202e\u206d\u200b\u200e\u202a\u202b\u200f\u206e\u206a\u202d\u206f\u206a\u206b\u206d\u206d\u202e\u206a\u202e\u206a\u202d\u200f\u200f\u202d\u202e(Stream P_0)
		{
			return P_0.ReadByte();
		}
	}

	internal struct aeZYgUGqHdALyefYUuNWSMmNNKuMA
	{
		internal readonly qTlwluMfboqHwpvxffFKximbxSPc[] QjbDrqHEFdfqgIwqHOfKDxSqLzYW;

		internal readonly int TXfWixCuWroLyxiUbLLWdNBjLIVd;

		internal aeZYgUGqHdALyefYUuNWSMmNNKuMA(int numBitLevels)
		{
			TXfWixCuWroLyxiUbLLWdNBjLIVd = numBitLevels;
			QjbDrqHEFdfqgIwqHOfKDxSqLzYW = new qTlwluMfboqHwpvxffFKximbxSPc[1 << numBitLevels];
		}

		internal void LMRwAggtQaoUDlOJFtNTHzGhgOCt()
		{
			uint num = 1u;
			while (true)
			{
				int num2 = 680586822;
				while (true)
				{
					uint num3;
					int num4;
					int num5;
					switch ((num3 = (uint)num2 ^ 0x41E054EDu) % 6)
					{
					case 0u:
						break;
					case 3u:
						if (num >= 1 << TXfWixCuWroLyxiUbLLWdNBjLIVd)
						{
							num2 = 2145031692;
							continue;
						}
						num4 = -374205282;
						num5 = num4;
						goto IL_0060;
					case 2u:
						return;
					case 4u:
						goto IL_005b;
					case 1u:
						num2 = ((int)num3 * -1281867858) ^ -189907868;
						continue;
					default:
						{
							num4 = -1683564028;
							num5 = num4;
							goto IL_0060;
						}
						IL_0083:
						num2 = 234679837;
						continue;
						IL_005b:
						num4 = -374205282;
						goto IL_0060;
						IL_0060:
						while (true)
						{
							uint num6;
							switch ((num6 = (uint)num4 ^ 0x8B2F2D1Fu) % 5)
							{
							case 0u:
								break;
							case 4u:
								goto IL_005b;
							default:
								goto IL_0083;
							case 3u:
								num++;
								num4 = ((int)num6 * -1560297630) ^ -1081878625;
								continue;
							case 1u:
								QjbDrqHEFdfqgIwqHOfKDxSqLzYW[num].vktztXwgzHmcejCzUrVqJJFeasLO();
								num4 = -1398018459;
								continue;
							case 2u:
								return;
							}
							break;
						}
						goto case 3u;
					}
					break;
				}
			}
		}

		internal uint HhoRUiWNsRSLUkVpugpJMvDjzcPK(LskAzAdzfpHXVrCiFZhdoulFHvEi rangeDecoder)
		{
			uint num = 1u;
			int num7 = default(int);
			while (true)
			{
				int num2 = 616405176;
				while (true)
				{
					uint num3;
					int num4;
					int num5;
					switch ((num3 = (uint)num2 ^ 0x5D8871D7u) % 5)
					{
					case 2u:
						break;
					case 3u:
						num4 = -284188812;
						goto IL_0031;
					case 1u:
						goto IL_005f;
					default:
						num4 = -654092185;
						num5 = num4;
						goto IL_0031;
					case 0u:
						goto IL_00d9;
						IL_0031:
						while (true)
						{
							uint num6;
							switch ((num6 = (uint)num4 ^ 0xFF4DFC87u) % 6)
							{
							case 2u:
								break;
							default:
								goto IL_0058;
							case 3u:
								goto IL_005f;
							case 0u:
								num = (num << 1) + QjbDrqHEFdfqgIwqHOfKDxSqLzYW[num].VvRXueeCQWAkOrVODLwRaaIfwXbu(rangeDecoder);
								num4 = -1857275340;
								continue;
							case 5u:
								num7--;
								num4 = ((int)num6 * -1992954732) ^ -1850232764;
								continue;
							case 1u:
								num7 = TXfWixCuWroLyxiUbLLWdNBjLIVd;
								num4 = (int)((num6 * 2086586514) ^ 0x30D98BAE);
								continue;
							case 4u:
								goto IL_00d9;
							}
							break;
						}
						goto case 3u;
						IL_00d9:
						return num - (uint)(1 << TXfWixCuWroLyxiUbLLWdNBjLIVd);
						IL_005f:
						if (num7 > 0)
						{
							num2 = 680896956;
							continue;
						}
						num4 = -1646971097;
						num5 = num4;
						goto IL_0031;
						IL_0058:
						num2 = 1802420735;
						continue;
					}
					break;
				}
			}
		}

		internal uint EyzJubLAQwncIflnOKsgBeeWigbIA(LskAzAdzfpHXVrCiFZhdoulFHvEi rangeDecoder)
		{
			uint num = 1u;
			uint num4 = default(uint);
			uint num7 = default(uint);
			uint num8 = default(uint);
			int num6 = default(int);
			while (true)
			{
				int num2 = -1945311232;
				while (true)
				{
					uint num3;
					int num5;
					switch ((num3 = (uint)num2 ^ 0xF478DFC3u) % 5)
					{
					case 2u:
						break;
					case 1u:
						num5 = -1032030255;
						goto IL_0032;
					case 4u:
						goto IL_006e;
					default:
						num5 = ((int)num4 * -66015095) ^ -692580472;
						goto IL_0032;
					case 3u:
						goto IL_013c;
						IL_0032:
						while (true)
						{
							switch ((num4 = (uint)num5 ^ 0xFF79777Au) % 9)
							{
							case 0u:
								break;
							default:
								goto IL_0067;
							case 6u:
								goto IL_006e;
							case 7u:
								num7 = QjbDrqHEFdfqgIwqHOfKDxSqLzYW[num].VvRXueeCQWAkOrVODLwRaaIfwXbu(rangeDecoder);
								num5 = -857460693;
								continue;
							case 5u:
								num5 = ((int)num4 * -52096326) ^ 0xFD623AE;
								continue;
							case 8u:
								num8 |= num7 << num6;
								num6++;
								num5 = (int)(num4 * 1857351181) ^ -1023919408;
								continue;
							case 4u:
								goto IL_00ef;
							case 3u:
								num <<= 1;
								num += num7;
								num5 = ((int)num4 * -1095318498) ^ -1318492008;
								continue;
							case 2u:
								num6 = 0;
								num5 = (int)((num4 * 1968671239) ^ 0x40AB0BB0);
								continue;
							case 1u:
								goto IL_013c;
							}
							break;
							IL_00ef:
							int num9;
							if (num6 < TXfWixCuWroLyxiUbLLWdNBjLIVd)
							{
								num5 = -729207895;
								num9 = num5;
							}
							else
							{
								num5 = -1950280274;
								num9 = num5;
							}
						}
						goto case 1u;
						IL_013c:
						return num8;
						IL_006e:
						num8 = 0u;
						num2 = -1125313070;
						continue;
						IL_0067:
						num2 = -615863014;
						continue;
					}
					break;
				}
			}
		}

		internal static uint yoIfSxGBstNfztScIkvzmCpfkbvFb(qTlwluMfboqHwpvxffFKximbxSPc[] Models, uint startIndex, LskAzAdzfpHXVrCiFZhdoulFHvEi rangeDecoder, int NumBitLevels)
		{
			uint num = 1u;
			uint num4 = default(uint);
			int num8 = default(int);
			uint num6 = default(uint);
			uint num7 = default(uint);
			while (true)
			{
				int num2 = 787967614;
				while (true)
				{
					uint num3;
					int num5;
					switch ((num3 = (uint)num2 ^ 0x4ABE7F12u) % 5)
					{
					case 2u:
						break;
					case 3u:
						num5 = 1020778628;
						goto IL_0032;
					case 4u:
						goto IL_0072;
					default:
						num5 = ((int)num4 * -1053909412) ^ 0x732E4EA9;
						goto IL_0032;
					case 0u:
						goto IL_014b;
						IL_0032:
						while (true)
						{
							switch ((num4 = (uint)num5 ^ 0xC0E86DCu) % 10)
							{
							case 3u:
								break;
							default:
								goto IL_006b;
							case 2u:
								goto IL_0072;
							case 1u:
								num8 = 0;
								num5 = ((int)num4 * -1545081885) ^ -1716918185;
								continue;
							case 7u:
								num += num6;
								num5 = ((int)num4 * -1684884324) ^ -1617628985;
								continue;
							case 6u:
								num8++;
								num5 = ((int)num4 * -740366453) ^ -534425956;
								continue;
							case 0u:
								num <<= 1;
								num5 = ((int)num4 * -10814778) ^ -970996659;
								continue;
							case 4u:
								goto IL_00fd;
							case 9u:
								num7 |= num6 << num8;
								num5 = ((int)num4 * -864431898) ^ 0x6F60238A;
								continue;
							case 5u:
								num6 = Models[startIndex + num].VvRXueeCQWAkOrVODLwRaaIfwXbu(rangeDecoder);
								num5 = 939188902;
								continue;
							case 8u:
								goto IL_014b;
							}
							break;
							IL_00fd:
							int num9;
							if (num8 < NumBitLevels)
							{
								num5 = 308563127;
								num9 = num5;
							}
							else
							{
								num5 = 1427232220;
								num9 = num5;
							}
						}
						goto case 3u;
						IL_014b:
						return num7;
						IL_0072:
						num7 = 0u;
						num2 = 1966480166;
						continue;
						IL_006b:
						num2 = 1447978886;
						continue;
					}
					break;
				}
			}
		}
	}

	internal class LskAzAdzfpHXVrCiFZhdoulFHvEi
	{
		internal uint vmdZTGeNaTHbrJQKyusEODnKrBCHA;

		internal uint qByCOzHNMtXJiNmLCeiIfYENyrpP;

		internal Stream qKCirHDjvqqAzktXForAkcOxADfHA;

		internal void iGVwRXXVxFlqVEaNYEnvmrsYLZMc(Stream stream)
		{
			qKCirHDjvqqAzktXForAkcOxADfHA = stream;
			int num6 = default(int);
			while (true)
			{
				int num = 295222267;
				while (true)
				{
					uint num2;
					int num3;
					int num4;
					switch ((num2 = (uint)num ^ 0x60827D14u) % 5)
					{
					case 4u:
						break;
					case 1u:
						num3 = 147649507;
						goto IL_0036;
					case 0u:
						return;
					case 3u:
						goto IL_0085;
					default:
						{
							num3 = 1026843991;
							num4 = num3;
							goto IL_0036;
						}
						IL_0036:
						while (true)
						{
							uint num5;
							switch ((num5 = (uint)num3 ^ 0x46E91035u) % 9)
							{
							case 6u:
								break;
							default:
								goto IL_006a;
							case 0u:
								goto IL_0085;
							case 3u:
								qByCOzHNMtXJiNmLCeiIfYENyrpP = uint.MaxValue;
								num3 = (int)((num5 * 446301244) ^ 0x760CB419);
								continue;
							case 2u:
								num6++;
								num3 = (int)((num5 * 1567455983) ^ 0x2AF8D73E);
								continue;
							case 7u:
								num3 = ((int)num5 * -323655370) ^ -728319075;
								continue;
							case 1u:
								vmdZTGeNaTHbrJQKyusEODnKrBCHA = 0u;
								num3 = (int)(num5 * 1101625030) ^ -1033415793;
								continue;
							case 4u:
								vmdZTGeNaTHbrJQKyusEODnKrBCHA = (vmdZTGeNaTHbrJQKyusEODnKrBCHA << 8) | (byte)\u200f\u202c\u202a\u202b\u206e\u200e\u202d\u206c\u206f\u206c\u200f\u206f\u206c\u202a\u206b\u200c\u202a\u202a\u206f\u206c\u202c\u200b\u200c\u200e\u202c\u200f\u202d\u200b\u200f\u200e\u206a\u206f\u206d\u200e\u200f\u206d\u206a\u206c\u202a\u202e\u202e(qKCirHDjvqqAzktXForAkcOxADfHA);
								num3 = 699330394;
								continue;
							case 5u:
								num6 = 0;
								num3 = ((int)num5 * -1393629602) ^ -1781748578;
								continue;
							case 8u:
								return;
							}
							break;
						}
						goto case 1u;
						IL_0085:
						if (num6 < 5)
						{
							num = 267765938;
							continue;
						}
						num3 = 1676417943;
						num4 = num3;
						goto IL_0036;
						IL_006a:
						num = 269522376;
						continue;
					}
					break;
				}
			}
		}

		internal void DcRTJUcDTSYWkVuuHNgcxsXFgKEH()
		{
			qKCirHDjvqqAzktXForAkcOxADfHA = null;
		}

		internal void GxPsvqqvfsbzcgKjEpEdDFrHCByc()
		{
			while (true)
			{
				int num;
				int num2;
				if (qByCOzHNMtXJiNmLCeiIfYENyrpP < 16777216)
				{
					num = 17413884;
					num2 = num;
				}
				else
				{
					num = 10635519;
					num2 = num;
				}
				while (true)
				{
					uint num3;
					int num4;
					switch ((num3 = (uint)num ^ 0x3B694475u) % 4)
					{
					case 1u:
						vmdZTGeNaTHbrJQKyusEODnKrBCHA = (vmdZTGeNaTHbrJQKyusEODnKrBCHA << 8) | (byte)\u200f\u202c\u202a\u202b\u206e\u200e\u202d\u206c\u206f\u206c\u200f\u206f\u206c\u202a\u206b\u200c\u202a\u202a\u206f\u206c\u202c\u200b\u200c\u200e\u202c\u200f\u202d\u200b\u200f\u200e\u206a\u206f\u206d\u200e\u200f\u206d\u206a\u206c\u202a\u202e\u202e(qKCirHDjvqqAzktXForAkcOxADfHA);
						num4 = 545889727;
						goto IL_000a;
					case 3u:
						goto IL_0083;
					default:
						num4 = 978280472;
						goto IL_000a;
					case 0u:
						break;
					case 2u:
						return;
						IL_000a:
						while (true)
						{
							uint num5;
							switch ((num5 = (uint)num4 ^ 0x41BDE0DFu) % 6)
							{
							case 2u:
								num4 = 204274936;
								continue;
							case 3u:
								break;
							case 5u:
								return;
							case 4u:
								qByCOzHNMtXJiNmLCeiIfYENyrpP <<= 8;
								num4 = (int)(num5 * 1822957343) ^ -1960978661;
								continue;
							case 1u:
								goto IL_0083;
							default:
								goto IL_00b1;
							}
							break;
						}
						goto case 1u;
						IL_00b1:
						num = 765033073;
						continue;
						IL_0083:
						num = 17413884;
						continue;
					}
					break;
				}
			}
		}

		internal uint VhsZfOFIMiTWUtFEFmoRBvmCpiTG(int numTotalBits)
		{
			uint num = qByCOzHNMtXJiNmLCeiIfYENyrpP;
			uint num4 = default(uint);
			uint num8 = default(uint);
			uint num7 = default(uint);
			int num9 = default(int);
			uint num6 = default(uint);
			while (true)
			{
				int num2 = -1438293921;
				while (true)
				{
					uint num3;
					int num5;
					switch ((num3 = (uint)num2 ^ 0x966B3DB2u) % 5)
					{
					case 3u:
						break;
					case 1u:
						num5 = 407812427;
						goto IL_0037;
					case 0u:
						goto IL_009b;
					default:
						num5 = (int)((num4 * 500840762) ^ 0x6C26D947);
						goto IL_0037;
					case 4u:
						goto IL_01cb;
						IL_0037:
						while (true)
						{
							switch ((num4 = (uint)num5 ^ 0x4ACB27A9u) % 13)
							{
							case 11u:
								break;
							default:
								goto IL_007c;
							case 4u:
								goto IL_009b;
							case 9u:
								num8 = (num8 << 1) | (1 - num7);
								num5 = (int)((num4 * 1008872834) ^ 0x64C269BF);
								continue;
							case 8u:
								num <<= 8;
								num5 = ((int)num4 * -1286313821) ^ 0x2DD07EAD;
								continue;
							case 5u:
								num9--;
								num5 = 1251800020;
								continue;
							case 2u:
								num >>= 1;
								num7 = num6 - num >> 31;
								num5 = 1005914653;
								continue;
							case 7u:
							{
								int num10;
								int num11;
								if (num < 16777216)
								{
									num10 = 535072418;
									num11 = num10;
								}
								else
								{
									num10 = 1130621448;
									num11 = num10;
								}
								num5 = num10 ^ ((int)num4 * -1732016422);
								continue;
							}
							case 10u:
								num6 = vmdZTGeNaTHbrJQKyusEODnKrBCHA;
								num8 = 0u;
								num9 = numTotalBits;
								num5 = (int)((num4 * 452470600) ^ 0x2525EE44);
								continue;
							case 6u:
								goto IL_0159;
							case 12u:
								vmdZTGeNaTHbrJQKyusEODnKrBCHA = num6;
								num5 = (int)((num4 * 795209909) ^ 0x4FAFCFFD);
								continue;
							case 0u:
								num6 -= num & (num7 - 1);
								num5 = (int)(num4 * 2086322827) ^ -2105184000;
								continue;
							case 1u:
								num6 = (num6 << 8) | (byte)\u200f\u202c\u202a\u202b\u206e\u200e\u202d\u206c\u206f\u206c\u200f\u206f\u206c\u202a\u206b\u200c\u202a\u202a\u206f\u206c\u202c\u200b\u200c\u200e\u202c\u200f\u202d\u200b\u200f\u200e\u206a\u206f\u206d\u200e\u200f\u206d\u206a\u206c\u202a\u202e\u202e(qKCirHDjvqqAzktXForAkcOxADfHA);
								num5 = (int)(num4 * 1185536819) ^ -1070642305;
								continue;
							case 3u:
								goto IL_01cb;
							}
							break;
							IL_0159:
							int num12;
							if (num9 <= 0)
							{
								num5 = 1309310855;
								num12 = num5;
							}
							else
							{
								num5 = 2083471968;
								num12 = num5;
							}
						}
						goto case 1u;
						IL_01cb:
						return num8;
						IL_009b:
						qByCOzHNMtXJiNmLCeiIfYENyrpP = num;
						num2 = -222681774;
						continue;
						IL_007c:
						num2 = -545258529;
						continue;
					}
					break;
				}
			}
		}

		internal LskAzAdzfpHXVrCiFZhdoulFHvEi()
		{
		}

		static int \u200f\u202c\u202a\u202b\u206e\u200e\u202d\u206c\u206f\u206c\u200f\u206f\u206c\u202a\u206b\u200c\u202a\u202a\u206f\u206c\u202c\u200b\u200c\u200e\u202c\u200f\u202d\u200b\u200f\u200e\u206a\u206f\u206d\u200e\u200f\u206d\u206a\u206c\u202a\u202e\u202e(Stream P_0)
		{
			return P_0.ReadByte();
		}
	}

	internal class bkGzICCRcqqoumqsNkKmJBmoTtmt
	{
		internal class LHVPEMCKmkhCuHFpqVgFqbkswMWbA
		{
			internal readonly aeZYgUGqHdALyefYUuNWSMmNNKuMA[] btvQUkXcsDssOKhDBUgqoibrAPRh = new aeZYgUGqHdALyefYUuNWSMmNNKuMA[16];

			internal readonly aeZYgUGqHdALyefYUuNWSMmNNKuMA[] RRUEVsXACxCusNTrNdiMYxLdXKcq = new aeZYgUGqHdALyefYUuNWSMmNNKuMA[16];

			internal qTlwluMfboqHwpvxffFKximbxSPc dpQahwQAwCAHssYAfOYjUzpbuHAE;

			internal qTlwluMfboqHwpvxffFKximbxSPc fmMDvdskTJnuLTxmBAFZxRUALrIX;

			internal aeZYgUGqHdALyefYUuNWSMmNNKuMA wOjaYTLHSgfxCZTyjgJkhLsfnaCdA = new aeZYgUGqHdALyefYUuNWSMmNNKuMA(8);

			internal uint GYjifYgpxqSKgZIfToJWhcvUgElkA;

			internal void QIOESSUlRDTiegcZtNvZYQccdphP(uint numPosStates)
			{
				uint num = GYjifYgpxqSKgZIfToJWhcvUgElkA;
				while (true)
				{
					IL_007e:
					int num2;
					if (num >= numPosStates)
					{
						num2 = 959365873;
						goto IL_000e;
					}
					int num3 = -434005193;
					int num4 = num3;
					goto IL_0038;
					IL_0089:
					num3 = -1553095075;
					num4 = num3;
					goto IL_0038;
					IL_0033:
					num3 = -434005193;
					goto IL_0038;
					IL_0038:
					while (true)
					{
						uint num5;
						switch ((num5 = (uint)num3 ^ 0xCB312AE5u) % 7)
						{
						case 5u:
							break;
						default:
							goto IL_0063;
						case 2u:
							goto IL_007e;
						case 4u:
							num++;
							num3 = (int)((num5 * 1896946277) ^ 0x552C94F7);
							continue;
						case 3u:
							GYjifYgpxqSKgZIfToJWhcvUgElkA = numPosStates;
							num3 = ((int)num5 * -1418458338) ^ 0x4D9A7CEF;
							continue;
						case 1u:
							btvQUkXcsDssOKhDBUgqoibrAPRh[num] = new aeZYgUGqHdALyefYUuNWSMmNNKuMA(3);
							num3 = -879070258;
							continue;
						case 6u:
							RRUEVsXACxCusNTrNdiMYxLdXKcq[num] = new aeZYgUGqHdALyefYUuNWSMmNNKuMA(3);
							num3 = (int)((num5 * 1408626185) ^ 0x42A956D9);
							continue;
						case 0u:
							return;
						}
						break;
					}
					goto IL_0033;
					IL_0063:
					num2 = 1031968578;
					goto IL_000e;
					IL_000e:
					while (true)
					{
						uint num6;
						switch ((num6 = (uint)num2 ^ 0x54595517u) % 5)
						{
						case 2u:
							num2 = 497147468;
							continue;
						case 1u:
							break;
						case 3u:
							return;
						case 0u:
							goto IL_007e;
						default:
							goto IL_0089;
						}
						break;
					}
					goto IL_0033;
				}
			}

			internal void APvXmeXRnRguiaVrGUUYounZHfnp()
			{
				dpQahwQAwCAHssYAfOYjUzpbuHAE.vktztXwgzHmcejCzUrVqJJFeasLO();
				uint num5 = default(uint);
				while (true)
				{
					int num = -20319066;
					while (true)
					{
						uint num2;
						int num3;
						int num6;
						switch ((num2 = (uint)num ^ 0xA7B64388u) % 7)
						{
						case 5u:
							break;
						case 1u:
							num5 = 0u;
							num = (int)(num2 * 1569519618) ^ -1257067107;
							continue;
						case 3u:
							btvQUkXcsDssOKhDBUgqoibrAPRh[num5].LMRwAggtQaoUDlOJFtNTHzGhgOCt();
							RRUEVsXACxCusNTrNdiMYxLdXKcq[num5].LMRwAggtQaoUDlOJFtNTHzGhgOCt();
							num5++;
							num = -676977055;
							continue;
						case 0u:
							goto IL_0095;
						default:
							num3 = 2093327006;
							goto IL_009a;
						case 6u:
							goto IL_00e2;
						case 2u:
							goto IL_0116;
							IL_0095:
							num3 = 1915752894;
							goto IL_009a;
							IL_009a:
							while (true)
							{
								uint num4;
								switch ((num4 = (uint)num3 ^ 0x1057865u) % 5)
								{
								case 2u:
									break;
								case 0u:
									goto IL_0095;
								default:
									goto IL_00bd;
								case 1u:
									goto IL_00e2;
								case 4u:
									fmMDvdskTJnuLTxmBAFZxRUALrIX.vktztXwgzHmcejCzUrVqJJFeasLO();
									num3 = (int)(num4 * 440005596) ^ -461784788;
									continue;
								case 3u:
									goto IL_0116;
								}
								break;
							}
							goto case 3u;
							IL_0116:
							wOjaYTLHSgfxCZTyjgJkhLsfnaCdA.LMRwAggtQaoUDlOJFtNTHzGhgOCt();
							return;
							IL_00e2:
							if (num5 >= GYjifYgpxqSKgZIfToJWhcvUgElkA)
							{
								num3 = 705125240;
								num6 = num3;
							}
							else
							{
								num3 = 1915752894;
								num6 = num3;
							}
							goto IL_009a;
							IL_00bd:
							num = -1263917312;
							continue;
						}
						break;
					}
				}
			}

			internal uint FCRhAPGSvQyerOQfqyRFuOEqxWNt(LskAzAdzfpHXVrCiFZhdoulFHvEi rangeDecoder, uint posState)
			{
				if (dpQahwQAwCAHssYAfOYjUzpbuHAE.VvRXueeCQWAkOrVODLwRaaIfwXbu(rangeDecoder) == 0)
				{
					goto IL_0011;
				}
				goto IL_00d6;
				IL_00d6:
				uint num = 8u;
				int num2 = 2105154437;
				goto IL_0070;
				IL_0070:
				uint num3 = default(uint);
				while (true)
				{
					switch ((num3 = (uint)num2 ^ 0x1E1FE678u) % 8)
					{
					case 3u:
						break;
					case 7u:
						goto IL_006b;
					default:
						goto IL_009f;
					case 4u:
						num += wOjaYTLHSgfxCZTyjgJkhLsfnaCdA.HhoRUiWNsRSLUkVpugpJMvDjzcPK(rangeDecoder);
						num2 = (int)((num3 * 793082784) ^ 0x1A8FED0E);
						continue;
					case 0u:
						goto IL_00d6;
					case 1u:
						return btvQUkXcsDssOKhDBUgqoibrAPRh[posState].HhoRUiWNsRSLUkVpugpJMvDjzcPK(rangeDecoder);
					case 5u:
					{
						int num4;
						int num5;
						if (fmMDvdskTJnuLTxmBAFZxRUALrIX.VvRXueeCQWAkOrVODLwRaaIfwXbu(rangeDecoder) != 0)
						{
							num4 = 194767119;
							num5 = num4;
						}
						else
						{
							num4 = 709119014;
							num5 = num4;
						}
						num2 = num4 ^ ((int)num3 * -620655999);
						continue;
					}
					case 2u:
						num += 8;
						num2 = 2015599924;
						continue;
					case 6u:
						goto IL_013c;
					}
					break;
				}
				goto IL_003b;
				IL_009f:
				int num6 = 1875548293;
				goto IL_0016;
				IL_00a9:
				num2 = (int)(num3 * 330447405) ^ -221075799;
				goto IL_0070;
				IL_006b:
				num2 = 1163948169;
				goto IL_0070;
				IL_0011:
				num6 = 111457043;
				goto IL_0016;
				IL_013c:
				return num;
				IL_0016:
				uint num7;
				switch ((num7 = (uint)num6 ^ 0x7A852132u) % 5)
				{
				case 2u:
					break;
				case 0u:
					goto IL_003b;
				case 1u:
					goto IL_006b;
				default:
					goto IL_00a9;
				case 3u:
					goto IL_013c;
				}
				goto IL_0011;
				IL_003b:
				num += RRUEVsXACxCusNTrNdiMYxLdXKcq[posState].HhoRUiWNsRSLUkVpugpJMvDjzcPK(rangeDecoder);
				num6 = 704187287;
				goto IL_0016;
			}

			internal LHVPEMCKmkhCuHFpqVgFqbkswMWbA()
			{
			}
		}

		internal class uBMSMyViZIVSbDBaeYnqHecwyRzo
		{
			internal struct OsMAipdXggJddvmHbhAyLFrRMfAfb
			{
				internal qTlwluMfboqHwpvxffFKximbxSPc[] IzusEYgSbNjDLwNCjckuBLfgYDwbA;

				internal void QCiTfrtZcSmnhvuQwsXHmljsoumc()
				{
					IzusEYgSbNjDLwNCjckuBLfgYDwbA = new qTlwluMfboqHwpvxffFKximbxSPc[768];
				}

				internal void ssewtUVhyqfOurZunUAudUHYTbFM()
				{
					int num = 0;
					uint num5 = default(uint);
					while (true)
					{
						int num2 = -1989998333;
						while (true)
						{
							uint num3;
							int num4;
							switch ((num3 = (uint)num2 ^ 0x846919D6u) % 4)
							{
							case 0u:
								break;
							case 1u:
								num4 = -1372127267;
								goto IL_002d;
							case 3u:
								return;
							default:
								goto IL_0068;
								IL_002d:
								while (true)
								{
									switch ((num5 = (uint)num4 ^ 0x8B7D8F98u) % 5)
									{
									case 4u:
										break;
									default:
										goto IL_0050;
									case 3u:
										goto IL_0068;
									case 0u:
										IzusEYgSbNjDLwNCjckuBLfgYDwbA[num].vktztXwgzHmcejCzUrVqJJFeasLO();
										num++;
										num4 = -838228340;
										continue;
									case 1u:
										goto IL_0093;
									case 2u:
										return;
									}
									break;
									IL_0093:
									int num6;
									if (num < 768)
									{
										num4 = -570471214;
										num6 = num4;
									}
									else
									{
										num4 = -56496089;
										num6 = num4;
									}
								}
								goto case 1u;
								IL_0068:
								num4 = ((int)num5 * -109355476) ^ -463599792;
								goto IL_002d;
							}
							break;
							IL_0050:
							num2 = -239626427;
						}
					}
				}

				internal byte SYZBjSiByPlZiWPPKhTjnUjuMtgjA(LskAzAdzfpHXVrCiFZhdoulFHvEi rangeDecoder)
				{
					uint num = 1u;
					while (true)
					{
						int num2 = -1484826956;
						while (true)
						{
							uint num3;
							int num4;
							switch ((num3 = (uint)num2 ^ 0xDDAF1E0Eu) % 5)
							{
							case 2u:
								break;
							case 3u:
								num4 = -1852513375;
								goto IL_0031;
							case 1u:
								goto IL_0068;
							default:
								num4 = -1216933556;
								goto IL_0031;
							case 0u:
								goto IL_00ae;
								IL_0031:
								while (true)
								{
									uint num5;
									switch ((num5 = (uint)num4 ^ 0xC5E3E6D3u) % 4)
									{
									case 0u:
										break;
									default:
										goto IL_0050;
									case 2u:
										goto IL_0068;
									case 3u:
									{
										int num6;
										int num7;
										if (num < 256)
										{
											num6 = -150471071;
											num7 = num6;
										}
										else
										{
											num6 = -119729550;
											num7 = num6;
										}
										num4 = num6 ^ ((int)num5 * -206108096);
										continue;
									}
									case 1u:
										goto IL_00ae;
									}
									break;
								}
								goto case 3u;
								IL_00ae:
								return (byte)num;
								IL_0068:
								num = (num << 1) | IzusEYgSbNjDLwNCjckuBLfgYDwbA[num].VvRXueeCQWAkOrVODLwRaaIfwXbu(rangeDecoder);
								num2 = -1516497553;
								continue;
								IL_0050:
								num2 = -152207114;
								continue;
							}
							break;
						}
					}
				}

				internal byte LEGMaHaIkqDFybzxqEiHfzIqctXdA(LskAzAdzfpHXVrCiFZhdoulFHvEi rangeDecoder, byte matchByte)
				{
					uint num = 1u;
					uint num7 = default(uint);
					uint num6 = default(uint);
					while (true)
					{
						int num2 = -1162327498;
						while (true)
						{
							uint num3;
							int num4;
							switch ((num3 = (uint)num2 ^ 0xB0B330CEu) % 5)
							{
							case 0u:
								break;
							case 1u:
								num4 = 1943845198;
								goto IL_0032;
							case 3u:
								goto IL_0075;
							default:
								num4 = 91165358;
								goto IL_0032;
							case 2u:
								goto IL_0184;
								IL_0032:
								while (true)
								{
									uint num5;
									switch ((num5 = (uint)num4 ^ 0x47C87CFBu) % 11)
									{
									case 3u:
										break;
									default:
										goto IL_006e;
									case 2u:
										goto IL_0075;
									case 6u:
										num4 = (int)((num5 * 879059758) ^ 0xB7AD8AB);
										continue;
									case 8u:
										num4 = (int)(num5 * 1566206745) ^ -1397537691;
										continue;
									case 10u:
										goto IL_00c2;
									case 1u:
									{
										num = (num << 1) | num7;
										int num8;
										int num9;
										if (num6 == num7)
										{
											num8 = -1011925613;
											num9 = num8;
										}
										else
										{
											num8 = -1030302057;
											num9 = num8;
										}
										num4 = num8 ^ (int)(num5 * 1718322505);
										continue;
									}
									case 9u:
										goto IL_0104;
									case 4u:
										matchByte <<= 1;
										num4 = ((int)num5 * -346561113) ^ -1088639518;
										continue;
									case 7u:
										num7 = IzusEYgSbNjDLwNCjckuBLfgYDwbA[(1 + num6 << 8) + num].VvRXueeCQWAkOrVODLwRaaIfwXbu(rangeDecoder);
										num4 = ((int)num5 * -1330916065) ^ -571688018;
										continue;
									case 5u:
										num = (num << 1) | IzusEYgSbNjDLwNCjckuBLfgYDwbA[num].VvRXueeCQWAkOrVODLwRaaIfwXbu(rangeDecoder);
										num4 = 277791305;
										continue;
									case 0u:
										goto IL_0184;
									}
									break;
									IL_0104:
									int num10;
									if (num >= 256)
									{
										num4 = 2027044101;
										num10 = num4;
									}
									else
									{
										num4 = 97249673;
										num10 = num4;
									}
									continue;
									IL_00c2:
									int num11;
									if (num >= 256)
									{
										num4 = 818077611;
										num11 = num4;
									}
									else
									{
										num4 = 1943845198;
										num11 = num4;
									}
								}
								goto case 1u;
								IL_0184:
								return (byte)num;
								IL_0075:
								num6 = (uint)(matchByte >> 7) & 1u;
								num2 = -1829651372;
								continue;
								IL_006e:
								num2 = -491706375;
								continue;
							}
							break;
						}
					}
				}
			}

			internal OsMAipdXggJddvmHbhAyLFrRMfAfb[] NjRMhPcnAVqICLNHqoJWoGFkFlfM;

			internal int REIaXnrTxCIFEpDxpfiuJjxcDBbd;

			internal int WbufFKgMzeYHFHEwcbhHnURGaqudb;

			internal uint zoWtMcuHCserBzgvHFsIkauRLpCRA;

			internal void inDdpvyRwPaLBKoylBHuibLInUWCc(int numPosBits, int numPrevBits)
			{
				if (NjRMhPcnAVqICLNHqoJWoGFkFlfM != null)
				{
					goto IL_000b;
				}
				goto IL_00c7;
				IL_00c7:
				REIaXnrTxCIFEpDxpfiuJjxcDBbd = numPosBits;
				zoWtMcuHCserBzgvHFsIkauRLpCRA = (uint)((1 << numPosBits) - 1);
				int num = 1099922862;
				goto IL_003a;
				IL_003a:
				uint num2 = default(uint);
				uint num5 = default(uint);
				uint num6 = default(uint);
				while (true)
				{
					switch ((num2 = (uint)num ^ 0x2DEDF92Au) % 12)
					{
					case 6u:
						break;
					default:
						goto IL_007a;
					case 5u:
						goto IL_0098;
					case 9u:
						goto IL_00c7;
					case 11u:
						goto IL_00e6;
					case 2u:
						num5 = 0u;
						num = ((int)num2 * -1857867604) ^ 0x7A4DB65D;
						continue;
					case 8u:
						WbufFKgMzeYHFHEwcbhHnURGaqudb = numPrevBits;
						num = (int)((num2 * 1723217568) ^ 0x1423A6E);
						continue;
					case 3u:
						NjRMhPcnAVqICLNHqoJWoGFkFlfM = new OsMAipdXggJddvmHbhAyLFrRMfAfb[num6];
						num = (int)(num2 * 2121735258) ^ -376788070;
						continue;
					case 1u:
						NjRMhPcnAVqICLNHqoJWoGFkFlfM[num5].QCiTfrtZcSmnhvuQwsXHmljsoumc();
						num5++;
						num = 907165717;
						continue;
					case 0u:
						num6 = (uint)(1 << WbufFKgMzeYHFHEwcbhHnURGaqudb + REIaXnrTxCIFEpDxpfiuJjxcDBbd);
						num = (int)(num2 * 254286741) ^ -328459183;
						continue;
					case 10u:
					{
						int num3;
						int num4;
						if (REIaXnrTxCIFEpDxpfiuJjxcDBbd == numPosBits)
						{
							num3 = 1726937446;
							num4 = num3;
						}
						else
						{
							num3 = 2024030807;
							num4 = num3;
						}
						num = num3 ^ ((int)num2 * -1072301818);
						continue;
					}
					case 4u:
						return;
					case 7u:
						return;
					}
					break;
					IL_00e6:
					int num7;
					if (num5 >= num6)
					{
						num = 428023097;
						num7 = num;
					}
					else
					{
						num = 1207153219;
						num7 = num;
					}
				}
				goto IL_0035;
				IL_007a:
				int num8 = -1897994822;
				goto IL_0010;
				IL_0010:
				uint num9;
				switch ((num9 = (uint)num8 ^ 0xD963F468u) % 5)
				{
				case 4u:
					break;
				case 1u:
					goto IL_0035;
				case 3u:
					return;
				case 0u:
					goto IL_0098;
				default:
					goto IL_00ab;
				}
				goto IL_000b;
				IL_0035:
				num = 610772219;
				goto IL_003a;
				IL_0098:
				if (WbufFKgMzeYHFHEwcbhHnURGaqudb != numPrevBits)
				{
					num8 = -1813371701;
					goto IL_0010;
				}
				int num10 = -841907256;
				int num11 = num10;
				goto IL_00b9;
				IL_00b9:
				num = num10 ^ (int)(num2 * 809085488);
				goto IL_003a;
				IL_00ab:
				num10 = -2125935733;
				num11 = num10;
				goto IL_00b9;
				IL_000b:
				num8 = -962432598;
				goto IL_0010;
			}

			internal void nrjTBtVjAXDErvdyyengxOoXynRB()
			{
				uint num = (uint)(1 << WbufFKgMzeYHFHEwcbhHnURGaqudb + REIaXnrTxCIFEpDxpfiuJjxcDBbd);
				uint num2 = 0u;
				uint num6 = default(uint);
				while (true)
				{
					int num3 = -1134985276;
					while (true)
					{
						uint num4;
						int num5;
						switch ((num4 = (uint)num3 ^ 0xEE439587u) % 4)
						{
						case 0u:
							break;
						case 3u:
							num5 = 553479059;
							goto IL_0040;
						case 1u:
							return;
						default:
							goto IL_007b;
							IL_0040:
							while (true)
							{
								switch ((num6 = (uint)num5 ^ 0x5A64u) % 5)
								{
								case 2u:
									break;
								default:
									goto IL_0063;
								case 1u:
									goto IL_007b;
								case 3u:
									NjRMhPcnAVqICLNHqoJWoGFkFlfM[num2].ssewtUVhyqfOurZunUAudUHYTbFM();
									num2++;
									num5 = 1893759619;
									continue;
								case 4u:
									goto IL_00a6;
								case 0u:
									return;
								}
								break;
								IL_00a6:
								int num7;
								if (num2 >= num)
								{
									num5 = 382884592;
									num7 = num5;
								}
								else
								{
									num5 = 1227648555;
									num7 = num5;
								}
							}
							goto case 3u;
							IL_007b:
							num5 = (int)(num6 * 1173032383) ^ -1714509622;
							goto IL_0040;
						}
						break;
						IL_0063:
						num3 = -1840887758;
					}
				}
			}

			internal uint MMGAjxPdYHyXHaYcUFCGWCqbhlIh(uint pos, byte prevByte)
			{
				return ((pos & zoWtMcuHCserBzgvHFsIkauRLpCRA) << WbufFKgMzeYHFHEwcbhHnURGaqudb) + (uint)(prevByte >> 8 - WbufFKgMzeYHFHEwcbhHnURGaqudb);
			}

			internal byte RLlIqySrxkqxxaCsipiDdCWuisxc(LskAzAdzfpHXVrCiFZhdoulFHvEi rangeDecoder, uint pos, byte prevByte)
			{
				return NjRMhPcnAVqICLNHqoJWoGFkFlfM[MMGAjxPdYHyXHaYcUFCGWCqbhlIh(pos, prevByte)].SYZBjSiByPlZiWPPKhTjnUjuMtgjA(rangeDecoder);
			}

			internal byte ldDkqaNMjAbkcQsrFNUKDdgYrMwE(LskAzAdzfpHXVrCiFZhdoulFHvEi rangeDecoder, uint pos, byte prevByte, byte matchByte)
			{
				return NjRMhPcnAVqICLNHqoJWoGFkFlfM[MMGAjxPdYHyXHaYcUFCGWCqbhlIh(pos, prevByte)].LEGMaHaIkqDFybzxqEiHfzIqctXdA(rangeDecoder, matchByte);
			}

			internal uBMSMyViZIVSbDBaeYnqHecwyRzo()
			{
			}
		}

		internal readonly qTlwluMfboqHwpvxffFKximbxSPc[] FrXWQCpFcxWvQEFbPMtsYtuOIpcR = new qTlwluMfboqHwpvxffFKximbxSPc[192];

		internal readonly qTlwluMfboqHwpvxffFKximbxSPc[] IjHbqaHpYTXImVtJHVcwHXRhNqSmA = new qTlwluMfboqHwpvxffFKximbxSPc[192];

		internal readonly qTlwluMfboqHwpvxffFKximbxSPc[] ucibpXLYTtbprAPLUgoLaCGYQKUiA = new qTlwluMfboqHwpvxffFKximbxSPc[12];

		internal readonly qTlwluMfboqHwpvxffFKximbxSPc[] ePlCNdhbUYVmJSyLdmlNSyTOVkxUA = new qTlwluMfboqHwpvxffFKximbxSPc[12];

		internal readonly qTlwluMfboqHwpvxffFKximbxSPc[] QqtDLmidnrKpRQvydLZCEcINPIyQ = new qTlwluMfboqHwpvxffFKximbxSPc[12];

		internal readonly qTlwluMfboqHwpvxffFKximbxSPc[] QuIrjSREJBGjOwAWVEhDhWEUaWkG = new qTlwluMfboqHwpvxffFKximbxSPc[12];

		internal readonly LHVPEMCKmkhCuHFpqVgFqbkswMWbA PzFEDaZuiTwBUHqjmFwkmjeDbklt = new LHVPEMCKmkhCuHFpqVgFqbkswMWbA();

		internal readonly uBMSMyViZIVSbDBaeYnqHecwyRzo KGSPcQIGtVAdaMzSCMWjklmLpTZn = new uBMSMyViZIVSbDBaeYnqHecwyRzo();

		internal readonly sUAaGpCXBuAtVBhaOpVOjsyjqiNN nwAMjajrHVNYcLVjltvwPHhmRXms = new sUAaGpCXBuAtVBhaOpVOjsyjqiNN();

		internal readonly qTlwluMfboqHwpvxffFKximbxSPc[] VIegCQDoDIuHUCOAWxtwiVlcHiIdb = new qTlwluMfboqHwpvxffFKximbxSPc[114];

		internal readonly aeZYgUGqHdALyefYUuNWSMmNNKuMA[] uJGuOVVQlEbEUxveDzKyPjBxMTnf = new aeZYgUGqHdALyefYUuNWSMmNNKuMA[4];

		internal readonly LskAzAdzfpHXVrCiFZhdoulFHvEi PQlYSWYsAymrlpWtxNhGZLoVjcMJ = new LskAzAdzfpHXVrCiFZhdoulFHvEi();

		internal readonly LHVPEMCKmkhCuHFpqVgFqbkswMWbA AegLcgTULgUZEsyukUezzmMCurfo = new LHVPEMCKmkhCuHFpqVgFqbkswMWbA();

		internal bool vHNuGyTKrAyzUDcuEduOhmbYBmEjb;

		internal uint kMXqXmPZKQIwwVPOKVOkxGKaqFqB;

		internal uint iaxMEHOpntjzjEARkCMhqCJPnKRfA;

		internal aeZYgUGqHdALyefYUuNWSMmNNKuMA ISNPGwsLwjqSMhDJZVEEYacTJuGF = new aeZYgUGqHdALyefYUuNWSMmNNKuMA(4);

		internal uint cJlczwZnZFIuGLdyKSFTXNegICNK;

		internal bkGzICCRcqqoumqsNkKmJBmoTtmt()
		{
			int num5 = default(int);
			uint num3 = default(uint);
			while (true)
			{
				int num = 1248529767;
				while (true)
				{
					uint num2;
					int num4;
					switch ((num2 = (uint)num ^ 0x677F4498u) % 6)
					{
					case 2u:
						break;
					case 5u:
						num5 = 0;
						num = ((int)num2 * -547214059) ^ -252825505;
						continue;
					case 0u:
						return;
					case 1u:
						kMXqXmPZKQIwwVPOKVOkxGKaqFqB = uint.MaxValue;
						num = 743315333;
						continue;
					case 3u:
						goto IL_0117;
					default:
						{
							num4 = ((int)num3 * -2037721338) ^ 0x61324BB7;
							goto IL_011c;
						}
						IL_0117:
						num4 = 46693179;
						goto IL_011c;
						IL_011c:
						while (true)
						{
							switch ((num3 = (uint)num4 ^ 0x7D9E6ED2u) % 6)
							{
							case 5u:
								break;
							case 3u:
								goto IL_0117;
							default:
								goto IL_0143;
							case 1u:
								num4 = (int)((num3 * 2086661088) ^ 0xF3967FC);
								continue;
							case 4u:
								uJGuOVVQlEbEUxveDzKyPjBxMTnf[num5] = new aeZYgUGqHdALyefYUuNWSMmNNKuMA(6);
								num5++;
								num4 = 1595328092;
								continue;
							case 0u:
								goto IL_0188;
							case 2u:
								return;
							}
							break;
							IL_0188:
							int num6;
							if ((long)num5 >= 4L)
							{
								num4 = 1565509700;
								num6 = num4;
							}
							else
							{
								num4 = 1301688910;
								num6 = num4;
							}
						}
						goto case 1u;
						IL_0143:
						num = 1977320480;
						continue;
					}
					break;
				}
			}
		}

		internal void gVgjqIHzsgrlyiPTRxZKveWhKMV(uint dictionarySize)
		{
			if (kMXqXmPZKQIwwVPOKVOkxGKaqFqB == dictionarySize)
			{
				return;
			}
			uint num3 = default(uint);
			uint windowSize = default(uint);
			while (true)
			{
				int num = -24681760;
				while (true)
				{
					uint num2;
					int num4;
					switch ((num2 = (uint)num ^ 0x9F96E5B0u) % 5)
					{
					case 0u:
						break;
					case 4u:
						num4 = -1961396035;
						goto IL_003b;
					case 2u:
						return;
					case 1u:
						goto IL_0076;
					default:
						{
							iaxMEHOpntjzjEARkCMhqCJPnKRfA = \u200d\u202c\u202b\u200c\u200d\u206b\u206f\u202e\u206b\u200c\u200f\u206f\u200d\u200e\u200f\u200b\u206e\u202d\u200d\u200f\u200b\u206d\u206d\u200b\u206c\u206f\u206d\u200b\u202a\u206f\u206e\u202d\u202b\u202a\u200d\u202c\u202c\u202c\u206f\u202e(kMXqXmPZKQIwwVPOKVOkxGKaqFqB, 1u);
							num4 = (int)((num3 * 205434607) ^ 0x1DC6C416);
							goto IL_003b;
						}
						IL_003b:
						while (true)
						{
							switch ((num3 = (uint)num4 ^ 0xD7C73C54u) % 5)
							{
							case 2u:
								break;
							default:
								goto IL_005e;
							case 1u:
								goto IL_0076;
							case 3u:
								nwAMjajrHVNYcLVjltvwPHhmRXms.MZXSiPWMMSgHHLQawjCmvKPBgqCX(windowSize);
								num4 = (int)(num3 * 1602548842) ^ -934007751;
								continue;
							case 0u:
								windowSize = \u200d\u202c\u202b\u200c\u200d\u206b\u206f\u202e\u206b\u200c\u200f\u206f\u200d\u200e\u200f\u200b\u206e\u202d\u200d\u200f\u200b\u206d\u206d\u200b\u206c\u206f\u206d\u200b\u202a\u206f\u206e\u202d\u202b\u202a\u200d\u202c\u202c\u202c\u206f\u202e(iaxMEHOpntjzjEARkCMhqCJPnKRfA, 4096u);
								num4 = (int)(num3 * 1814085712) ^ -1449319669;
								continue;
							case 4u:
								return;
							}
							break;
						}
						goto case 4u;
						IL_0076:
						kMXqXmPZKQIwwVPOKVOkxGKaqFqB = dictionarySize;
						num = -866494347;
						continue;
						IL_005e:
						num = -598521942;
						continue;
					}
					break;
				}
			}
		}

		internal void ApxeDbzvBJSLOoiCzUrbpacVlpmM(int lp, int lc)
		{
			KGSPcQIGtVAdaMzSCMWjklmLpTZn.inDdpvyRwPaLBKoylBHuibLInUWCc(lp, lc);
		}

		internal void OAdUyLgJXrAZhKIMaAKNKCImenON(int pb)
		{
			uint num = (uint)(1 << pb);
			uint num4 = default(uint);
			while (true)
			{
				int num2 = -1850097478;
				while (true)
				{
					uint num3;
					int num5;
					switch ((num3 = (uint)num2 ^ 0xF7A56A9Au) % 5)
					{
					case 4u:
						break;
					case 2u:
						num5 = 334502037;
						goto IL_0036;
					case 3u:
						return;
					case 1u:
						goto IL_0069;
					default:
						{
							AegLcgTULgUZEsyukUezzmMCurfo.QIOESSUlRDTiegcZtNvZYQccdphP(num);
							cJlczwZnZFIuGLdyKSFTXNegICNK = num - 1;
							num5 = ((int)num4 * -1863001218) ^ -736047100;
							goto IL_0036;
						}
						IL_0036:
						switch ((num4 = (uint)num5 ^ 0xF4E74CAu) % 3)
						{
						case 2u:
							break;
						default:
							goto IL_0051;
						case 1u:
							goto IL_0069;
						case 0u:
							return;
						}
						goto case 2u;
						IL_0069:
						PzFEDaZuiTwBUHqjmFwkmjeDbklt.QIOESSUlRDTiegcZtNvZYQccdphP(num);
						num2 = -1188985279;
						continue;
						IL_0051:
						num2 = -1095425160;
						continue;
					}
					break;
				}
			}
		}

		internal void OXVmaAhiEONCawLFmOCotVaJAKbr(Stream inStream, Stream outStream)
		{
			PQlYSWYsAymrlpWtxNhGZLoVjcMJ.iGVwRXXVxFlqVEaNYEnvmrsYLZMc(inStream);
			uint num4 = default(uint);
			uint num6 = default(uint);
			while (true)
			{
				int num = 1768673781;
				while (true)
				{
					uint num2;
					int num3;
					switch ((num2 = (uint)num ^ 0x14592147u) % 6)
					{
					case 3u:
						break;
					case 2u:
						num3 = 622746397;
						goto IL_0043;
					case 0u:
						goto IL_00bd;
					case 5u:
						return;
					case 1u:
						num4++;
						num = (int)(num2 * 1322456198) ^ -1842652349;
						continue;
					default:
						{
							num3 = 31849432;
							goto IL_0043;
						}
						IL_0043:
						while (true)
						{
							uint num5;
							switch ((num5 = (uint)num3 ^ 0x453B7032u) % 24)
							{
							case 22u:
								break;
							default:
								goto IL_00b3;
							case 2u:
								goto IL_00bd;
							case 19u:
								goto IL_0111;
							case 23u:
								KGSPcQIGtVAdaMzSCMWjklmLpTZn.nrjTBtVjAXDErvdyyengxOoXynRB();
								num3 = (int)(num5 * 644152158) ^ -1183708520;
								continue;
							case 18u:
								goto IL_0147;
							case 3u:
								ePlCNdhbUYVmJSyLdmlNSyTOVkxUA[num4].vktztXwgzHmcejCzUrVqJJFeasLO();
								num3 = (int)((num5 * 1748439317) ^ 0x4D8B3FC5);
								continue;
							case 0u:
								num4 = 0u;
								num3 = ((int)num5 * -1239921328) ^ 0x5A4F2C5B;
								continue;
							case 16u:
								QqtDLmidnrKpRQvydLZCEcINPIyQ[num4].vktztXwgzHmcejCzUrVqJJFeasLO();
								num3 = (int)((num5 * 27502551) ^ 0x3D29AF34);
								continue;
							case 9u:
								num3 = ((int)num5 * -1932028029) ^ 0x3DF1380D;
								continue;
							case 14u:
								num4++;
								num3 = ((int)num5 * -1034322571) ^ -1080678305;
								continue;
							case 6u:
								QuIrjSREJBGjOwAWVEhDhWEUaWkG[num4].vktztXwgzHmcejCzUrVqJJFeasLO();
								num3 = ((int)num5 * -1478233838) ^ 0x7B83C288;
								continue;
							case 12u:
								PzFEDaZuiTwBUHqjmFwkmjeDbklt.APvXmeXRnRguiaVrGUUYounZHfnp();
								num3 = (int)(num5 * 828580559) ^ -1724370439;
								continue;
							case 21u:
								num6 = 0u;
								num3 = 1438946339;
								continue;
							case 15u:
								AegLcgTULgUZEsyukUezzmMCurfo.APvXmeXRnRguiaVrGUUYounZHfnp();
								num3 = ((int)num5 * -391922386) ^ -1357373268;
								continue;
							case 1u:
								goto IL_024b;
							case 5u:
								ucibpXLYTtbprAPLUgoLaCGYQKUiA[num4].vktztXwgzHmcejCzUrVqJJFeasLO();
								num3 = ((int)num5 * -524256934) ^ 0x7B174A33;
								continue;
							case 20u:
								ISNPGwsLwjqSMhDJZVEEYacTJuGF.LMRwAggtQaoUDlOJFtNTHzGhgOCt();
								num3 = ((int)num5 * -435310705) ^ -787543403;
								continue;
							case 17u:
								uJGuOVVQlEbEUxveDzKyPjBxMTnf[num4].LMRwAggtQaoUDlOJFtNTHzGhgOCt();
								num4++;
								num3 = 187212763;
								continue;
							case 8u:
								num6++;
								num3 = ((int)num5 * -1072764673) ^ 0x40AB676;
								continue;
							case 13u:
								num4 = 0u;
								num3 = (int)((num5 * 695068560) ^ 0x1D01B408);
								continue;
							case 10u:
							{
								uint num7 = (num4 << 4) + num6;
								FrXWQCpFcxWvQEFbPMtsYtuOIpcR[num7].vktztXwgzHmcejCzUrVqJJFeasLO();
								IjHbqaHpYTXImVtJHVcwHXRhNqSmA[num7].vktztXwgzHmcejCzUrVqJJFeasLO();
								num3 = 1890890250;
								continue;
							}
							case 7u:
								nwAMjajrHVNYcLVjltvwPHhmRXms.ZtLrsBwRCKVWeNGWWHJGfmloouLc(outStream, vHNuGyTKrAyzUDcuEduOhmbYBmEjb);
								num4 = 0u;
								num3 = (int)(num5 * 403872962) ^ -927040577;
								continue;
							case 4u:
								goto IL_0344;
							case 11u:
								return;
							}
							break;
							IL_0344:
							int num8;
							if (num6 <= cJlczwZnZFIuGLdyKSFTXNegICNK)
							{
								num3 = 879559464;
								num8 = num3;
							}
							else
							{
								num3 = 484334207;
								num8 = num3;
							}
							continue;
							IL_0147:
							int num9;
							if (num4 >= 114)
							{
								num3 = 1972141118;
								num9 = num3;
							}
							else
							{
								num3 = 1250937992;
								num9 = num3;
							}
							continue;
							IL_0111:
							int num10;
							if (num4 < 12)
							{
								num3 = 1517900303;
								num10 = num3;
							}
							else
							{
								num3 = 1759129285;
								num10 = num3;
							}
							continue;
							IL_024b:
							int num11;
							if (num4 < 4)
							{
								num3 = 1312078979;
								num11 = num3;
							}
							else
							{
								num3 = 2008078743;
								num11 = num3;
							}
						}
						goto case 2u;
						IL_00bd:
						VIegCQDoDIuHUCOAWxtwiVlcHiIdb[num4].vktztXwgzHmcejCzUrVqJJFeasLO();
						num = 1392319000;
						continue;
						IL_00b3:
						num = 487086584;
						continue;
					}
					break;
				}
			}
		}

		internal void ofPNXvAascREHKbhTnQjdbIUqEcT(Stream inStream, Stream outStream, long inSize, long outSize)
		{
			OXVmaAhiEONCawLFmOCotVaJAKbr(inStream, outStream);
			uint num13 = default(uint);
			uint num10 = default(uint);
			uint num6 = default(uint);
			uint num7 = default(uint);
			akNiKMcNwEsbWpNdwLKhcFSjqsvo akNiKMcNwEsbWpNdwLKhcFSjqsvo = default(akNiKMcNwEsbWpNdwLKhcFSjqsvo);
			uint num27 = default(uint);
			uint num18 = default(uint);
			uint num22 = default(uint);
			byte b = default(byte);
			ulong num17 = default(ulong);
			byte prevByte = default(byte);
			int num14 = default(int);
			uint num5 = default(uint);
			ulong num19 = default(ulong);
			while (true)
			{
				int num = 429690165;
				while (true)
				{
					uint num2;
					int num3;
					switch ((num2 = (uint)num ^ 0x4E3DB5A3u) % 5)
					{
					case 2u:
						break;
					case 1u:
						num5 = num13;
						num = 1409257516;
						continue;
					case 4u:
						goto IL_0055;
					default:
						num3 = -1513768276;
						goto IL_005a;
					case 0u:
						goto IL_07cc;
						IL_0055:
						num3 = -1060579034;
						goto IL_005a;
						IL_005a:
						while (true)
						{
							uint num4;
							switch ((num4 = (uint)num3 ^ 0x99FD795Au) % 52)
							{
							case 50u:
								break;
							case 31u:
								goto IL_0055;
							default:
								goto IL_013b;
							case 46u:
								num10 = num5;
								num6 = 2 + PzFEDaZuiTwBUHqjmFwkmjeDbklt.FCRhAPGSvQyerOQfqyRFuOEqxWNt(PQlYSWYsAymrlpWtxNhGZLoVjcMJ, num7);
								num3 = (int)(num4 * 710013593) ^ -1408046540;
								continue;
							case 44u:
								akNiKMcNwEsbWpNdwLKhcFSjqsvo = default(akNiKMcNwEsbWpNdwLKhcFSjqsvo);
								akNiKMcNwEsbWpNdwLKhcFSjqsvo.iQfyNkvlJMLNvBNbtxnhkjPhiEdGA();
								num3 = (int)((num4 * 496509341) ^ 0x2B61E686);
								continue;
							case 45u:
							{
								int num11;
								int num12;
								if (num5 >= iaxMEHOpntjzjEARkCMhqCJPnKRfA)
								{
									num11 = 1316756494;
									num12 = num11;
								}
								else
								{
									num11 = 824182316;
									num12 = num11;
								}
								num3 = num11 ^ (int)(num4 * 509602394);
								continue;
							}
							case 21u:
								nwAMjajrHVNYcLVjltvwPHhmRXms.xjAaaybMFekGvQVQIcJTHdFAALju();
								num3 = -1223209860;
								continue;
							case 27u:
								num10 = num5;
								num5 = num27;
								num3 = -34846049;
								continue;
							case 47u:
								num3 = ((int)num4 * -1731278843) ^ -502740529;
								continue;
							case 51u:
								num3 = ((int)num4 * -39252959) ^ 0x331E0A89;
								continue;
							case 14u:
								num3 = ((int)num4 * -103682596) ^ -1618275391;
								continue;
							case 19u:
								num18 = num10;
								num3 = -1296288775;
								continue;
							case 38u:
								goto IL_022c;
							case 35u:
								num22 = num18;
								num3 = -330522245;
								continue;
							case 15u:
								nwAMjajrHVNYcLVjltvwPHhmRXms.VIGxQLixukhMOXtyIBKZVzQYhQwm(b);
								num3 = -419021006;
								continue;
							case 30u:
								goto IL_0268;
							case 11u:
								num17++;
								num3 = ((int)num4 * -657198040) ^ 0x1A456E7E;
								continue;
							case 49u:
								b = KGSPcQIGtVAdaMzSCMWjklmLpTZn.ldDkqaNMjAbkcQsrFNUKDdgYrMwE(PQlYSWYsAymrlpWtxNhGZLoVjcMJ, (uint)num17, prevByte, nwAMjajrHVNYcLVjltvwPHhmRXms.ebEIfjksQvqDnQKFRugAniAQfmhKA(num5));
								num3 = (int)(num4 * 472737944) ^ -449560351;
								continue;
							case 43u:
								num3 = ((int)num4 * -391746446) ^ 0x54A4F542;
								continue;
							case 25u:
								num18 = num10;
								num3 = (int)(num4 * 1719614491) ^ -185210393;
								continue;
							case 8u:
							{
								int num28;
								int num29;
								if (ePlCNdhbUYVmJSyLdmlNSyTOVkxUA[akNiKMcNwEsbWpNdwLKhcFSjqsvo.woIMJJDYgcJkGVzZntXNvwEfFZUj].VvRXueeCQWAkOrVODLwRaaIfwXbu(PQlYSWYsAymrlpWtxNhGZLoVjcMJ) != 0)
								{
									num28 = 966293060;
									num29 = num28;
								}
								else
								{
									num28 = 1928982114;
									num29 = num28;
								}
								num3 = num28 ^ (int)(num4 * 1978106279);
								continue;
							}
							case 20u:
								goto IL_034f;
							case 41u:
								num17 += num6;
								num3 = (int)(num4 * 786357278) ^ -61193032;
								continue;
							case 33u:
								num27 = num10;
								num3 = (int)(num4 * 1490076989) ^ -763783199;
								continue;
							case 18u:
								nwAMjajrHVNYcLVjltvwPHhmRXms.VIGxQLixukhMOXtyIBKZVzQYhQwm(nwAMjajrHVNYcLVjltvwPHhmRXms.ebEIfjksQvqDnQKFRugAniAQfmhKA(num5));
								num17++;
								num3 = (int)(num4 * 1457139993) ^ -297888065;
								continue;
							case 37u:
								num13 = uJGuOVVQlEbEUxveDzKyPjBxMTnf[uWmMkODCRqmywZTvccNDkKuGDPWp(num6)].HhoRUiWNsRSLUkVpugpJMvDjzcPK(PQlYSWYsAymrlpWtxNhGZLoVjcMJ);
								num3 = (int)((num4 * 1367246933) ^ 0x63B7F678);
								continue;
							case 5u:
								FrXWQCpFcxWvQEFbPMtsYtuOIpcR[akNiKMcNwEsbWpNdwLKhcFSjqsvo.woIMJJDYgcJkGVzZntXNvwEfFZUj << 4].VvRXueeCQWAkOrVODLwRaaIfwXbu(PQlYSWYsAymrlpWtxNhGZLoVjcMJ);
								num3 = ((int)num4 * -1248717244) ^ 0x706BD2AA;
								continue;
							case 0u:
								num27 = num18;
								num3 = (int)((num4 * 1899108172) ^ 0x55701CCD);
								continue;
							case 10u:
								num5 += aeZYgUGqHdALyefYUuNWSMmNNKuMA.yoIfSxGBstNfztScIkvzmCpfkbvFb(VIegCQDoDIuHUCOAWxtwiVlcHiIdb, num5 - num13 - 1, PQlYSWYsAymrlpWtxNhGZLoVjcMJ, num14);
								num3 = (int)((num4 * 1876602266) ^ 0x8174BE9);
								continue;
							case 42u:
								goto IL_0474;
							case 28u:
								akNiKMcNwEsbWpNdwLKhcFSjqsvo.cMaGXlpBVASkVqPeYRhYMlndHnGq();
								num3 = (int)((num4 * 583596279) ^ 0x484E06AF);
								continue;
							case 6u:
								goto IL_04c0;
							case 7u:
								num27 = num22;
								num3 = -56964515;
								continue;
							case 17u:
								num5 += PQlYSWYsAymrlpWtxNhGZLoVjcMJ.VhsZfOFIMiTWUtFEFmoRBvmCpiTG(num14 - 4) << 4;
								num5 += ISNPGwsLwjqSMhDJZVEEYacTJuGF.EyzJubLAQwncIflnOKsgBeeWigbIA(PQlYSWYsAymrlpWtxNhGZLoVjcMJ);
								num3 = -1513768276;
								continue;
							case 22u:
								goto IL_051a;
							case 13u:
								akNiKMcNwEsbWpNdwLKhcFSjqsvo.SxECzafGaAaYHaQzJZuIokCaQNmoA();
								num3 = ((int)num4 * -1895417604) ^ 0x2DDF1BF1;
								continue;
							case 4u:
							{
								prevByte = nwAMjajrHVNYcLVjltvwPHhmRXms.ebEIfjksQvqDnQKFRugAniAQfmhKA(0u);
								int num25;
								int num26;
								if (!akNiKMcNwEsbWpNdwLKhcFSjqsvo.ulHFLqDCxAhNLijFebfgrHRtGVnXB())
								{
									num25 = -383370777;
									num26 = num25;
								}
								else
								{
									num25 = -328348948;
									num26 = num25;
								}
								num3 = num25 ^ ((int)num4 * -1611531198);
								continue;
							}
							case 26u:
							{
								int num23;
								int num24;
								if (num13 >= 14)
								{
									num23 = 912705389;
									num24 = num23;
								}
								else
								{
									num23 = 87782890;
									num24 = num23;
								}
								num3 = num23 ^ (int)(num4 * 11514595);
								continue;
							}
							case 40u:
								akNiKMcNwEsbWpNdwLKhcFSjqsvo.EIMJtiwGfQtKSXWTyWHGNRQlsUub();
								num3 = ((int)num4 * -1580687524) ^ -49975383;
								continue;
							case 23u:
								num10 = 0u;
								num18 = 0u;
								num22 = 0u;
								num17 = 0uL;
								num19 = (ulong)outSize;
								num3 = ((int)num4 * -140882973) ^ 0x5DE675B2;
								continue;
							case 16u:
							{
								akNiKMcNwEsbWpNdwLKhcFSjqsvo.EIMJtiwGfQtKSXWTyWHGNRQlsUub();
								byte b2 = KGSPcQIGtVAdaMzSCMWjklmLpTZn.RLlIqySrxkqxxaCsipiDdCWuisxc(PQlYSWYsAymrlpWtxNhGZLoVjcMJ, 0u, 0);
								nwAMjajrHVNYcLVjltvwPHhmRXms.VIGxQLixukhMOXtyIBKZVzQYhQwm(b2);
								num17++;
								num3 = ((int)num4 * -1476986491) ^ 0x630588E2;
								continue;
							}
							case 34u:
								b = KGSPcQIGtVAdaMzSCMWjklmLpTZn.RLlIqySrxkqxxaCsipiDdCWuisxc(PQlYSWYsAymrlpWtxNhGZLoVjcMJ, (uint)num17, prevByte);
								num3 = -270682151;
								continue;
							case 39u:
								num22 = num18;
								num3 = (int)(num4 * 1029989960) ^ -1689397195;
								continue;
							case 48u:
								goto IL_0685;
							case 32u:
								akNiKMcNwEsbWpNdwLKhcFSjqsvo.XdIzNJeTRdkWucHUkWDhbHzssbHg();
								num3 = ((int)num4 * -16579916) ^ 0x79C77940;
								continue;
							case 29u:
							{
								int num20;
								int num21;
								if (num17 >= num19)
								{
									num20 = -75413291;
									num21 = num20;
								}
								else
								{
									num20 = -2038183328;
									num21 = num20;
								}
								num3 = num20 ^ (int)(num4 * 1928029903);
								continue;
							}
							case 3u:
							{
								int num15;
								int num16;
								if (num13 >= 4)
								{
									num15 = -804269301;
									num16 = num15;
								}
								else
								{
									num15 = -1073336784;
									num16 = num15;
								}
								num3 = num15 ^ ((int)num4 * -1974920920);
								continue;
							}
							case 1u:
								num6 = AegLcgTULgUZEsyukUezzmMCurfo.FCRhAPGSvQyerOQfqyRFuOEqxWNt(PQlYSWYsAymrlpWtxNhGZLoVjcMJ, num7) + 2;
								num3 = -1841804705;
								continue;
							case 24u:
								num5 = 0u;
								num3 = ((int)num4 * -1184262388) ^ -1195202947;
								continue;
							case 9u:
								num14 = (int)((num13 >> 1) - 1);
								num5 = (2 | (num13 & 1)) << num14;
								num3 = (int)((num4 * 410189886) ^ 0x46EE526);
								continue;
							case 36u:
							{
								int num8;
								int num9;
								if (IjHbqaHpYTXImVtJHVcwHXRhNqSmA[(akNiKMcNwEsbWpNdwLKhcFSjqsvo.woIMJJDYgcJkGVzZntXNvwEfFZUj << 4) + num7].VvRXueeCQWAkOrVODLwRaaIfwXbu(PQlYSWYsAymrlpWtxNhGZLoVjcMJ) != 0)
								{
									num8 = -1227140565;
									num9 = num8;
								}
								else
								{
									num8 = -120307074;
									num9 = num8;
								}
								num3 = num8 ^ ((int)num4 * -1222090359);
								continue;
							}
							case 12u:
								nwAMjajrHVNYcLVjltvwPHhmRXms.kuVFsXtKRpzHQVkyNMIDObogpDeQ(num5, num6);
								num3 = -286186069;
								continue;
							case 2u:
								goto IL_07cc;
							}
							break;
							IL_0685:
							int num30;
							if (QuIrjSREJBGjOwAWVEhDhWEUaWkG[akNiKMcNwEsbWpNdwLKhcFSjqsvo.woIMJJDYgcJkGVzZntXNvwEfFZUj].VvRXueeCQWAkOrVODLwRaaIfwXbu(PQlYSWYsAymrlpWtxNhGZLoVjcMJ) != 0)
							{
								num3 = -1325998647;
								num30 = num3;
							}
							else
							{
								num3 = -1983381990;
								num30 = num3;
							}
							continue;
							IL_022c:
							int num31;
							if (num5 != uint.MaxValue)
							{
								num3 = -702724418;
								num31 = num3;
							}
							else
							{
								num3 = -1269392881;
								num31 = num3;
							}
							continue;
							IL_034f:
							int num32;
							if (num17 >= num19)
							{
								num3 = -1269392881;
								num32 = num3;
							}
							else
							{
								num3 = -1343820188;
								num32 = num3;
							}
							continue;
							IL_051a:
							num7 = (uint)(int)num17 & cJlczwZnZFIuGLdyKSFTXNegICNK;
							int num33;
							if (FrXWQCpFcxWvQEFbPMtsYtuOIpcR[(akNiKMcNwEsbWpNdwLKhcFSjqsvo.woIMJJDYgcJkGVzZntXNvwEfFZUj << 4) + num7].VvRXueeCQWAkOrVODLwRaaIfwXbu(PQlYSWYsAymrlpWtxNhGZLoVjcMJ) == 0)
							{
								num3 = -438198870;
								num33 = num3;
							}
							else
							{
								num3 = -11041660;
								num33 = num3;
							}
							continue;
							IL_0474:
							int num34;
							if (QqtDLmidnrKpRQvydLZCEcINPIyQ[akNiKMcNwEsbWpNdwLKhcFSjqsvo.woIMJJDYgcJkGVzZntXNvwEfFZUj].VvRXueeCQWAkOrVODLwRaaIfwXbu(PQlYSWYsAymrlpWtxNhGZLoVjcMJ) != 0)
							{
								num3 = -196124794;
								num34 = num3;
							}
							else
							{
								num3 = -1913868521;
								num34 = num3;
							}
							continue;
							IL_0268:
							int num35;
							if (ucibpXLYTtbprAPLUgoLaCGYQKUiA[akNiKMcNwEsbWpNdwLKhcFSjqsvo.woIMJJDYgcJkGVzZntXNvwEfFZUj].VvRXueeCQWAkOrVODLwRaaIfwXbu(PQlYSWYsAymrlpWtxNhGZLoVjcMJ) != 1)
							{
								num3 = -997151787;
								num35 = num3;
							}
							else
							{
								num3 = -2123448402;
								num35 = num3;
							}
							continue;
							IL_04c0:
							int num36;
							if (num5 >= num17)
							{
								num3 = -1455334244;
								num36 = num3;
							}
							else
							{
								num3 = -1767933865;
								num36 = num3;
							}
						}
						goto case 1u;
						IL_07cc:
						nwAMjajrHVNYcLVjltvwPHhmRXms.lzmZXZFSltFGoCondEiLIWEdpUbCA();
						PQlYSWYsAymrlpWtxNhGZLoVjcMJ.DcRTJUcDTSYWkVuuHNgcxsXFgKEH();
						return;
						IL_013b:
						num = 1303802273;
						continue;
					}
					break;
				}
			}
		}

		internal void pQiJUyaqOUrOVfCufHxBlZEZJBOL(byte[] properties)
		{
			int lc = properties[0] % 9;
			int lp = default(int);
			int pb = default(int);
			uint num4 = default(uint);
			uint num6 = default(uint);
			int num5 = default(int);
			while (true)
			{
				int num = 1075905287;
				while (true)
				{
					uint num2;
					int num3;
					switch ((num2 = (uint)num ^ 0x64FE948u) % 5)
					{
					case 2u:
						break;
					case 3u:
					{
						int num8 = properties[0] / 9;
						lp = num8 % 5;
						pb = num8 / 5;
						num = ((int)num2 * -1871002565) ^ 0x5D5AE9C2;
						continue;
					}
					case 0u:
						num3 = 14545419;
						goto IL_0054;
					default:
						goto IL_00a3;
					case 1u:
						goto IL_0137;
						IL_0054:
						while (true)
						{
							switch ((num4 = (uint)num3 ^ 0x2E86847Du) % 8)
							{
							case 3u:
								break;
							default:
								goto IL_0084;
							case 6u:
								goto IL_00a3;
							case 2u:
								num6 += (uint)(properties[1 + num5] << num5 * 8);
								num3 = 2019845681;
								continue;
							case 0u:
								num5 = 0;
								num3 = (int)((num4 * 822324661) ^ 0x6267E4BA);
								continue;
							case 1u:
								gVgjqIHzsgrlyiPTRxZKveWhKMV(num6);
								ApxeDbzvBJSLOoiCzUrbpacVlpmM(lp, lc);
								num3 = (int)((num4 * 1703761095) ^ 0x7AE1467);
								continue;
							case 7u:
								goto IL_0105;
							case 4u:
								num5++;
								num3 = ((int)num4 * -1908909833) ^ 0x537A2D6;
								continue;
							case 5u:
								goto IL_0137;
							}
							break;
							IL_0105:
							int num7;
							if (num5 < 4)
							{
								num3 = 1587957847;
								num7 = num3;
							}
							else
							{
								num3 = 242992908;
								num7 = num3;
							}
						}
						goto case 0u;
						IL_0137:
						OAdUyLgJXrAZhKIMaAKNKCImenON(pb);
						return;
						IL_00a3:
						num6 = 0u;
						num3 = ((int)num4 * -1486720328) ^ 0x4DF65BF5;
						goto IL_0054;
						IL_0084:
						num = 956586559;
						continue;
					}
					break;
				}
			}
		}

		internal static uint uWmMkODCRqmywZTvccNDkKuGDPWp(uint len)
		{
			len -= 2;
			uint num6 = default(uint);
			while (true)
			{
				int num = -795336022;
				while (true)
				{
					uint num2;
					int num3;
					int num4;
					int num5;
					switch ((num2 = (uint)num ^ 0xE7AEE236u) % 5)
					{
					case 0u:
						break;
					case 4u:
						if (len >= 4)
						{
							num = -1260499527;
							continue;
						}
						num3 = 925226333;
						num4 = num3;
						goto IL_0084;
					case 2u:
						goto IL_004b;
					default:
						num3 = 727701503;
						num4 = num3;
						goto IL_0084;
					case 1u:
						goto IL_00a0;
						IL_006f:
						num = -1843187945;
						continue;
						IL_004b:
						num5 = 1738495744;
						goto IL_0050;
						IL_0084:
						num5 = num3 ^ (int)(num6 * 153930983);
						goto IL_0050;
						IL_0050:
						switch ((num6 = (uint)num5 ^ 0x21088BEu) % 4)
						{
						case 2u:
							break;
						case 0u:
							goto IL_004b;
						default:
							goto IL_006f;
						case 1u:
							return len;
						case 3u:
							goto IL_00a0;
						}
						goto case 4u;
						IL_00a0:
						return 3u;
					}
					break;
				}
			}
		}

		static uint \u200d\u202c\u202b\u200c\u200d\u206b\u206f\u202e\u206b\u200c\u200f\u206f\u200d\u200e\u200f\u200b\u206e\u202d\u200d\u200f\u200b\u206d\u206d\u200b\u206c\u206f\u206d\u200b\u202a\u206f\u206e\u202d\u202b\u202a\u200d\u202c\u202c\u202c\u206f\u202e(uint P_0, uint P_1)
		{
			return Math.Max(P_0, P_1);
		}
	}

	internal class sUAaGpCXBuAtVBhaOpVOjsyjqiNN
	{
		internal byte[] rwaxSbAAAGhXujHHviUVEwqeYQCx;

		internal uint WuysAFAFyndHNTenmGaQiHeurKMvA;

		internal Stream ZuzEwbEYasHSrhcCWDIecrhynUMIA;

		internal uint uNkyYKVpiprppilxarVvmnhNjVaEA;

		internal uint JoXUsegGpHOhpFRmpINqATQsJhr;

		internal void MZXSiPWMMSgHHLQawjCmvKPBgqCX(uint windowSize)
		{
			if (JoXUsegGpHOhpFRmpINqATQsJhr != windowSize)
			{
				goto IL_0009;
			}
			goto IL_0086;
			IL_0086:
			JoXUsegGpHOhpFRmpINqATQsJhr = windowSize;
			int num = 351604008;
			goto IL_0034;
			IL_0034:
			uint num2 = default(uint);
			switch ((num2 = (uint)num ^ 0x134166A5u) % 4)
			{
			case 0u:
				break;
			default:
				goto IL_0053;
			case 2u:
				goto IL_006b;
			case 3u:
				goto IL_0086;
			case 1u:
				goto IL_0094;
			}
			goto IL_002f;
			IL_0053:
			int num3 = 980918761;
			goto IL_000e;
			IL_000e:
			uint num4;
			switch ((num4 = (uint)num3 ^ 0x77E0E53Du) % 4)
			{
			case 2u:
				break;
			case 3u:
				goto IL_002f;
			default:
				goto IL_006b;
			case 0u:
				goto IL_0094;
			}
			goto IL_0009;
			IL_0009:
			num3 = 807716418;
			goto IL_000e;
			IL_006b:
			rwaxSbAAAGhXujHHviUVEwqeYQCx = new byte[windowSize];
			num = (int)(num2 * 695398804) ^ -828659642;
			goto IL_0034;
			IL_0094:
			WuysAFAFyndHNTenmGaQiHeurKMvA = 0u;
			uNkyYKVpiprppilxarVvmnhNjVaEA = 0u;
			return;
			IL_002f:
			num = 956117847;
			goto IL_0034;
		}

		internal void ZtLrsBwRCKVWeNGWWHJGfmloouLc(Stream stream, bool solid)
		{
			lzmZXZFSltFGoCondEiLIWEdpUbCA();
			ZuzEwbEYasHSrhcCWDIecrhynUMIA = stream;
			uint num6 = default(uint);
			while (true)
			{
				int num = -165094752;
				while (true)
				{
					uint num2;
					int num5;
					int num3;
					int num4;
					switch ((num2 = (uint)num ^ 0xA371DCEFu) % 5)
					{
					case 3u:
						break;
					case 4u:
						num5 = 980611253;
						goto IL_003c;
					case 0u:
						return;
					case 2u:
						goto IL_0073;
					default:
						{
							num3 = 1789200375;
							num4 = num3;
							goto IL_008b;
						}
						IL_003c:
						while (true)
						{
							switch ((num6 = (uint)num5 ^ 0x73AE7A1Au) % 4)
							{
							case 0u:
								break;
							default:
								goto IL_005b;
							case 3u:
								goto IL_0073;
							case 2u:
								uNkyYKVpiprppilxarVvmnhNjVaEA = 0u;
								WuysAFAFyndHNTenmGaQiHeurKMvA = 0u;
								num5 = ((int)num6 * -1876855682) ^ 0x479D2533;
								continue;
							case 1u:
								return;
							}
							break;
						}
						goto case 4u;
						IL_0073:
						if (!solid)
						{
							num = -313176595;
							continue;
						}
						num3 = 1687003936;
						num4 = num3;
						goto IL_008b;
						IL_008b:
						num5 = num3 ^ (int)(num6 * 1260774849);
						goto IL_003c;
						IL_005b:
						num = -999239822;
						continue;
					}
					break;
				}
			}
		}

		internal void lzmZXZFSltFGoCondEiLIWEdpUbCA()
		{
			xjAaaybMFekGvQVQIcJTHdFAALju();
			uint num3 = default(uint);
			while (true)
			{
				int num = -1446372484;
				while (true)
				{
					uint num2;
					int num4;
					switch ((num2 = (uint)num ^ 0xF4EC9436u) % 5)
					{
					case 4u:
						break;
					case 3u:
						num4 = 1458914019;
						goto IL_0035;
					case 1u:
						goto IL_0057;
					case 2u:
						return;
					default:
						{
							num4 = ((int)num3 * -2089154035) ^ 0x59C2D37A;
							goto IL_0035;
						}
						IL_0035:
						switch ((num3 = (uint)num4 ^ 0x55B7F0FDu) % 3)
						{
						case 2u:
							break;
						default:
							goto IL_0050;
						case 1u:
							goto IL_0057;
						case 0u:
							return;
						}
						goto case 3u;
						IL_0057:
						ZuzEwbEYasHSrhcCWDIecrhynUMIA = null;
						\u202b\u200f\u200c\u206f\u202e\u200f\u202d\u202b\u202c\u200b\u206d\u202a\u200e\u200c\u206b\u202c\u200f\u202b\u202c\u206b\u202d\u200e\u206f\u206b\u200c\u206c\u206c\u206c\u202e\u206a\u202b\u206b\u200d\u202d\u200c\u200b\u200e\u200b\u206b\u202a\u202e((Array)new byte[rwaxSbAAAGhXujHHviUVEwqeYQCx.Length], 0, (Array)rwaxSbAAAGhXujHHviUVEwqeYQCx, 0, rwaxSbAAAGhXujHHviUVEwqeYQCx.Length);
						num = -428597286;
						continue;
						IL_0050:
						num = -1601592657;
						continue;
					}
					break;
				}
			}
		}

		internal void xjAaaybMFekGvQVQIcJTHdFAALju()
		{
			uint num = WuysAFAFyndHNTenmGaQiHeurKMvA - uNkyYKVpiprppilxarVvmnhNjVaEA;
			while (true)
			{
				int num2 = -757690465;
				while (true)
				{
					uint num3;
					int num4;
					switch ((num3 = (uint)num2 ^ 0xCE89B3E4u) % 4)
					{
					case 0u:
						break;
					case 3u:
						num4 = 1667685355;
						goto IL_0039;
					case 2u:
						return;
					default:
						goto IL_0083;
						IL_0039:
						while (true)
						{
							uint num5;
							switch ((num5 = (uint)num4 ^ 0x1DC62E1Au) % 8)
							{
							case 5u:
								break;
							default:
								goto IL_0068;
							case 4u:
								goto IL_0083;
							case 0u:
								WuysAFAFyndHNTenmGaQiHeurKMvA = 0u;
								num4 = (int)(num5 * 988935982) ^ -1433297970;
								continue;
							case 6u:
							{
								int num8;
								int num9;
								if (WuysAFAFyndHNTenmGaQiHeurKMvA >= JoXUsegGpHOhpFRmpINqATQsJhr)
								{
									num8 = 1052851994;
									num9 = num8;
								}
								else
								{
									num8 = 1788458206;
									num9 = num8;
								}
								num4 = num8 ^ ((int)num5 * -644724664);
								continue;
							}
							case 3u:
								return;
							case 2u:
								\u202d\u200c\u200e\u200d\u202e\u200b\u200d\u206a\u206d\u202b\u200c\u200e\u206c\u202c\u202d\u202a\u202a\u206a\u202b\u206a\u206a\u202b\u206f\u202e\u206f\u200b\u206e\u202d\u200d\u206e\u202b\u202c\u206e\u206a\u202a\u200e\u202b\u200d\u206d\u202a\u202e(ZuzEwbEYasHSrhcCWDIecrhynUMIA, rwaxSbAAAGhXujHHviUVEwqeYQCx, (int)uNkyYKVpiprppilxarVvmnhNjVaEA, (int)num);
								num4 = 1296293052;
								continue;
							case 1u:
							{
								int num6;
								int num7;
								if (num == 0)
								{
									num6 = -1329980114;
									num7 = num6;
								}
								else
								{
									num6 = -1249920633;
									num7 = num6;
								}
								num4 = num6 ^ (int)(num5 * 715766407);
								continue;
							}
							case 7u:
								return;
							}
							break;
						}
						goto case 3u;
						IL_0083:
						uNkyYKVpiprppilxarVvmnhNjVaEA = WuysAFAFyndHNTenmGaQiHeurKMvA;
						num4 = 1807575485;
						goto IL_0039;
					}
					break;
					IL_0068:
					num2 = -945224634;
				}
			}
		}

		internal void kuVFsXtKRpzHQVkyNMIDObogpDeQ(uint distance, uint len)
		{
			uint num = WuysAFAFyndHNTenmGaQiHeurKMvA - distance - 1;
			while (true)
			{
				int num2 = 350474742;
				while (true)
				{
					uint num3;
					int num4;
					switch ((num3 = (uint)num2 ^ 0x5390824u) % 4)
					{
					case 0u:
						break;
					case 2u:
						num4 = 238151809;
						goto IL_0036;
					case 3u:
						return;
					default:
						goto IL_008d;
						IL_0036:
						while (true)
						{
							uint num5;
							switch ((num5 = (uint)num4 ^ 0x6A8178A2u) % 11)
							{
							case 3u:
								break;
							default:
								goto IL_0072;
							case 6u:
								goto IL_008d;
							case 1u:
								num += JoXUsegGpHOhpFRmpINqATQsJhr;
								num4 = ((int)num5 * -2036753663) ^ 0x1952EC64;
								continue;
							case 2u:
								rwaxSbAAAGhXujHHviUVEwqeYQCx[WuysAFAFyndHNTenmGaQiHeurKMvA++] = rwaxSbAAAGhXujHHviUVEwqeYQCx[num++];
								num4 = 1513445208;
								continue;
							case 7u:
							{
								int num8;
								int num9;
								if (WuysAFAFyndHNTenmGaQiHeurKMvA < JoXUsegGpHOhpFRmpINqATQsJhr)
								{
									num8 = -916743612;
									num9 = num8;
								}
								else
								{
									num8 = -166025687;
									num9 = num8;
								}
								num4 = num8 ^ ((int)num5 * -433353474);
								continue;
							}
							case 4u:
								goto IL_0109;
							case 10u:
							{
								int num6;
								int num7;
								if (num >= JoXUsegGpHOhpFRmpINqATQsJhr)
								{
									num6 = -582262914;
									num7 = num6;
								}
								else
								{
									num6 = -1234368072;
									num7 = num6;
								}
								num4 = num6 ^ ((int)num5 * -692936574);
								continue;
							}
							case 9u:
								num = 0u;
								num4 = ((int)num5 * -1603820342) ^ -2104654705;
								continue;
							case 8u:
								xjAaaybMFekGvQVQIcJTHdFAALju();
								num4 = (int)((num5 * 88894517) ^ 0x277EC3BB);
								continue;
							case 0u:
								goto IL_0177;
							case 5u:
								return;
							}
							break;
							IL_0177:
							int num10;
							if (len == 0)
							{
								num4 = 1054424152;
								num10 = num4;
							}
							else
							{
								num4 = 796627050;
								num10 = num4;
							}
							continue;
							IL_0109:
							int num11;
							if (num < JoXUsegGpHOhpFRmpINqATQsJhr)
							{
								num4 = 1231146455;
								num11 = num4;
							}
							else
							{
								num4 = 1466223006;
								num11 = num4;
							}
						}
						goto case 2u;
						IL_008d:
						len--;
						num4 = 1081612414;
						goto IL_0036;
					}
					break;
					IL_0072:
					num2 = 176497071;
				}
			}
		}

		internal void VIGxQLixukhMOXtyIBKZVzQYhQwm(byte b)
		{
			rwaxSbAAAGhXujHHviUVEwqeYQCx[WuysAFAFyndHNTenmGaQiHeurKMvA++] = b;
			uint num4 = default(uint);
			while (true)
			{
				int num = 891903656;
				while (true)
				{
					uint num2;
					int num3;
					switch ((num2 = (uint)num ^ 0x680F9975u) % 5)
					{
					case 2u:
						break;
					case 4u:
						return;
					case 0u:
						num3 = 177498075;
						goto IL_0059;
					case 1u:
						if (WuysAFAFyndHNTenmGaQiHeurKMvA >= JoXUsegGpHOhpFRmpINqATQsJhr)
						{
							num = (int)(num2 * 2143545206) ^ -1831519535;
							continue;
						}
						return;
					default:
						goto IL_0098;
						IL_0074:
						num = 440855904;
						continue;
						IL_0059:
						switch ((num4 = (uint)num3 ^ 0x1AF875D6u) % 3)
						{
						case 0u:
							break;
						default:
							goto IL_0074;
						case 2u:
							goto IL_0098;
						case 1u:
							return;
						}
						goto case 0u;
						IL_0098:
						xjAaaybMFekGvQVQIcJTHdFAALju();
						num3 = (int)(num4 * 79550414) ^ -101937564;
						goto IL_0059;
					}
					break;
				}
			}
		}

		internal byte ebEIfjksQvqDnQKFRugAniAQfmhKA(uint distance)
		{
			uint num = WuysAFAFyndHNTenmGaQiHeurKMvA - distance - 1;
			uint num7 = default(uint);
			while (true)
			{
				int num2 = -1649898595;
				while (true)
				{
					uint num3;
					int num4;
					int num5;
					int num6;
					switch ((num3 = (uint)num2 ^ 0x922C041Cu) % 5)
					{
					case 3u:
						break;
					case 0u:
						if (num >= JoXUsegGpHOhpFRmpINqATQsJhr)
						{
							num2 = -1737974275;
							continue;
						}
						num4 = -346167595;
						num5 = num4;
						goto IL_008f;
					case 4u:
						goto IL_0056;
					default:
						num4 = -359851453;
						num5 = num4;
						goto IL_008f;
					case 2u:
						goto IL_00b2;
						IL_007a:
						num2 = -1917733823;
						continue;
						IL_0056:
						num6 = -1606366231;
						goto IL_005b;
						IL_008f:
						num6 = num4 ^ (int)(num7 * 1955801153);
						goto IL_005b;
						IL_005b:
						while (true)
						{
							switch ((num7 = (uint)num6 ^ 0x8E64BC70u) % 4)
							{
							case 1u:
								break;
							case 3u:
								goto IL_0056;
							default:
								goto IL_007a;
							case 2u:
								num += JoXUsegGpHOhpFRmpINqATQsJhr;
								num6 = (int)((num7 * 1056828556) ^ 0x291AF8F4);
								continue;
							case 0u:
								goto IL_00b2;
							}
							break;
						}
						goto case 0u;
						IL_00b2:
						return rwaxSbAAAGhXujHHviUVEwqeYQCx[num];
					}
					break;
				}
			}
		}

		internal sUAaGpCXBuAtVBhaOpVOjsyjqiNN()
		{
		}

		static void \u202b\u200f\u200c\u206f\u202e\u200f\u202d\u202b\u202c\u200b\u206d\u202a\u200e\u200c\u206b\u202c\u200f\u202b\u202c\u206b\u202d\u200e\u206f\u206b\u200c\u206c\u206c\u206c\u202e\u206a\u202b\u206b\u200d\u202d\u200c\u200b\u200e\u200b\u206b\u202a\u202e(Array P_0, int P_1, Array P_2, int P_3, int P_4)
		{
			Buffer.BlockCopy(P_0, P_1, P_2, P_3, P_4);
		}

		static void \u202d\u200c\u200e\u200d\u202e\u200b\u200d\u206a\u206d\u202b\u200c\u200e\u206c\u202c\u202d\u202a\u202a\u206a\u202b\u206a\u206a\u202b\u206f\u202e\u206f\u200b\u206e\u202d\u200d\u206e\u202b\u202c\u206e\u206a\u202a\u200e\u202b\u200d\u206d\u202a\u202e(Stream P_0, byte[] P_1, int P_2, int P_3)
		{
			P_0.Write(P_1, P_2, P_3);
		}
	}

	internal struct akNiKMcNwEsbWpNdwLKhcFSjqsvo
	{
		internal uint woIMJJDYgcJkGVzZntXNvwEfFZUj;

		internal void iQfyNkvlJMLNvBNbtxnhkjPhiEdGA()
		{
			woIMJJDYgcJkGVzZntXNvwEfFZUj = 0u;
		}

		internal void EIMJtiwGfQtKSXWTyWHGNRQlsUub()
		{
			if (woIMJJDYgcJkGVzZntXNvwEfFZUj < 4)
			{
				goto IL_000c;
			}
			goto IL_00fd;
			IL_00fd:
			int num;
			int num2;
			if (woIMJJDYgcJkGVzZntXNvwEfFZUj < 10)
			{
				num = 1017461239;
				num2 = num;
			}
			else
			{
				num = 201582985;
				num2 = num;
			}
			goto IL_003b;
			IL_000c:
			int num3 = 1956201074;
			goto IL_0011;
			IL_0036:
			num = 892265003;
			goto IL_003b;
			IL_003b:
			uint num4 = default(uint);
			while (true)
			{
				switch ((num4 = (uint)num ^ 0x6A94280Cu) % 8)
				{
				case 6u:
					break;
				default:
					goto IL_006a;
				case 4u:
					return;
				case 3u:
					woIMJJDYgcJkGVzZntXNvwEfFZUj -= 3u;
					num = (int)((num4 * 995837593) ^ 0x7039DA13);
					continue;
				case 7u:
					woIMJJDYgcJkGVzZntXNvwEfFZUj = 0u;
					num = (int)((num4 * 613449107) ^ 0x855A3B8);
					continue;
				case 1u:
					return;
				case 5u:
					woIMJJDYgcJkGVzZntXNvwEfFZUj -= 6u;
					num = 1621063750;
					continue;
				case 0u:
					goto IL_00fd;
				case 2u:
					return;
				}
				break;
			}
			goto IL_0036;
			IL_006a:
			num3 = 1303902550;
			goto IL_0011;
			IL_0011:
			uint num5;
			switch ((num5 = (uint)num3 ^ 0x4C3A8388u) % 5)
			{
			case 0u:
				break;
			case 2u:
				goto IL_0036;
			case 3u:
				return;
			case 1u:
				return;
			default:
				goto IL_008d;
			}
			goto IL_000c;
			IL_008d:
			num = ((int)num4 * -1147772673) ^ 0x4A48E16D;
			goto IL_003b;
		}

		internal void cMaGXlpBVASkVqPeYRhYMlndHnGq()
		{
			woIMJJDYgcJkGVzZntXNvwEfFZUj = ((woIMJJDYgcJkGVzZntXNvwEfFZUj < 7) ? 7u : 10u);
		}

		internal void SxECzafGaAaYHaQzJZuIokCaQNmoA()
		{
			woIMJJDYgcJkGVzZntXNvwEfFZUj = ((woIMJJDYgcJkGVzZntXNvwEfFZUj < 7) ? 8u : 11u);
		}

		internal void XdIzNJeTRdkWucHUkWDhbHzssbHg()
		{
			woIMJJDYgcJkGVzZntXNvwEfFZUj = ((woIMJJDYgcJkGVzZntXNvwEfFZUj < 7) ? 9u : 11u);
		}

		internal bool ulHFLqDCxAhNLijFebfgrHRtGVnXB()
		{
			return woIMJJDYgcJkGVzZntXNvwEfFZUj < 7;
		}
	}

	[StructLayout(LayoutKind.Explicit, Size = 896)]
	internal struct ZjIULecakWsuNZqBrqRwHffnktBs
	{
	}

	[StructLayout(LayoutKind.Explicit, Pack = 1, Size = 448)]
	internal struct UetIqogHaESWIsMMUdJCoMpqJkiSA
	{
	}

	internal struct \u206f\u206e\u202b\u202b\u202b\u206d\u202a\u206f\u206b\u202d\u200d\u200c\u206a\u202d\u206a\u206b\u202b\u200d\u206d\u202b\u202b\u206e\u206f\u200d\u200d\u200d\u202c\u202a\u206f\u200d\u206c\u206a\u202a\u200e\u200c\u206d\u206a\u200f\u202c\u200c\u202e
	{
		internal uint \u206b\u200d\u202b\u202c\u202b\u206e\u206f\u200c\u202e\u206e\u200e\u200c\u202b\u206e\u206e\u200d\u206b\u200e\u206f\u206b\u202c\u206f\u200f\u206e\u202a\u202c\u202b\u206d\u200d\u200f\u206d\u202a\u202a\u202d\u206e\u200d\u202a\u202e\u206f\u202b\u202e;

		internal void \u206d\u200b\u202a\u202c\u200c\u206f\u206f\u206d\u202c\u202c\u206d\u200b\u202c\u200e\u200b\u206d\u200e\u202b\u200f\u206a\u206c\u200e\u202b\u200b\u200f\u206e\u206e\u206c\u206a\u206d\u202a\u202d\u202c\u202d\u206a\u200d\u200c\u206e\u202e\u200f\u202e()
		{
			\u206b\u200d\u202b\u202c\u202b\u206e\u206f\u200c\u202e\u206e\u200e\u200c\u202b\u206e\u206e\u200d\u206b\u200e\u206f\u206b\u202c\u206f\u200f\u206e\u202a\u202c\u202b\u206d\u200d\u200f\u206d\u202a\u202a\u202d\u206e\u200d\u202a\u202e\u206f\u202b\u202e = 1024u;
		}

		internal uint \u206a\u202a\u200c\u206d\u200c\u206f\u206e\u200d\u200e\u206e\u202a\u202d\u206a\u202e\u206e\u202d\u206f\u206b\u206f\u200e\u206f\u206e\u206a\u200d\u200e\u202e\u202a\u200c\u206d\u206d\u206f\u200c\u202a\u206c\u200c\u202e\u206c\u206d\u200d\u202b\u202e(\u202a\u206f\u200c\u200c\u206b\u206d\u200f\u200b\u206e\u202b\u206d\u202c\u206a\u202e\u206b\u202a\u206b\u206a\u202b\u200f\u200d\u202a\u202e\u202d\u202d\u202b\u206f\u206c\u202c\u200e\u202b\u202b\u200f\u202c\u206c\u200c\u200d\u202a\u200c\u206f\u202e rangeDecoder)
		{
			uint num = (rangeDecoder.\u206b\u202b\u202b\u200c\u200d\u206d\u206c\u206e\u202d\u206a\u206e\u200e\u202a\u200c\u200f\u206e\u202c\u200d\u206c\u206f\u202e\u202d\u200b\u202c\u202a\u206a\u200c\u200f\u202d\u206e\u206f\u200f\u202d\u200e\u202e\u206c\u200d\u206e\u206c\u202e\u202e >> 11) * \u206b\u200d\u202b\u202c\u202b\u206e\u206f\u200c\u202e\u206e\u200e\u200c\u202b\u206e\u206e\u200d\u206b\u200e\u206f\u206b\u202c\u206f\u200f\u206e\u202a\u202c\u202b\u206d\u200d\u200f\u206d\u202a\u202a\u202d\u206e\u200d\u202a\u202e\u206f\u202b\u202e;
			if (rangeDecoder.\u202b\u206d\u206d\u206b\u200f\u206c\u200f\u200f\u206f\u206a\u202e\u206a\u200c\u206c\u202d\u200e\u202c\u200b\u200e\u200c\u206c\u206b\u206d\u202e\u202b\u200d\u200f\u200c\u206b\u206e\u206e\u200f\u206e\u200b\u206f\u202c\u206c\u200f\u200b\u206a\u202e < num)
			{
				goto IL_001d;
			}
			goto IL_010a;
			IL_010a:
			rangeDecoder.\u206b\u202b\u202b\u200c\u200d\u206d\u206c\u206e\u202d\u206a\u206e\u200e\u202a\u200c\u200f\u206e\u202c\u200d\u206c\u206f\u202e\u202d\u200b\u202c\u202a\u206a\u200c\u200f\u202d\u206e\u206f\u200f\u202d\u200e\u202e\u206c\u200d\u206e\u206c\u202e\u202e -= num;
			int num2 = 1955152031;
			goto IL_0022;
			IL_0022:
			while (true)
			{
				uint num3;
				switch ((num3 = (uint)num2 ^ 0x30B13D02u) % 11)
				{
				case 0u:
					break;
				case 6u:
					rangeDecoder.\u202b\u206d\u206d\u206b\u200f\u206c\u200f\u200f\u206f\u206a\u202e\u206a\u200c\u206c\u202d\u200e\u202c\u200b\u200e\u200c\u206c\u206b\u206d\u202e\u202b\u200d\u200f\u200c\u206b\u206e\u206e\u200f\u206e\u200b\u206f\u202c\u206c\u200f\u200b\u206a\u202e = (rangeDecoder.\u202b\u206d\u206d\u206b\u200f\u206c\u200f\u200f\u206f\u206a\u202e\u206a\u200c\u206c\u202d\u200e\u202c\u200b\u200e\u200c\u206c\u206b\u206d\u202e\u202b\u200d\u200f\u200c\u206b\u206e\u206e\u200f\u206e\u200b\u206f\u202c\u206c\u200f\u200b\u206a\u202e << 8) | (byte)rangeDecoder.\u206e\u206b\u206a\u200d\u202a\u200b\u200f\u206c\u202e\u200c\u202e\u202d\u202c\u206e\u200d\u202c\u202b\u202b\u200d\u200f\u202d\u202c\u206c\u200c\u202e\u206e\u206d\u200f\u206e\u206c\u206b\u206d\u206b\u206c\u206f\u206c\u202b\u200b\u200e\u202a\u202e.ReadByte();
					num2 = (int)((num3 * 1531147075) ^ 0x6C674A35);
					continue;
				case 2u:
				{
					int num6;
					int num7;
					if (rangeDecoder.\u206b\u202b\u202b\u200c\u200d\u206d\u206c\u206e\u202d\u206a\u206e\u200e\u202a\u200c\u200f\u206e\u202c\u200d\u206c\u206f\u202e\u202d\u200b\u202c\u202a\u206a\u200c\u200f\u202d\u206e\u206f\u200f\u202d\u200e\u202e\u206c\u200d\u206e\u206c\u202e\u202e < 16777216)
					{
						num6 = 17128310;
						num7 = num6;
					}
					else
					{
						num6 = 1622474659;
						num7 = num6;
					}
					num2 = num6 ^ ((int)num3 * -1720452713);
					continue;
				}
				case 4u:
					rangeDecoder.\u202b\u206d\u206d\u206b\u200f\u206c\u200f\u200f\u206f\u206a\u202e\u206a\u200c\u206c\u202d\u200e\u202c\u200b\u200e\u200c\u206c\u206b\u206d\u202e\u202b\u200d\u200f\u200c\u206b\u206e\u206e\u200f\u206e\u200b\u206f\u202c\u206c\u200f\u200b\u206a\u202e = (rangeDecoder.\u202b\u206d\u206d\u206b\u200f\u206c\u200f\u200f\u206f\u206a\u202e\u206a\u200c\u206c\u202d\u200e\u202c\u200b\u200e\u200c\u206c\u206b\u206d\u202e\u202b\u200d\u200f\u200c\u206b\u206e\u206e\u200f\u206e\u200b\u206f\u202c\u206c\u200f\u200b\u206a\u202e << 8) | (byte)rangeDecoder.\u206e\u206b\u206a\u200d\u202a\u200b\u200f\u206c\u202e\u200c\u202e\u202d\u202c\u206e\u200d\u202c\u202b\u202b\u200d\u200f\u202d\u202c\u206c\u200c\u202e\u206e\u206d\u200f\u206e\u206c\u206b\u206d\u206b\u206c\u206f\u206c\u202b\u200b\u200e\u202a\u202e.ReadByte();
					rangeDecoder.\u206b\u202b\u202b\u200c\u200d\u206d\u206c\u206e\u202d\u206a\u206e\u200e\u202a\u200c\u200f\u206e\u202c\u200d\u206c\u206f\u202e\u202d\u200b\u202c\u202a\u206a\u200c\u200f\u202d\u206e\u206f\u200f\u202d\u200e\u202e\u206c\u200d\u206e\u206c\u202e\u202e <<= 8;
					num2 = ((int)num3 * -1425102440) ^ -1322301873;
					continue;
				case 8u:
					rangeDecoder.\u206b\u202b\u202b\u200c\u200d\u206d\u206c\u206e\u202d\u206a\u206e\u200e\u202a\u200c\u200f\u206e\u202c\u200d\u206c\u206f\u202e\u202d\u200b\u202c\u202a\u206a\u200c\u200f\u202d\u206e\u206f\u200f\u202d\u200e\u202e\u206c\u200d\u206e\u206c\u202e\u202e = num;
					num2 = (int)(num3 * 820725195) ^ -74418921;
					continue;
				case 5u:
					goto IL_010a;
				case 9u:
					\u206b\u200d\u202b\u202c\u202b\u206e\u206f\u200c\u202e\u206e\u200e\u200c\u202b\u206e\u206e\u200d\u206b\u200e\u206f\u206b\u202c\u206f\u200f\u206e\u202a\u202c\u202b\u206d\u200d\u200f\u206d\u202a\u202a\u202d\u206e\u200d\u202a\u202e\u206f\u202b\u202e += 2048 - \u206b\u200d\u202b\u202c\u202b\u206e\u206f\u200c\u202e\u206e\u200e\u200c\u202b\u206e\u206e\u200d\u206b\u200e\u206f\u206b\u202c\u206f\u200f\u206e\u202a\u202c\u202b\u206d\u200d\u200f\u206d\u202a\u202a\u202d\u206e\u200d\u202a\u202e\u206f\u202b\u202e >> 5;
					num2 = (int)(num3 * 595372476) ^ -1482347828;
					continue;
				case 7u:
					return 0u;
				case 3u:
					rangeDecoder.\u206b\u202b\u202b\u200c\u200d\u206d\u206c\u206e\u202d\u206a\u206e\u200e\u202a\u200c\u200f\u206e\u202c\u200d\u206c\u206f\u202e\u202d\u200b\u202c\u202a\u206a\u200c\u200f\u202d\u206e\u206f\u200f\u202d\u200e\u202e\u206c\u200d\u206e\u206c\u202e\u202e <<= 8;
					num2 = (int)(num3 * 469007138) ^ -1366958513;
					continue;
				case 1u:
				{
					rangeDecoder.\u202b\u206d\u206d\u206b\u200f\u206c\u200f\u200f\u206f\u206a\u202e\u206a\u200c\u206c\u202d\u200e\u202c\u200b\u200e\u200c\u206c\u206b\u206d\u202e\u202b\u200d\u200f\u200c\u206b\u206e\u206e\u200f\u206e\u200b\u206f\u202c\u206c\u200f\u200b\u206a\u202e -= num;
					\u206b\u200d\u202b\u202c\u202b\u206e\u206f\u200c\u202e\u206e\u200e\u200c\u202b\u206e\u206e\u200d\u206b\u200e\u206f\u206b\u202c\u206f\u200f\u206e\u202a\u202c\u202b\u206d\u200d\u200f\u206d\u202a\u202a\u202d\u206e\u200d\u202a\u202e\u206f\u202b\u202e -= \u206b\u200d\u202b\u202c\u202b\u206e\u206f\u200c\u202e\u206e\u200e\u200c\u202b\u206e\u206e\u200d\u206b\u200e\u206f\u206b\u202c\u206f\u200f\u206e\u202a\u202c\u202b\u206d\u200d\u200f\u206d\u202a\u202a\u202d\u206e\u200d\u202a\u202e\u206f\u202b\u202e >> 5;
					int num4;
					int num5;
					if (rangeDecoder.\u206b\u202b\u202b\u200c\u200d\u206d\u206c\u206e\u202d\u206a\u206e\u200e\u202a\u200c\u200f\u206e\u202c\u200d\u206c\u206f\u202e\u202d\u200b\u202c\u202a\u206a\u200c\u200f\u202d\u206e\u206f\u200f\u202d\u200e\u202e\u206c\u200d\u206e\u206c\u202e\u202e >= 16777216)
					{
						num4 = -37682221;
						num5 = num4;
					}
					else
					{
						num4 = -2049925458;
						num5 = num4;
					}
					num2 = num4 ^ (int)(num3 * 1946199244);
					continue;
				}
				default:
					return 1u;
				}
				break;
			}
			goto IL_001d;
			IL_001d:
			num2 = 1689631190;
			goto IL_0022;
		}
	}

	internal struct \u200d\u206b\u200c\u200d\u206d\u206b\u206e\u202b\u206b\u206d\u202b\u206c\u206a\u200c\u206d\u202d\u200b\u200f\u202e\u206c\u202b\u200e\u206a\u200c\u206b\u206c\u200e\u202a\u202c\u206f\u202e\u202e\u202e\u200b\u206c\u206e\u206a\u206f\u206a\u202a\u202e
	{
		internal readonly \u206f\u206e\u202b\u202b\u202b\u206d\u202a\u206f\u206b\u202d\u200d\u200c\u206a\u202d\u206a\u206b\u202b\u200d\u206d\u202b\u202b\u206e\u206f\u200d\u200d\u200d\u202c\u202a\u206f\u200d\u206c\u206a\u202a\u200e\u200c\u206d\u206a\u200f\u202c\u200c\u202e[] \u202b\u202e\u200b\u206e\u206f\u202d\u202e\u206c\u206a\u202e\u206a\u202b\u200d\u202b\u206d\u202d\u206c\u206c\u206f\u206a\u206d\u200b\u206d\u206e\u200c\u200c\u200c\u206e\u200f\u202c\u200d\u206b\u206f\u202a\u200b\u206c\u206c\u202c\u206b\u206f\u202e;

		internal readonly int \u202c\u206b\u200e\u206f\u206a\u200f\u206b\u206b\u200e\u206a\u202b\u206a\u206b\u200c\u200c\u200c\u202d\u202c\u206e\u206e\u206c\u206c\u200c\u200c\u200e\u206c\u206f\u200c\u206a\u206e\u200e\u202e\u202c\u200b\u200e\u206d\u202a\u200b\u206d\u200e\u202e;

		internal \u200d\u206b\u200c\u200d\u206d\u206b\u206e\u202b\u206b\u206d\u202b\u206c\u206a\u200c\u206d\u202d\u200b\u200f\u202e\u206c\u202b\u200e\u206a\u200c\u206b\u206c\u200e\u202a\u202c\u206f\u202e\u202e\u202e\u200b\u206c\u206e\u206a\u206f\u206a\u202a\u202e(int numBitLevels)
		{
			\u202c\u206b\u200e\u206f\u206a\u200f\u206b\u206b\u200e\u206a\u202b\u206a\u206b\u200c\u200c\u200c\u202d\u202c\u206e\u206e\u206c\u206c\u200c\u200c\u200e\u206c\u206f\u200c\u206a\u206e\u200e\u202e\u202c\u200b\u200e\u206d\u202a\u200b\u206d\u200e\u202e = numBitLevels;
			\u202b\u202e\u200b\u206e\u206f\u202d\u202e\u206c\u206a\u202e\u206a\u202b\u200d\u202b\u206d\u202d\u206c\u206c\u206f\u206a\u206d\u200b\u206d\u206e\u200c\u200c\u200c\u206e\u200f\u202c\u200d\u206b\u206f\u202a\u200b\u206c\u206c\u202c\u206b\u206f\u202e = new \u206f\u206e\u202b\u202b\u202b\u206d\u202a\u206f\u206b\u202d\u200d\u200c\u206a\u202d\u206a\u206b\u202b\u200d\u206d\u202b\u202b\u206e\u206f\u200d\u200d\u200d\u202c\u202a\u206f\u200d\u206c\u206a\u202a\u200e\u200c\u206d\u206a\u200f\u202c\u200c\u202e[1 << numBitLevels];
		}

		internal void \u206e\u206d\u202c\u202c\u206c\u202a\u202b\u206b\u200c\u200d\u200b\u206c\u202b\u202a\u206a\u200c\u202d\u206c\u202e\u206b\u206a\u206b\u200c\u202b\u206c\u206e\u202a\u202b\u202a\u202b\u202d\u200c\u200c\u200b\u202b\u200f\u206a\u200b\u202c\u200d\u202e()
		{
			uint num = 1u;
			while (true)
			{
				int num2 = 1148697418;
				while (true)
				{
					uint num3;
					switch ((num3 = (uint)num2 ^ 0x54785848u) % 6)
					{
					case 4u:
						break;
					default:
						return;
					case 2u:
						num2 = (int)(num3 * 802797451) ^ -292544060;
						continue;
					case 1u:
						\u202b\u202e\u200b\u206e\u206f\u202d\u202e\u206c\u206a\u202e\u206a\u202b\u200d\u202b\u206d\u202d\u206c\u206c\u206f\u206a\u206d\u200b\u206d\u206e\u200c\u200c\u200c\u206e\u200f\u202c\u200d\u206b\u206f\u202a\u200b\u206c\u206c\u202c\u206b\u206f\u202e[num].\u206d\u200b\u202a\u202c\u200c\u206f\u206f\u206d\u202c\u202c\u206d\u200b\u202c\u200e\u200b\u206d\u200e\u202b\u200f\u206a\u206c\u200e\u202b\u200b\u200f\u206e\u206e\u206c\u206a\u206d\u202a\u202d\u202c\u202d\u206a\u200d\u200c\u206e\u202e\u200f\u202e();
						num2 = 11651175;
						continue;
					case 5u:
						num++;
						num2 = ((int)num3 * -655130517) ^ -1929686409;
						continue;
					case 0u:
					{
						int num4;
						if (num >= 1 << \u202c\u206b\u200e\u206f\u206a\u200f\u206b\u206b\u200e\u206a\u202b\u206a\u206b\u200c\u200c\u200c\u202d\u202c\u206e\u206e\u206c\u206c\u200c\u200c\u200e\u206c\u206f\u200c\u206a\u206e\u200e\u202e\u202c\u200b\u200e\u206d\u202a\u200b\u206d\u200e\u202e)
						{
							num2 = 444792407;
							num4 = num2;
						}
						else
						{
							num2 = 932348835;
							num4 = num2;
						}
						continue;
					}
					case 3u:
						return;
					}
					break;
				}
			}
		}

		internal uint \u200d\u200c\u200c\u202b\u206e\u206b\u200b\u206b\u206b\u202a\u202d\u202c\u206d\u200e\u200e\u206b\u206d\u206c\u202c\u206b\u202e\u202a\u200b\u206a\u206d\u200b\u202c\u206e\u200b\u200d\u206a\u200e\u206e\u202b\u202a\u200b\u206f\u200f\u202a\u206e\u202e(\u202a\u206f\u200c\u200c\u206b\u206d\u200f\u200b\u206e\u202b\u206d\u202c\u206a\u202e\u206b\u202a\u206b\u206a\u202b\u200f\u200d\u202a\u202e\u202d\u202d\u202b\u206f\u206c\u202c\u200e\u202b\u202b\u200f\u202c\u206c\u200c\u200d\u202a\u200c\u206f\u202e rangeDecoder)
		{
			uint num = 1u;
			int num2 = \u202c\u206b\u200e\u206f\u206a\u200f\u206b\u206b\u200e\u206a\u202b\u206a\u206b\u200c\u200c\u200c\u202d\u202c\u206e\u206e\u206c\u206c\u200c\u200c\u200e\u206c\u206f\u200c\u206a\u206e\u200e\u202e\u202c\u200b\u200e\u206d\u202a\u200b\u206d\u200e\u202e;
			while (true)
			{
				int num3 = -799898486;
				while (true)
				{
					uint num4;
					switch ((num4 = (uint)num3 ^ 0xA72C0335u) % 6)
					{
					case 5u:
						break;
					case 4u:
						num2--;
						num3 = (int)((num4 * 196016862) ^ 0x20D549C2);
						continue;
					case 2u:
						num = (num << 1) + \u202b\u202e\u200b\u206e\u206f\u202d\u202e\u206c\u206a\u202e\u206a\u202b\u200d\u202b\u206d\u202d\u206c\u206c\u206f\u206a\u206d\u200b\u206d\u206e\u200c\u200c\u200c\u206e\u200f\u202c\u200d\u206b\u206f\u202a\u200b\u206c\u206c\u202c\u206b\u206f\u202e[num].\u206a\u202a\u200c\u206d\u200c\u206f\u206e\u200d\u200e\u206e\u202a\u202d\u206a\u202e\u206e\u202d\u206f\u206b\u206f\u200e\u206f\u206e\u206a\u200d\u200e\u202e\u202a\u200c\u206d\u206d\u206f\u200c\u202a\u206c\u200c\u202e\u206c\u206d\u200d\u202b\u202e(rangeDecoder);
						num3 = -574193545;
						continue;
					case 1u:
						num3 = (int)((num4 * 1029617757) ^ 0x3D17969D);
						continue;
					case 3u:
					{
						int num5;
						if (num2 > 0)
						{
							num3 = -947401433;
							num5 = num3;
						}
						else
						{
							num3 = -83073731;
							num5 = num3;
						}
						continue;
					}
					default:
						return num - (uint)(1 << \u202c\u206b\u200e\u206f\u206a\u200f\u206b\u206b\u200e\u206a\u202b\u206a\u206b\u200c\u200c\u200c\u202d\u202c\u206e\u206e\u206c\u206c\u200c\u200c\u200e\u206c\u206f\u200c\u206a\u206e\u200e\u202e\u202c\u200b\u200e\u206d\u202a\u200b\u206d\u200e\u202e);
					}
					break;
				}
			}
		}

		internal uint \u206d\u206b\u200b\u200b\u206b\u206e\u200e\u206c\u202e\u206d\u200f\u206b\u200f\u206b\u206a\u200c\u202e\u206b\u200d\u206b\u206a\u206b\u200b\u200c\u206c\u206e\u200f\u206b\u200b\u200f\u200f\u206b\u202a\u202e\u206c\u202e\u200f\u206c\u206f\u206a\u202e(\u202a\u206f\u200c\u200c\u206b\u206d\u200f\u200b\u206e\u202b\u206d\u202c\u206a\u202e\u206b\u202a\u206b\u206a\u202b\u200f\u200d\u202a\u202e\u202d\u202d\u202b\u206f\u206c\u202c\u200e\u202b\u202b\u200f\u202c\u206c\u200c\u200d\u202a\u200c\u206f\u202e rangeDecoder)
		{
			uint num = 1u;
			uint num2 = 0u;
			int num3 = 0;
			uint num7 = default(uint);
			while (true)
			{
				int num4;
				int num5;
				if (num3 >= \u202c\u206b\u200e\u206f\u206a\u200f\u206b\u206b\u200e\u206a\u202b\u206a\u206b\u200c\u200c\u200c\u202d\u202c\u206e\u206e\u206c\u206c\u200c\u200c\u200e\u206c\u206f\u200c\u206a\u206e\u200e\u202e\u202c\u200b\u200e\u206d\u202a\u200b\u206d\u200e\u202e)
				{
					num4 = 1798447133;
					num5 = num4;
				}
				else
				{
					num4 = 1605049562;
					num5 = num4;
				}
				while (true)
				{
					uint num6;
					switch ((num6 = (uint)num4 ^ 0x6636785Bu) % 7)
					{
					case 6u:
						num4 = 1605049562;
						continue;
					case 4u:
						num7 = \u202b\u202e\u200b\u206e\u206f\u202d\u202e\u206c\u206a\u202e\u206a\u202b\u200d\u202b\u206d\u202d\u206c\u206c\u206f\u206a\u206d\u200b\u206d\u206e\u200c\u200c\u200c\u206e\u200f\u202c\u200d\u206b\u206f\u202a\u200b\u206c\u206c\u202c\u206b\u206f\u202e[num].\u206a\u202a\u200c\u206d\u200c\u206f\u206e\u200d\u200e\u206e\u202a\u202d\u206a\u202e\u206e\u202d\u206f\u206b\u206f\u200e\u206f\u206e\u206a\u200d\u200e\u202e\u202a\u200c\u206d\u206d\u206f\u200c\u202a\u206c\u200c\u202e\u206c\u206d\u200d\u202b\u202e(rangeDecoder);
						num4 = 1963571730;
						continue;
					case 0u:
						num <<= 1;
						num4 = (int)(num6 * 2003168912) ^ -1109194736;
						continue;
					case 1u:
						break;
					case 3u:
						num += num7;
						num4 = ((int)num6 * -2054465127) ^ 0x6143D398;
						continue;
					case 5u:
						num2 |= num7 << num3;
						num3++;
						num4 = ((int)num6 * -448775580) ^ -1960614950;
						continue;
					default:
						return num2;
					}
					break;
				}
			}
		}

		internal static uint \u200b\u206f\u200c\u202b\u206b\u200b\u200f\u206a\u200f\u206b\u206f\u206f\u202b\u200e\u200f\u202a\u202a\u202e\u206b\u206a\u206b\u202a\u202c\u206a\u206e\u206d\u202d\u206e\u200d\u202b\u202e\u206e\u202a\u206c\u200f\u206f\u200b\u200d\u206a\u206f\u202e(\u206f\u206e\u202b\u202b\u202b\u206d\u202a\u206f\u206b\u202d\u200d\u200c\u206a\u202d\u206a\u206b\u202b\u200d\u206d\u202b\u202b\u206e\u206f\u200d\u200d\u200d\u202c\u202a\u206f\u200d\u206c\u206a\u202a\u200e\u200c\u206d\u206a\u200f\u202c\u200c\u202e[] Models, uint startIndex, \u202a\u206f\u200c\u200c\u206b\u206d\u200f\u200b\u206e\u202b\u206d\u202c\u206a\u202e\u206b\u202a\u206b\u206a\u202b\u200f\u200d\u202a\u202e\u202d\u202d\u202b\u206f\u206c\u202c\u200e\u202b\u202b\u200f\u202c\u206c\u200c\u200d\u202a\u200c\u206f\u202e rangeDecoder, int NumBitLevels)
		{
			uint num = 1u;
			uint num4 = default(uint);
			int num6 = default(int);
			uint num5 = default(uint);
			while (true)
			{
				int num2 = 1546229012;
				while (true)
				{
					uint num3;
					switch ((num3 = (uint)num2 ^ 0x5AC8911Eu) % 8)
					{
					case 0u:
						break;
					case 1u:
						num <<= 1;
						num2 = (int)((num3 * 123542015) ^ 0x664FA93D);
						continue;
					case 6u:
						num2 = (int)((num3 * 1854963595) ^ 0x37EFEED7);
						continue;
					case 2u:
						num4 = 0u;
						num6 = 0;
						num2 = (int)((num3 * 189511088) ^ 0x77B85AD8);
						continue;
					case 5u:
						num5 = Models[startIndex + num].\u206a\u202a\u200c\u206d\u200c\u206f\u206e\u200d\u200e\u206e\u202a\u202d\u206a\u202e\u206e\u202d\u206f\u206b\u206f\u200e\u206f\u206e\u206a\u200d\u200e\u202e\u202a\u200c\u206d\u206d\u206f\u200c\u202a\u206c\u200c\u202e\u206c\u206d\u200d\u202b\u202e(rangeDecoder);
						num2 = 977663695;
						continue;
					case 3u:
					{
						int num7;
						if (num6 >= NumBitLevels)
						{
							num2 = 337182457;
							num7 = num2;
						}
						else
						{
							num2 = 2571827;
							num7 = num2;
						}
						continue;
					}
					case 4u:
						num += num5;
						num4 |= num5 << num6;
						num6++;
						num2 = ((int)num3 * -69356941) ^ -646665711;
						continue;
					default:
						return num4;
					}
					break;
				}
			}
		}
	}

	internal class \u202a\u206f\u200c\u200c\u206b\u206d\u200f\u200b\u206e\u202b\u206d\u202c\u206a\u202e\u206b\u202a\u206b\u206a\u202b\u200f\u200d\u202a\u202e\u202d\u202d\u202b\u206f\u206c\u202c\u200e\u202b\u202b\u200f\u202c\u206c\u200c\u200d\u202a\u200c\u206f\u202e
	{
		internal uint \u202b\u206d\u206d\u206b\u200f\u206c\u200f\u200f\u206f\u206a\u202e\u206a\u200c\u206c\u202d\u200e\u202c\u200b\u200e\u200c\u206c\u206b\u206d\u202e\u202b\u200d\u200f\u200c\u206b\u206e\u206e\u200f\u206e\u200b\u206f\u202c\u206c\u200f\u200b\u206a\u202e;

		internal uint \u206b\u202b\u202b\u200c\u200d\u206d\u206c\u206e\u202d\u206a\u206e\u200e\u202a\u200c\u200f\u206e\u202c\u200d\u206c\u206f\u202e\u202d\u200b\u202c\u202a\u206a\u200c\u200f\u202d\u206e\u206f\u200f\u202d\u200e\u202e\u206c\u200d\u206e\u206c\u202e\u202e;

		internal Stream \u206e\u206b\u206a\u200d\u202a\u200b\u200f\u206c\u202e\u200c\u202e\u202d\u202c\u206e\u200d\u202c\u202b\u202b\u200d\u200f\u202d\u202c\u206c\u200c\u202e\u206e\u206d\u200f\u206e\u206c\u206b\u206d\u206b\u206c\u206f\u206c\u202b\u200b\u200e\u202a\u202e;

		internal void \u200c\u206e\u200f\u200f\u200d\u202a\u202c\u200c\u206f\u200c\u206a\u206d\u206e\u202d\u202c\u206d\u206c\u202e\u200d\u200b\u206a\u200b\u202d\u202c\u206f\u206c\u206e\u206a\u202a\u206a\u200b\u200c\u200f\u202d\u200b\u200d\u202d\u200b\u200b\u202d\u202e(Stream stream)
		{
			\u206e\u206b\u206a\u200d\u202a\u200b\u200f\u206c\u202e\u200c\u202e\u202d\u202c\u206e\u200d\u202c\u202b\u202b\u200d\u200f\u202d\u202c\u206c\u200c\u202e\u206e\u206d\u200f\u206e\u206c\u206b\u206d\u206b\u206c\u206f\u206c\u202b\u200b\u200e\u202a\u202e = stream;
			int num3 = default(int);
			while (true)
			{
				int num = 1479619301;
				while (true)
				{
					uint num2;
					switch ((num2 = (uint)num ^ 0x79A1BDBCu) % 8)
					{
					case 7u:
						break;
					default:
						return;
					case 1u:
						\u202b\u206d\u206d\u206b\u200f\u206c\u200f\u200f\u206f\u206a\u202e\u206a\u200c\u206c\u202d\u200e\u202c\u200b\u200e\u200c\u206c\u206b\u206d\u202e\u202b\u200d\u200f\u200c\u206b\u206e\u206e\u200f\u206e\u200b\u206f\u202c\u206c\u200f\u200b\u206a\u202e = 0u;
						num = ((int)num2 * -1038668083) ^ 0x2AA65D14;
						continue;
					case 3u:
						num3++;
						num = ((int)num2 * -1449411612) 

plugins/IronDad-CustomMagicalMounts/MagicalMounts.dll

Decompiled 6 months ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.Globalization;
using System.IO;
using System.IO.Compression;
using System.Linq;
using System.Reflection;
using System.Reflection.Emit;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Serialization;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Cryptography;
using System.Security.Permissions;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading;
using BepInEx;
using BepInEx.Bootstrap;
using BepInEx.Configuration;
using BepInEx.Logging;
using CreatureManager;
using HarmonyLib;
using IhvJoiNTPh9JvULZUA;
using ItemManager;
using JetBrains.Annotations;
using MagicalMounts;
using MagicalMounts.Patches;
using MagicalMounts.Utils;
using Microsoft.CodeAnalysis;
using MountManager;
using PieceManager;
using ServerSync;
using UnityEngine;
using UnityEngine.Audio;
using UnityEngine.UI;
using sZnGYNh0aPguc4dKmU;

[assembly: AssemblyTrademark("")]
[assembly: AssemblyCopyright("Copyright ©  2022")]
[assembly: AssemblyTitle("MagicalMounts")]
[assembly: ComVisible(false)]
[assembly: AssemblyDescription("")]
[assembly: AssemblyProduct("MagicalMounts")]
[assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: CompilationRelaxations(8)]
[assembly: Guid("E0E2F92E-557C-4A05-9D89-AA92A0BD75C4")]
[assembly: AssemblyFileVersion("1.7.3")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("CookieMilk")]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.7.3.0")]
[module: RefSafetyRules(11)]
[module: UnverifiableCode]
internal class <Module>
{
	private static bool f8DC2C003C160C1F;

	internal static global::<Module> SearchRecord;

	internal static void m8DC2C003C160C1F()
	{
		int num = 6;
		int num2 = num;
		TimeSpan timeSpan = default(TimeSpan);
		while (true)
		{
			switch (num2)
			{
			case 3:
				timeSpan = DateTime.Now - new DateTime(2024, 2, 12);
				num2 = 0;
				if (<Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_e3d1ec81a16c4e85b81013edf6c19dce == 0)
				{
					num2 = 0;
				}
				continue;
			case 4:
				return;
			case 6:
				if (f8DC2C003C160C1F)
				{
					num2 = 5;
					continue;
				}
				goto case 1;
			case 1:
				f8DC2C003C160C1F = true;
				num2 = 3;
				if (<Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_25d7dfa94d9747c0a61cf0be093fccb5 == 0)
				{
					num2 = 1;
				}
				continue;
			case 5:
				return;
			default:
				if (Math.Sign(timeSpan.Days) < 14)
				{
					num2 = 4;
					continue;
				}
				break;
			case 2:
				break;
			}
			break;
		}
		throw new Exception("This assembly is protected by an unregistered version of Eziriz's \".NET Reactor\"! This assembly won't further work.");
	}

	static <Module>()
	{
		m8DC2C003C160C1F();
	}

	internal static bool CalculateRecord()
	{
		return SearchRecord == null;
	}

	internal static global::<Module> VerifyRecord()
	{
		return SearchRecord;
	}
}
namespace Microsoft.CodeAnalysis
{
	[<b690cb4a-a875-44b1-8271-ad97197eada7>Embedded]
	[CompilerGenerated]
	internal sealed class <b690cb4a-a875-44b1-8271-ad97197eada7>EmbeddedAttribute : Attribute
	{
		private static <b690cb4a-a875-44b1-8271-ad97197eada7>EmbeddedAttribute ReadRecord;

		public <b690cb4a-a875-44b1-8271-ad97197eada7>EmbeddedAttribute()
		{
			CodeValueDispatcher.CompareConfig();
			base..ctor();
			int num = 0;
			if (<Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_40202358f9234c0992507e451be92acb != 0)
			{
				num = 0;
			}
			switch (num)
			{
			case 0:
				break;
			}
		}

		internal static bool CustomizeRecord()
		{
			return ReadRecord == null;
		}

		internal static <b690cb4a-a875-44b1-8271-ad97197eada7>EmbeddedAttribute PopRecord()
		{
			return ReadRecord;
		}
	}
}
namespace System.Runtime.CompilerServices
{
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)]
	[<b690cb4a-a875-44b1-8271-ad97197eada7>Embedded]
	[CompilerGenerated]
	internal sealed class <0636da5b-9fe8-42d0-8b4e-7336202d8a87>NullableAttribute : Attribute
	{
		public readonly byte[] NullableFlags;

		private static <0636da5b-9fe8-42d0-8b4e-7336202d8a87>NullableAttribute SetupRecord;

		public <0636da5b-9fe8-42d0-8b4e-7336202d8a87>NullableAttribute(byte P_0)
		{
			CodeValueDispatcher.CompareConfig();
			base..ctor();
			int num = 0;
			if (<Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_5bbba08c17a141a9a1a5e7d28e60b68d == 0)
			{
				num = 0;
			}
			while (true)
			{
				switch (num)
				{
				case 1:
					return;
				}
				NullableFlags = new byte[1] { P_0 };
				num = 1;
				if (<Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_fe840162cf56463ba913107e412574f8 == 0)
				{
					num = 1;
				}
			}
		}

		public <0636da5b-9fe8-42d0-8b4e-7336202d8a87>NullableAttribute(byte[] P_0)
		{
			CodeValueDispatcher.CompareConfig();
			base..ctor();
			int num = 1;
			if (<Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_5211b6ac5e2a45fdb528dd42861fab6d != 0)
			{
				num = 1;
			}
			while (true)
			{
				switch (num)
				{
				default:
					return;
				case 0:
					return;
				case 1:
					NullableFlags = P_0;
					num = 0;
					if (<Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_0669df8032c94431a7764f08856908bf == 0)
					{
						num = 0;
					}
					break;
				}
			}
		}

		internal static bool CollectRecord()
		{
			return SetupRecord == null;
		}

		internal static <0636da5b-9fe8-42d0-8b4e-7336202d8a87>NullableAttribute ComputeRecord()
		{
			return SetupRecord;
		}
	}
	[CompilerGenerated]
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)]
	[<b690cb4a-a875-44b1-8271-ad97197eada7>Embedded]
	internal sealed class <38803967-c4af-4b81-a896-b031642616a6>NullableContextAttribute : Attribute
	{
		public readonly byte Flag;

		internal static <38803967-c4af-4b81-a896-b031642616a6>NullableContextAttribute InterruptRecord;

		public <38803967-c4af-4b81-a896-b031642616a6>NullableContextAttribute(byte P_0)
		{
			CodeValueDispatcher.CompareConfig();
			base..ctor();
			int num = 1;
			if (<Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_bd69a92a348743ca91e70acf3ff2103d == 0)
			{
				num = 1;
			}
			while (true)
			{
				switch (num)
				{
				default:
					return;
				case 0:
					return;
				case 1:
					Flag = P_0;
					num = 0;
					if (<Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_45d4ee4c58424598aa466a649c3fb5e2 == 0)
					{
						num = 0;
					}
					break;
				}
			}
		}

		internal static bool LogoutRecord()
		{
			return InterruptRecord == null;
		}

		internal static <38803967-c4af-4b81-a896-b031642616a6>NullableContextAttribute DestroyRecord()
		{
			return InterruptRecord;
		}
	}
	[CompilerGenerated]
	[AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)]
	[<b690cb4a-a875-44b1-8271-ad97197eada7>Embedded]
	internal sealed class RefSafetyRulesAttribute : Attribute
	{
		public readonly int Version;

		internal static RefSafetyRulesAttribute StopRecord;

		public RefSafetyRulesAttribute(int P_0)
		{
			CodeValueDispatcher.CompareConfig();
			base..ctor();
			int num = 0;
			if (<Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_041d49d2e947412e985d9c0598f32bd2 == 0)
			{
				num = 0;
			}
			while (true)
			{
				switch (num)
				{
				case 1:
					return;
				}
				Version = P_0;
				num = 1;
				if (<Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_f5816364cbd64043beb2f9e33bdd5823 == 0)
				{
					num = 0;
				}
			}
		}

		internal static bool CountRecord()
		{
			return StopRecord == null;
		}

		internal static RefSafetyRulesAttribute CalcRecord()
		{
			return StopRecord;
		}
	}
}
public class MysticLightFlicker : MonoBehaviour
{
	[<0636da5b-9fe8-42d0-8b4e-7336202d8a87>Nullable(1)]
	public string waveFunction;

	public float startValue;

	public float amplitude;

	public float phase;

	public float frequency;

	private Color m_Specification;

	internal static MysticLightFlicker VisitRecord;

	private void Start()
	{
		//IL_002d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0032: Unknown result type (might be due to invalid IL or missing references)
		int num = 1;
		int num2 = num;
		while (true)
		{
			switch (num2)
			{
			default:
				return;
			case 0:
				return;
			case 1:
				m_Specification = ((Component)this).GetComponent<Light>().color;
				num2 = 0;
				if (<Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_b0fb67a39d814a3da397fbd3bef5bf89 != 0)
				{
					num2 = 0;
				}
				break;
			}
		}
	}

	private void Update()
	{
		//IL_002b: 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)
		int num = 1;
		int num2 = num;
		Light component = default(Light);
		while (true)
		{
			switch (num2)
			{
			default:
				component.color = m_Specification * PushSpecification();
				num2 = 2;
				if (<Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_91517bfd8c4a444caec6dadd6e1ad8ba == 0)
				{
					num2 = 0;
				}
				break;
			case 1:
				component = ((Component)this).GetComponent<Light>();
				num2 = 0;
				if (<Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_2eb6ee419c7f42f38518eb08164648ef != 0)
				{
					num2 = 0;
				}
				break;
			case 2:
				return;
			}
		}
	}

	private float PushSpecification()
	{
		int num = 37;
		float num4 = default(float);
		float num3 = default(float);
		bool flag4 = default(bool);
		bool flag5 = default(bool);
		bool flag2 = default(bool);
		bool flag8 = default(bool);
		float result = default(float);
		bool flag6 = default(bool);
		bool flag7 = default(bool);
		bool flag = default(bool);
		bool flag3 = default(bool);
		while (true)
		{
			int num2 = num;
			while (true)
			{
				switch (num2)
				{
				case 1:
					num4 = Mathf.Sin(num3 * 2f * (float)Math.PI);
					num2 = 16;
					continue;
				case 6:
					flag4 = waveFunction == DispatcherAttribute.FindPolicy(0x3EBCC9C3 ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_c0f07c067a9e4b5ca85cc257f8899e97);
					num2 = 33;
					if (<Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_78da9b7e4d88437fa4999dd5e441ae83 != 0)
					{
						num2 = 39;
					}
					continue;
				case 40:
					flag5 = num3 < 0.5f;
					num2 = 6;
					if (<Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_af7c050cfc8e4373a7ab6502ea6b613c == 0)
					{
						num2 = 18;
					}
					continue;
				case 24:
				case 27:
					flag2 = waveFunction == DispatcherAttribute.FindPolicy(0x129B80A1 ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_ce7ee0869c0041bbb3058182d7dbdb53);
					num2 = 21;
					continue;
				default:
					num4 = 1f - num3;
					num2 = 10;
					continue;
				case 4:
					num4 = 1f - Random.value * 2f;
					num2 = 2;
					continue;
				case 37:
					num3 = (Time.time + phase) * frequency;
					num2 = 36;
					continue;
				case 34:
					num4 = 1f;
					num2 = 10;
					if (<Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_1a237a99af9c4040ac0e8b7840ca45bd == 0)
					{
						num2 = 23;
					}
					continue;
				case 14:
					num4 = num3;
					num2 = 3;
					if (<Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_324f108a40ce4cc9a9764826ebd836e6 == 0)
					{
						num2 = 5;
					}
					continue;
				case 21:
					if (flag2)
					{
						num2 = 0;
						if (<Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_40202358f9234c0992507e451be92acb != 0)
						{
							num2 = 0;
						}
						continue;
					}
					goto case 28;
				case 35:
					if (flag8)
					{
						num2 = 41;
						if (<Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_584bf895cb18482eb2892a7894b07612 != 0)
						{
							num2 = 15;
						}
						continue;
					}
					goto case 6;
				case 2:
				case 5:
				case 10:
				case 16:
				case 19:
				case 23:
				case 26:
				case 29:
				case 30:
					result = num4 * amplitude + startValue;
					num2 = 25;
					continue;
				case 11:
					num4 = 4f * num3 - 1f;
					num = 26;
					break;
				case 36:
					num3 -= Mathf.Floor(num3);
					num2 = 12;
					continue;
				case 12:
					flag6 = waveFunction == DispatcherAttribute.FindPolicy(0xC2D0C4 ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_91517bfd8c4a444caec6dadd6e1ad8ba);
					num2 = 31;
					continue;
				case 15:
					num4 = 1f;
					num2 = 25;
					if (<Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_3cf415bbfa134625a4e4b4281bdf2293 != 0)
					{
						num2 = 30;
					}
					continue;
				case 32:
					if (flag7)
					{
						num2 = 2;
						if (<Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_55031563d1eb487ea786df66da9867a3 == 0)
						{
							num2 = 4;
						}
						continue;
					}
					goto case 15;
				case 7:
					flag8 = waveFunction == DispatcherAttribute.FindPolicy(--357002894 ^ 0x28CEEE85 ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_88fd7915297b434f9d0ad753baad3ff0);
					num2 = 35;
					continue;
				case 41:
					flag = num3 < 0.5f;
					num2 = 22;
					if (<Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_0e3d801b3d68430eaab4e129e6c6213d == 0)
					{
						num2 = 13;
					}
					continue;
				case 8:
				case 38:
					num4 = -1f;
					num2 = 19;
					continue;
				case 13:
				case 25:
					return result;
				case 20:
					if (flag3)
					{
						num2 = 40;
						continue;
					}
					goto case 7;
				case 31:
					if (!flag6)
					{
						num2 = 17;
						continue;
					}
					goto case 1;
				case 18:
					if (!flag5)
					{
						num = 9;
						break;
					}
					goto case 11;
				case 39:
					if (!flag4)
					{
						num2 = 27;
						continue;
					}
					goto case 14;
				case 3:
				case 17:
					flag3 = waveFunction == DispatcherAttribute.FindPolicy(--357002894 ^ 0x684ED4B9 ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_5211b6ac5e2a45fdb528dd42861fab6d);
					num2 = 20;
					continue;
				case 28:
					flag7 = waveFunction == DispatcherAttribute.FindPolicy(--874498345 ^ 0x228BF055 ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_eef1032244ce418e932c5a6e3e165989);
					num2 = 32;
					continue;
				case 9:
				case 33:
					num4 = -4f * num3 + 3f;
					num = 29;
					break;
				case 22:
					if (!flag)
					{
						num = 8;
						break;
					}
					goto case 34;
				}
				break;
			}
		}
	}

	public MysticLightFlicker()
	{
		CodeValueDispatcher.CompareConfig();
		waveFunction = DispatcherAttribute.FindPolicy(0x122AC4F7 ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_5a8afde03e314f5b97a31b8c35c748eb);
		startValue = 0f;
		amplitude = 1f;
		phase = 0f;
		frequency = 0.5f;
		((MonoBehaviour)this)..ctor();
		int num = 0;
		if (<Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_fbd453176d2e4470844e85c214dd8536 != 0)
		{
			num = 0;
		}
		switch (num)
		{
		case 0:
			break;
		}
	}

	internal static bool ListRecord()
	{
		return VisitRecord == null;
	}

	internal static MysticLightFlicker GetRecord()
	{
		return VisitRecord;
	}
}
namespace MysticArsenal
{
	public class MysticLightFade : MonoBehaviour
	{
		[Header("Seconds to dim the light")]
		public float life;

		public bool killAfterLife;

		[<0636da5b-9fe8-42d0-8b4e-7336202d8a87>Nullable(1)]
		private Light m_Exporter;

		private float m_Reponse;

		private static MysticLightFade LoginRecord;

		private void Start()
		{
			int num = 1;
			int num2 = num;
			bool flag = default(bool);
			while (true)
			{
				switch (num2)
				{
				case 6:
					m_Exporter = ((Component)this).gameObject.GetComponent<Light>();
					num2 = 3;
					if (<Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_d6d3d1b370cb46e9b9904c3ed19eaeba == 0)
					{
						num2 = 0;
					}
					continue;
				case 1:
					flag = Object.op_Implicit((Object)(object)((Component)this).gameObject.GetComponent<Light>());
					num2 = 0;
					if (<Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_365efb503b4a4ce59f7e9b2c9a0236ab != 0)
					{
						num2 = 0;
					}
					continue;
				default:
					if (flag)
					{
						num2 = 6;
						continue;
					}
					break;
				case 3:
					m_Reponse = m_Exporter.intensity;
					num2 = 0;
					if (<Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_4cb1365fc50242aa9faf40d0f98b842e != 0)
					{
						num2 = 4;
					}
					continue;
				case 4:
					return;
				case 5:
					return;
				case 2:
					break;
				}
				MonoBehaviour.print((object)(DispatcherAttribute.FindPolicy(0x79B148D1 ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_3ae4a4e226f3425abf4b272f1181e9eb) + ((Object)((Component)this).gameObject).name));
				num2 = 5;
			}
		}

		private void Update()
		{
			int num = 1;
			int num2 = num;
			bool flag = default(bool);
			bool flag2 = default(bool);
			while (true)
			{
				int num3;
				switch (num2)
				{
				case 3:
					return;
				case 7:
					return;
				case 8:
					return;
				case 5:
					Object.Destroy((Object)(object)((Component)this).gameObject);
					num2 = 1;
					if (<Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_4ade0fcf58b2452fa9087b7e7e7b075f == 0)
					{
						num2 = 7;
					}
					continue;
				case 4:
					num3 = ((m_Exporter.intensity <= 0f) ? 1 : 0);
					break;
				case 1:
					flag = Object.op_Implicit((Object)(object)((Component)this).gameObject.GetComponent<Light>());
					num2 = 0;
					if (<Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_da45b7f9705d4954823c7fe6c90a08d1 == 0)
					{
						num2 = 0;
					}
					continue;
				case 10:
					if (!killAfterLife)
					{
						num2 = 6;
						continue;
					}
					goto case 4;
				case 2:
					if (!flag2)
					{
						num2 = 8;
						continue;
					}
					goto case 5;
				default:
					if (!flag)
					{
						num2 = 3;
						if (<Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_5bbba08c17a141a9a1a5e7d28e60b68d == 0)
						{
							num2 = 3;
						}
						continue;
					}
					goto case 9;
				case 9:
				{
					Light exporter = m_Exporter;
					exporter.intensity -= m_Reponse * (Time.deltaTime / life);
					num2 = 10;
					continue;
				}
				case 6:
					num3 = 0;
					break;
				}
				flag2 = (byte)num3 != 0;
				num2 = 2;
				if (<Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_fbd453176d2e4470844e85c214dd8536 != 0)
				{
					num2 = 0;
				}
			}
		}

		public MysticLightFade()
		{
			CodeValueDispatcher.CompareConfig();
			life = 0.2f;
			killAfterLife = true;
			((MonoBehaviour)this)..ctor();
			int num = 0;
			if (<Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_fe840162cf56463ba913107e412574f8 == 0)
			{
				num = 0;
			}
			switch (num)
			{
			case 0:
				break;
			}
		}

		internal static bool MoveRecord()
		{
			return LoginRecord == null;
		}

		internal static MysticLightFade StartRecord()
		{
			return LoginRecord;
		}
	}
	public class MysticRotation : MonoBehaviour
	{
		public enum spaceEnum
		{
			Local,
			World
		}

		[Header("Rotate axises by degrees per second")]
		public Vector3 rotateVector;

		public spaceEnum rotateSpace;

		internal static MysticRotation ReflectRecord;

		private void Start()
		{
		}

		private void Update()
		{
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_0072: Unknown result type (might be due to invalid IL or missing references)
			//IL_0043: Unknown result type (might be due to invalid IL or missing references)
			//IL_004d: Unknown result type (might be due to invalid IL or missing references)
			int num = 3;
			bool flag2 = default(bool);
			bool flag = default(bool);
			while (true)
			{
				int num2 = num;
				while (true)
				{
					switch (num2)
					{
					default:
						return;
					case 5:
						((Component)this).transform.Rotate(rotateVector * Time.deltaTime);
						num2 = 7;
						continue;
					case 1:
						((Component)this).transform.Rotate(rotateVector * Time.deltaTime, (Space)0);
						num2 = 6;
						continue;
					case 2:
						if (flag2)
						{
							num2 = 2;
							if (<Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_3ae4a4e226f3425abf4b272f1181e9eb != 0)
							{
								num2 = 5;
							}
							continue;
						}
						break;
					case 0:
						return;
					case 4:
						if (!flag)
						{
							num2 = 0;
							if (<Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_053660a133ca41ba9267828b70ed239f == 0)
							{
								num2 = 0;
							}
							continue;
						}
						goto case 1;
					case 3:
						goto end_IL_0012;
					case 6:
						return;
					case 7:
						break;
					}
					flag = rotateSpace == spaceEnum.World;
					num2 = 0;
					if (<Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_556e62c286944880b401eda22aec28af == 0)
					{
						num2 = 4;
					}
					continue;
					end_IL_0012:
					break;
				}
				flag2 = rotateSpace == spaceEnum.Local;
				num = 2;
			}
		}

		public MysticRotation()
		{
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0010: Unknown result type (might be due to invalid IL or missing references)
			CodeValueDispatcher.CompareConfig();
			rotateVector = Vector3.zero;
			((MonoBehaviour)this)..ctor();
			int num = 0;
			if (<Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_2de628c6a6784c60a3824b6b8578aec7 != 0)
			{
				num = 0;
			}
			switch (num)
			{
			case 0:
				break;
			}
		}

		internal static bool DeleteRecord()
		{
			return ReflectRecord == null;
		}

		internal static MysticRotation MapRecord()
		{
			return ReflectRecord;
		}
	}
}
namespace MagicalMounts
{
	[<38803967-c4af-4b81-a896-b031642616a6>NullableContext(1)]
	[BepInPlugin("CookieMilk.MagicalMounts", "MagicalMounts", "1.7.3")]
	[<0636da5b-9fe8-42d0-8b4e-7336202d8a87>Nullable(0)]
	public class MagicalMountsPlugin : BaseUnityPlugin
	{
		[<38803967-c4af-4b81-a896-b031642616a6>NullableContext(0)]
		[HarmonyPatch(typeof(AudioMan), "Awake")]
		private static class StateMapperConfig
		{
			private static StateMapperConfig ResetRecord;

			[UsedImplicitly]
			[<38803967-c4af-4b81-a896-b031642616a6>NullableContext(1)]
			private static void Postfix(AudioMan __instance)
			{
				int num = 12;
				int num2 = num;
				int num3 = default(int);
				AudioSource[] componentsInChildren = default(AudioSource[]);
				AudioMixerGroup outputAudioMixerGroup = default(AudioMixerGroup);
				GameObject val2 = default(GameObject);
				AudioSource val = default(AudioSource);
				GameObject[] array = default(GameObject[]);
				int num4 = default(int);
				while (true)
				{
					switch (num2)
					{
					case 5:
					case 7:
						if (num3 >= componentsInChildren.Length)
						{
							num2 = 9;
							continue;
						}
						goto case 14;
					case 12:
						outputAudioMixerGroup = __instance.m_masterMixer.FindMatchingGroups(DispatcherAttribute.FindPolicy(0x5D24D275 ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_842e23724394457b8513670a46e87025))[0];
						num2 = 10;
						if (<Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_844c90fc396f4bd3a73fa2bc9d5dd2d6 == 0)
						{
							num2 = 11;
						}
						continue;
					case 1:
						num3 = 0;
						num2 = 5;
						continue;
					default:
						num3++;
						num2 = 7;
						continue;
					case 2:
						componentsInChildren = val2.GetComponentsInChildren<AudioSource>(true);
						num2 = 1;
						if (<Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_4ade0fcf58b2452fa9087b7e7e7b075f == 0)
						{
							num2 = 1;
						}
						continue;
					case 14:
						val = componentsInChildren[num3];
						num2 = 9;
						if (<Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_e70f853d404649e29b5f5ffc72c969b9 == 0)
						{
							num2 = 13;
						}
						continue;
					case 11:
						array = ItemManager.PrefabManager.RegisterAssetBundle(DispatcherAttribute.FindPolicy(0x702AED51 ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_0c97cddc268040e8a7bafa5f31d22b07), DispatcherAttribute.FindPolicy(0x212B257F ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_96f4d9c8a227412c91dc55f2d7bb6411)).LoadAllAssets<GameObject>();
						num2 = 3;
						if (<Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_40202358f9234c0992507e451be92acb != 0)
						{
							num2 = 4;
						}
						continue;
					case 9:
						num4++;
						num2 = 8;
						if (<Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_af7c050cfc8e4373a7ab6502ea6b613c != 0)
						{
							num2 = 4;
						}
						continue;
					case 4:
						num4 = 0;
						num2 = 4;
						if (<Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_3012601d73b74dceb9f8ed8bdd6a146f == 0)
						{
							num2 = 6;
						}
						continue;
					case 3:
						return;
					case 6:
					case 8:
						if (num4 >= array.Length)
						{
							num2 = 3;
							continue;
						}
						break;
					case 13:
						val.outputAudioMixerGroup = outputAudioMixerGroup;
						num2 = 0;
						if (<Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_4ade0fcf58b2452fa9087b7e7e7b075f == 0)
						{
							num2 = 0;
						}
						continue;
					case 10:
						break;
					}
					val2 = array[num4];
					num2 = 2;
				}
			}

			internal static bool InitRecord()
			{
				return ResetRecord == null;
			}

			internal static StateMapperConfig EnableRecord()
			{
				return ResetRecord;
			}
		}

		[<0636da5b-9fe8-42d0-8b4e-7336202d8a87>Nullable(0)]
		[HarmonyPatch(typeof(FootStep), "OnFoot", new Type[] { typeof(Transform) })]
		private static class StatusAttributeRecord
		{
			private static ConfigEntry<bool> m_ManagerReponse;

			private static readonly List<string> refReponse;

			internal static StatusAttributeRecord OrderRecord;

			private static void DeleteSpecification()
			{
				int num = 1;
				int num2 = num;
				bool flag = default(bool);
				while (true)
				{
					switch (num2)
					{
					default:
						if (flag)
						{
							num2 = 3;
							break;
						}
						goto case 4;
					case 3:
						return;
					case 4:
						m_ManagerReponse = ((BaseUnityPlugin)m_Map).Config.Bind<bool>(DispatcherAttribute.FindPolicy(0x234C0901 ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_a60c73647c724d968f20adc20f420b1c), DispatcherAttribute.FindPolicy(0x50BA1425 ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_b72c275b483a4b5d909c1a1d3078c8b5), true, DispatcherAttribute.FindPolicy(0x702A9535 ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_0c97cddc268040e8a7bafa5f31d22b07));
						num2 = 2;
						if (<Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_c6bf54114cb84ed7963166bd5d9ed69b != 0)
						{
							num2 = 2;
						}
						break;
					case 2:
						return;
					case 1:
						flag = m_ManagerReponse != null;
						num2 = 0;
						if (<Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_4dd05441108e4f249ef9bf10e9ec4d7d == 0)
						{
							num2 = 0;
						}
						break;
					}
				}
			}

			[UsedImplicitly]
			private static bool Prefix(FootStep __instance)
			{
				int num = 4;
				int num2 = num;
				bool result = default(bool);
				while (true)
				{
					int num3;
					switch (num2)
					{
					case 3:
						if (m_ManagerReponse.Value)
						{
							num2 = 5;
							if (<Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_d9a81f7a25af47b4bdad7171ad11bec4 != 0)
							{
								num2 = 1;
							}
							continue;
						}
						goto default;
					case 1:
					case 2:
						return result;
					case 4:
						DeleteSpecification();
						num2 = 3;
						if (<Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_46c5f7f62cf443fda94ac0d2dc532be6 == 0)
						{
							num2 = 0;
						}
						continue;
					default:
						num3 = ((!refReponse.Contains(Utils.GetPrefabName(((Component)__instance).gameObject))) ? 1 : 0);
						break;
					case 5:
						num3 = 1;
						break;
					}
					result = (byte)num3 != 0;
					num2 = 0;
					if (<Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_843fa0efeeae401ebc3dd97b3f6cc8d9 != 0)
					{
						num2 = 1;
					}
				}
			}

			static StatusAttributeRecord()
			{
				int num = 1;
				int num2 = num;
				while (true)
				{
					switch (num2)
					{
					case 2:
						return;
					case 1:
						CodeValueDispatcher.CompareConfig();
						num2 = 0;
						if (<Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_13771591b5124a74aee28639b0531a1f != 0)
						{
							num2 = 0;
						}
						continue;
					}
					refReponse = new List<string>
					{
						DispatcherAttribute.FindPolicy(0x6DDB7441 ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_95b0c2611f9f4043bc2e7b7c6697f375),
						DispatcherAttribute.FindPolicy(0x58F845CE ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_3ade89368242461abb3afba08ed0eb91),
						DispatcherAttribute.FindPolicy(0x100C78A ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_cc32bf2eb613467ebe1a71dfff81afc7),
						DispatcherAttribute.FindPolicy(0x418971A8 ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_bb42c305d9cf4402aa8a06025c265c0e),
						DispatcherAttribute.FindPolicy(0xF2790D8 ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_e2ac7e83334f4ee2b4faae63f322f1fc),
						DispatcherAttribute.FindPolicy(0x66FC4E84 ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_3cf415bbfa134625a4e4b4281bdf2293),
						DispatcherAttribute.FindPolicy(0x6D92FA74 ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_3357146a1a98443694a5a2344b022aad),
						DispatcherAttribute.FindPolicy(0x55FAC327 ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_5cf61c1d67934a4dad4771ce8c63ee39),
						DispatcherAttribute.FindPolicy(0x212B2043 ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_96f4d9c8a227412c91dc55f2d7bb6411),
						DispatcherAttribute.FindPolicy(0x750B3251 ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_45d4ee4c58424598aa466a649c3fb5e2),
						DispatcherAttribute.FindPolicy(0x7D120258 ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_b48c14fc84664bb2a93e4301283fe316),
						DispatcherAttribute.FindPolicy(0x35B6889A ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_6300c63db0404ebe8918b884e0d91520),
						DispatcherAttribute.FindPolicy(0x7FAE3154 ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_4cb1365fc50242aa9faf40d0f98b842e),
						DispatcherAttribute.FindPolicy(0x7BD67605 ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_25d7dfa94d9747c0a61cf0be093fccb5),
						DispatcherAttribute.FindPolicy(0x58F842BE ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_3ade89368242461abb3afba08ed0eb91),
						DispatcherAttribute.FindPolicy(0x234C0C99 ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_a60c73647c724d968f20adc20f420b1c),
						DispatcherAttribute.FindPolicy(0x6D92FFE8 ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_3357146a1a98443694a5a2344b022aad),
						DispatcherAttribute.FindPolicy(0x750B3067 ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_45d4ee4c58424598aa466a649c3fb5e2),
						DispatcherAttribute.FindPolicy(0x67B2F7F5 ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_9162fee099e444a8ad0c8f1f78137a13),
						DispatcherAttribute.FindPolicy(0x58F82DCA ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_3ade89368242461abb3afba08ed0eb91),
						DispatcherAttribute.FindPolicy(0x750B30D7 ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_45d4ee4c58424598aa466a649c3fb5e2),
						DispatcherAttribute.FindPolicy(0x1285BDED ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_843fa0efeeae401ebc3dd97b3f6cc8d9),
						DispatcherAttribute.FindPolicy(0x3D89EB1B ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_88fd7915297b434f9d0ad753baad3ff0),
						DispatcherAttribute.FindPolicy(0x750B5D6B ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_45d4ee4c58424598aa466a649c3fb5e2),
						DispatcherAttribute.FindPolicy(0x750B5D07 ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_45d4ee4c58424598aa466a649c3fb5e2),
						DispatcherAttribute.FindPolicy(0x1285BCB5 ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_843fa0efeeae401ebc3dd97b3f6cc8d9),
						DispatcherAttribute.FindPolicy(0x33C3D0CC ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_a6649aab9e8e425fb99253d098e3543e),
						DispatcherAttribute.FindPolicy(0x702A8609 ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_0c97cddc268040e8a7bafa5f31d22b07),
						DispatcherAttribute.FindPolicy(0x66FC21B0 ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_3cf415bbfa134625a4e4b4281bdf2293),
						DispatcherAttribute.FindPolicy(0x27765291 ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_11b8f870b8ca4b23856a9fb4b96d249c),
						DispatcherAttribute.FindPolicy(0x7208A990 ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_da45b7f9705d4954823c7fe6c90a08d1),
						DispatcherAttribute.FindPolicy(0x24714694 ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_2eb6ee419c7f42f38518eb08164648ef),
						DispatcherAttribute.FindPolicy(0x35FEACB4 ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_0e3d801b3d68430eaab4e129e6c6213d),
						DispatcherAttribute.FindPolicy(0x8B1BD8D ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_40202358f9234c0992507e451be92acb),
						DispatcherAttribute.FindPolicy(0x3ADC1E03 ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_e3d1ec81a16c4e85b81013edf6c19dce),
						DispatcherAttribute.FindPolicy(0x418903DA ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_bb42c305d9cf4402aa8a06025c265c0e),
						DispatcherAttribute.FindPolicy(0x35FEB04C ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_0e3d801b3d68430eaab4e129e6c6213d),
						DispatcherAttribute.FindPolicy(0x6DDB7CF9 ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_95b0c2611f9f4043bc2e7b7c6697f375),
						DispatcherAttribute.FindPolicy(0x703A15C2 ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_ee678aac982749129c2277a56f69ad27),
						DispatcherAttribute.FindPolicy(0x8B1A0D1 ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_40202358f9234c0992507e451be92acb),
						DispatcherAttribute.FindPolicy(0x1285B9F5 ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_843fa0efeeae401ebc3dd97b3f6cc8d9),
						DispatcherAttribute.FindPolicy(0x3ADC01A9 ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_e3d1ec81a16c4e85b81013edf6c19dce),
						DispatcherAttribute.FindPolicy(0x5C2DA88F ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_44006f309c684731a5089f116f102982),
						DispatcherAttribute.FindPolicy(0x5F5D839D ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_3c3ee68579674204bcf7f8d60605c8aa),
						DispatcherAttribute.FindPolicy(0x78F6AB6F ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_d6d3d1b370cb46e9b9904c3ed19eaeba),
						DispatcherAttribute.FindPolicy(0x100B51E ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_cc32bf2eb613467ebe1a71dfff81afc7),
						DispatcherAttribute.FindPolicy(0x41890236 ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_bb42c305d9cf4402aa8a06025c265c0e),
						DispatcherAttribute.FindPolicy(0x212B51AB ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_96f4d9c8a227412c91dc55f2d7bb6411),
						DispatcherAttribute.FindPolicy(0x5D24D883 ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_842e23724394457b8513670a46e87025),
						DispatcherAttribute.FindPolicy(0x647DBF35 ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_85dda70593694491979763aae742abf0),
						DispatcherAttribute.FindPolicy(0x7BD60181 ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_25d7dfa94d9747c0a61cf0be093fccb5),
						DispatcherAttribute.FindPolicy(0x5D24D94B ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_842e23724394457b8513670a46e87025),
						DispatcherAttribute.FindPolicy(0x5D24DEFF ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_842e23724394457b8513670a46e87025),
						DispatcherAttribute.FindPolicy(0xD9A9BE1 ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_bd69a92a348743ca91e70acf3ff2103d),
						DispatcherAttribute.FindPolicy(0x3D89F51D ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_88fd7915297b434f9d0ad753baad3ff0),
						DispatcherAttribute.FindPolicy(0x3ADC1A63 ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_e3d1ec81a16c4e85b81013edf6c19dce),
						DispatcherAttribute.FindPolicy(0x24715ED4 ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_2eb6ee419c7f42f38518eb08164648ef)
					};
					num2 = 2;
					if (<Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_fbd453176d2e4470844e85c214dd8536 != 0)
					{
						num2 = 1;
					}
				}
			}

			internal static bool ManageRecord()
			{
				return OrderRecord == null;
			}

			internal static StatusAttributeRecord AddRecord()
			{
				return OrderRecord;
			}
		}

		[HarmonyPatch(typeof(Character), "ApplySlide")]
		[<38803967-c4af-4b81-a896-b031642616a6>NullableContext(0)]
		private static class RulesReponse
		{
			private static RulesReponse ChangeRecord;

			[UsedImplicitly]
			private static void Prefix(ref Vector3 currentVel, out Vector3 __state)
			{
				//IL_0027: Unknown result type (might be due to invalid IL or missing references)
				//IL_002c: Unknown result type (might be due to invalid IL or missing references)
				int num = 1;
				int num2 = num;
				while (true)
				{
					switch (num2)
					{
					default:
						return;
					case 0:
						return;
					case 1:
						__state = currentVel;
						num2 = 0;
						if (<Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_2de628c6a6784c60a3824b6b8578aec7 == 0)
						{
							num2 = 0;
						}
						break;
					}
				}
			}

			[<38803967-c4af-4b81-a896-b031642616a6>NullableContext(1)]
			[UsedImplicitly]
			private static void Postfix(Character __instance, ref Vector3 currentVel, Vector3 __state)
			{
				//IL_0110: Unknown result type (might be due to invalid IL or missing references)
				//IL_0111: Unknown result type (might be due to invalid IL or missing references)
				int num = 7;
				bool flag = default(bool);
				while (true)
				{
					int num2 = num;
					while (true)
					{
						switch (num2)
						{
						default:
							return;
						case 6:
							if (!flag)
							{
								num2 = 5;
								if (<Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_95b0c2611f9f4043bc2e7b7c6697f375 == 0)
								{
									num2 = 0;
								}
								continue;
							}
							return;
						case 4:
						case 5:
							__instance.m_slippage = 0f;
							num2 = 1;
							if (<Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_1cfb1f1ff51b45969cc068ddfe8757d3 != 0)
							{
								num2 = 0;
							}
							continue;
						case 8:
							__instance.m_sliding = false;
							num2 = 2;
							continue;
						case 3:
							return;
						case 1:
							__instance.m_wallRunning = true;
							num2 = 8;
							if (<Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_96f4d9c8a227412c91dc55f2d7bb6411 == 0)
							{
								num2 = 0;
							}
							continue;
						case 2:
							currentVel = __state;
							num2 = 0;
							if (<Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_0669df8032c94431a7764f08856908bf == 0)
							{
								num2 = 0;
							}
							continue;
						case 7:
							break;
						case 0:
							return;
						}
						break;
					}
					flag = !__instance.IsTamed();
					num = 6;
				}
			}

			internal static bool FillRecord()
			{
				return ChangeRecord == null;
			}

			internal static RulesReponse SortRecord()
			{
				return ChangeRecord;
			}
		}

		[<38803967-c4af-4b81-a896-b031642616a6>NullableContext(0)]
		[HarmonyPatch(typeof(Character), "CanWallRun")]
		private static class InvocationErrorComp
		{
			private static InvocationErrorComp TestRecord;

			[UsedImplicitly]
			[<38803967-c4af-4b81-a896-b031642616a6>NullableContext(1)]
			private static void Postfix(Character __instance, ref bool __result)
			{
				int num = 1;
				int num2 = num;
				while (true)
				{
					switch (num2)
					{
					default:
						return;
					case 0:
						return;
					case 1:
						__result |= __instance.IsTamed();
						num2 = 0;
						if (<Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_c0bcc41541a34781bb174adc1f1021ad != 0)
						{
							num2 = 0;
						}
						break;
					}
				}
			}

			internal static bool RestartRecord()
			{
				return TestRecord == null;
			}

			internal static InvocationErrorComp DefineRecord()
			{
				return TestRecord;
			}
		}

		private static readonly string m_Attribute;

		private static readonly string m_Mapper;

		internal static string thread;

		private readonly Harmony m_Policy;

		internal static MagicalMountsPlugin m_Map;

		public static readonly ManualLogSource MagicalMountsLogger;

		private static readonly ConfigSync m_Error;

		private static AssetBundle _Token;

		private static ConfigEntry<KeyCode> adapter;

		public static ConfigEntry<KeyCode> Key_SummonMount;

		public static ConfigEntry<int> _cookieHealAmount;

		public static ConfigEntry<int> _cookieHealCooldown;

		public static ConfigEntry<int> _cookieDurabilityCost;

		public static List<string> _creatureList;

		[<0636da5b-9fe8-42d0-8b4e-7336202d8a87>Nullable(2)]
		private static ConfigEntry<bool> m_Producer;

		internal static ConfigEntry<int> param;

		internal static ConfigEntry<float> system;

		internal static ConfigEntry<int> _Interpreter;

		internal static ConfigEntry<float> prototype;

		internal static ConfigEntry<float> _Getter;

		internal static ConfigEntry<int> m_Indexer;

		internal static ConfigEntry<int> _Utils;

		internal static ConfigEntry<int> bridge;

		internal static ConfigEntry<float> m_Factory;

		internal static ConfigEntry<int> decorator;

		internal static ConfigEntry<float> m_Page;

		internal static ConfigEntry<float> _Configuration;

		internal static ConfigEntry<int> m_Account;

		internal static ConfigEntry<int> _Method;

		internal static ConfigEntry<int> _Comparator;

		internal static ConfigEntry<float> m_Proxy;

		internal static ConfigEntry<int> _Status;

		internal static ConfigEntry<float> m_Wrapper;

		internal static ConfigEntry<float> m_Attr;

		internal static ConfigEntry<int> m_Model;

		internal static ConfigEntry<int> m_Listener;

		internal static ConfigEntry<int> service;

		internal static ConfigEntry<float> parameter;

		internal static ConfigEntry<int> m_Predicate;

		internal static ConfigEntry<float> _Mapping;

		internal static ConfigEntry<float> database;

		internal static ConfigEntry<int> strategy;

		internal static ConfigEntry<int> task;

		internal static ConfigEntry<int> rule;

		internal static ConfigEntry<float> _Base;

		internal static ConfigEntry<int> _Role;

		internal static ConfigEntry<float> m_Visitor;

		internal static ConfigEntry<float> dic;

		internal static ConfigEntry<int> descriptor;

		internal static ConfigEntry<int> _Client;

		internal static ConfigEntry<int> instance;

		internal static ConfigEntry<float> _Tests;

		internal static ConfigEntry<int> _Merchant;

		internal static ConfigEntry<float> interceptor;

		internal static ConfigEntry<float> _Initializer;

		internal static ConfigEntry<int> _Processor;

		internal static ConfigEntry<int> _Property;

		internal static ConfigEntry<int> _Authentication;

		internal static ConfigEntry<float> _Reg;

		internal static ConfigEntry<int> creator;

		internal static ConfigEntry<float> writer;

		internal static ConfigEntry<int> m_Tokenizer;

		internal static ConfigEntry<float> _Process;

		internal static ConfigEntry<int> m_Parser;

		internal static ConfigEntry<float> _Struct;

		internal static ConfigEntry<int> _Val;

		internal static ConfigEntry<float> definition;

		internal static ConfigEntry<int> _Invocation;

		internal static ConfigEntry<float> message;

		internal static ConfigEntry<int> m_Importer;

		internal static ConfigEntry<float> _Field;

		internal static ConfigEntry<int> _Repository;

		internal static ConfigEntry<float> _Order;

		internal static ConfigEntry<int> m_Serializer;

		internal static ConfigEntry<float> m_Advisor;

		internal static ConfigEntry<int> code;

		internal static ConfigEntry<float> expression;

		internal static ConfigEntry<int> resolver;

		internal static ConfigEntry<float> m_Event;

		internal static ConfigEntry<int> m_Registry;

		internal static ConfigEntry<float> _Consumer;

		internal static ConfigEntry<int> m_Facade;

		internal static ConfigEntry<float> m_List;

		internal static ConfigEntry<int> template;

		internal static ConfigEntry<float> _Connection;

		internal static ConfigEntry<float> pool;

		internal static ConfigEntry<int> m_Tag;

		internal static ConfigEntry<int> callback;

		internal static ConfigEntry<int> observer;

		internal static ConfigEntry<float> _Printer;

		internal static ConfigEntry<int> _Setter;

		internal static ConfigEntry<float> _State;

		internal static ConfigEntry<float> mock;

		internal static ConfigEntry<int> request;

		internal static ConfigEntry<int> worker;

		internal static ConfigEntry<int> server;

		internal static ConfigEntry<float> m_Singleton;

		internal static ConfigEntry<int> _Params;

		internal static ConfigEntry<float> info;

		internal static ConfigEntry<float> composer;

		internal static ConfigEntry<int> issuer;

		internal static ConfigEntry<int> _Manager;

		internal static ConfigEntry<int> m_Ref;

		internal static ConfigEntry<float> _Rules;

		internal static ConfigEntry<int> _Dispatcher;

		internal static ConfigEntry<float> _Broadcaster;

		internal static ConfigEntry<float> m_Stub;

		internal static ConfigEntry<int> _Reader;

		internal static ConfigEntry<int> _Collection;

		internal static ConfigEntry<int> m_Queue;

		internal static ConfigEntry<float> m_Filter;

		internal static ConfigEntry<int> m_Watcher;

		internal static ConfigEntry<float> m_Schema;

		internal static ConfigEntry<float> iterator;

		internal static ConfigEntry<int> publisher;

		internal static ConfigEntry<int> m_Global;

		internal static ConfigEntry<int> product;

		internal static ConfigEntry<float> _Proc;

		internal static ConfigEntry<int> specificationExporter;

		internal static ConfigEntry<float> _ExporterExporter;

		internal static ConfigEntry<float> m_ReponseExporter;

		internal static ConfigEntry<int> _AttributeExporter;

		internal static ConfigEntry<int> _MapperExporter;

		internal static ConfigEntry<int> threadExporter;

		internal static ConfigEntry<float> _PolicyExporter;

		internal static ConfigEntry<int> _MapExporter;

		internal static ConfigEntry<float> errorExporter;

		internal static ConfigEntry<float> m_TokenExporter;

		internal static ConfigEntry<int> m_AdapterExporter;

		internal static ConfigEntry<int> valueExporter;

		internal static ConfigEntry<int> m_ProducerExporter;

		internal static ConfigEntry<float> paramExporter;

		internal static ConfigEntry<int> _SystemExporter;

		internal static ConfigEntry<float> _ContainerExporter;

		internal static ConfigEntry<float> interpreterExporter;

		internal static ConfigEntry<int> _PrototypeExporter;

		internal static ConfigEntry<int> getterExporter;

		internal static ConfigEntry<int> _IndexerExporter;

		internal static ConfigEntry<float> utilsExporter;

		internal static ConfigEntry<int> bridgeExporter;

		internal static ConfigEntry<float> itemExporter;

		internal static ConfigEntry<int> customerExporter;

		internal static ConfigEntry<float> factoryExporter;

		internal static ConfigEntry<int> decoratorExporter;

		internal static ConfigEntry<float> pageExporter;

		internal static ConfigEntry<int> m_ConfigurationExporter;

		internal static ConfigEntry<float> _AccountExporter;

		internal static ConfigEntry<int> _MethodExporter;

		internal static ConfigEntry<float> comparatorExporter;

		internal static ConfigEntry<int> proxyExporter;

		internal static ConfigEntry<float> _StatusExporter;

		internal static ConfigEntry<int> _WrapperExporter;

		internal static ConfigEntry<float> m_AttrExporter;

		internal static ConfigEntry<int> _ModelExporter;

		internal static ConfigEntry<float> algoExporter;

		internal static ConfigEntry<int> m_ListenerExporter;

		internal static ConfigEntry<float> serviceExporter;

		internal static ConfigEntry<int> m_TestExporter;

		internal static ConfigEntry<float> _ParameterExporter;

		internal static ConfigEntry<int> predicateExporter;

		internal static ConfigEntry<float> _MappingExporter;

		internal static ConfigEntry<int> m_DatabaseExporter;

		internal static ConfigEntry<float> candidateExporter;

		internal static ConfigEntry<int> _ConfigExporter;

		internal static ConfigEntry<float> _StrategyExporter;

		internal static ConfigEntry<int> _TaskExporter;

		internal static ConfigEntry<float> m_RuleExporter;

		internal static ConfigEntry<int> _BaseExporter;

		internal static ConfigEntry<float> _RoleExporter;

		internal static ConfigEntry<int> visitorExporter;

		internal static ConfigEntry<float> _DicExporter;

		internal static ConfigEntry<int> m_DescriptorExporter;

		internal static ConfigEntry<float> m_IdentifierExporter;

		internal static ConfigEntry<float> clientExporter;

		internal static ConfigEntry<int> m_InstanceExporter;

		internal static ConfigEntry<int> _TestsExporter;

		internal static ConfigEntry<int> _MerchantExporter;

		internal static ConfigEntry<float> interceptorExporter;

		internal static ConfigEntry<int> initializerExporter;

		internal static ConfigEntry<float> m_ProcessorExporter;

		internal static ConfigEntry<float> propertyExporter;

		internal static ConfigEntry<int> _AuthenticationExporter;

		internal static ConfigEntry<int> _ExceptionExporter;

		internal static ConfigEntry<int> _RegExporter;

		internal static ConfigEntry<float> helperExporter;

		internal static ConfigEntry<int> creatorExporter;

		internal static ConfigEntry<float> m_WriterExporter;

		internal static ConfigEntry<float> _ObjectExporter;

		internal static ConfigEntry<int> m_TokenizerExporter;

		internal static ConfigEntry<int> _ProcessExporter;

		internal static ConfigEntry<int> parserExporter;

		internal static ConfigEntry<float> structExporter;

		internal static ConfigEntry<int> m_ValExporter;

		internal static ConfigEntry<float> contextExporter;

		internal static ConfigEntry<float> definitionExporter;

		internal static ConfigEntry<int> invocationExporter;

		internal static ConfigEntry<int> _MessageExporter;

		internal static ConfigEntry<int> importerExporter;

		internal static ConfigEntry<float> m_FieldExporter;

		internal static ConfigEntry<int> _RepositoryExporter;

		internal static ConfigEntry<float> _OrderExporter;

		internal static ConfigEntry<float> serializerExporter;

		internal static ConfigEntry<int> m_AdvisorExporter;

		internal static ConfigEntry<int> _CodeExporter;

		internal static ConfigEntry<int> _ExpressionExporter;

		internal static ConfigEntry<float> _ResolverExporter;

		internal static ConfigEntry<int> _EventExporter;

		internal static ConfigEntry<float> _RegistryExporter;

		internal static ConfigEntry<float> consumerExporter;

		internal static ConfigEntry<int> m_FacadeExporter;

		internal static ConfigEntry<int> listExporter;

		internal static ConfigEntry<int> templateExporter;

		internal static ConfigEntry<float> connectionExporter;

		internal static ConfigEntry<int> m_PoolExporter;

		internal static ConfigEntry<float> _TagExporter;

		internal static ConfigEntry<int> m_CallbackExporter;

		internal static ConfigEntry<float> _ObserverExporter;

		internal static ConfigEntry<int> m_PrinterExporter;

		internal static ConfigEntry<float> m_SetterExporter;

		internal static ConfigEntry<int> _StateExporter;

		internal static ConfigEntry<float> m_MockExporter;

		internal static ConfigEntry<int> m_RequestExporter;

		internal static ConfigEntry<float> m_WorkerExporter;

		internal static ConfigEntry<int> _ServerExporter;

		internal static ConfigEntry<float> _SingletonExporter;

		internal static ConfigEntry<int> paramsExporter;

		internal static ConfigEntry<float> _InfoExporter;

		internal static ConfigEntry<int> _ComposerExporter;

		internal static ConfigEntry<float> classExporter;

		internal static ConfigEntry<int> m_RecordExporter;

		internal static ConfigEntry<float> m_IssuerExporter;

		internal static ConfigEntry<int> _ManagerExporter;

		internal static ConfigEntry<float> m_RefExporter;

		internal static ConfigEntry<int> _RulesExporter;

		internal static ConfigEntry<float> m_DispatcherExporter;

		internal static ConfigEntry<int> _BroadcasterExporter;

		internal static ConfigEntry<float> m_StubExporter;

		internal static ConfigEntry<int> readerExporter;

		internal static ConfigEntry<int> m_CollectionExporter;

		internal static ConfigEntry<int> queueExporter;

		internal static ConfigEntry<float> m_AnnotationExporter;

		internal static ConfigEntry<int> filterExporter;

		internal static ConfigEntry<int> m_WatcherExporter;

		internal static ConfigEntry<int> schemaExporter;

		internal static ConfigEntry<float> _IteratorExporter;

		internal static ConfigEntry<int> _PublisherExporter;

		internal static ConfigEntry<int> _GlobalExporter;

		internal static ConfigEntry<int> m_ProductExporter;

		internal static ConfigEntry<float> m_ProcExporter;

		internal static ConfigEntry<int> specificationReponse;

		internal static ConfigEntry<int> _ExporterReponse;

		internal static ConfigEntry<int> reponseReponse;

		internal static ConfigEntry<float> attributeReponse;

		internal static ConfigEntry<int> m_MapperReponse;

		internal static ConfigEntry<int> m_ThreadReponse;

		internal static ConfigEntry<int> _PolicyReponse;

		internal static ConfigEntry<float> mapReponse;

		internal static ConfigEntry<int> _ErrorReponse;

		internal static ConfigEntry<int> _TokenReponse;

		internal static ConfigEntry<int> adapterReponse;

		internal static ConfigEntry<int> _ValueReponse;

		internal static ConfigEntry<float> m_ProducerReponse;

		internal static ConfigEntry<int> _ParamReponse;

		internal static ConfigEntry<int> m_SystemReponse;

		internal static ConfigEntry<float> m_ContainerReponse;

		internal static ConfigEntry<int> _InterpreterReponse;

		internal static ConfigEntry<int> m_PrototypeReponse;

		internal static ConfigEntry<float> _GetterReponse;

		internal static ConfigEntry<int> _IndexerReponse;

		internal static ConfigEntry<int> m_UtilsReponse;

		internal static ConfigEntry<float> m_BridgeReponse;

		internal static ConfigEntry<int> m_ItemReponse;

		internal static ConfigEntry<int> customerReponse;

		internal static ConfigEntry<float> factoryReponse;

		internal static ConfigEntry<int> _DecoratorReponse;

		internal static ConfigEntry<int> pageReponse;

		internal static ConfigEntry<float> m_ConfigurationReponse;

		internal static ConfigEntry<int> _AccountReponse;

		internal static ConfigEntry<float> m_MethodReponse;

		internal static ConfigEntry<int> _ComparatorReponse;

		internal static ConfigEntry<float> _ProxyReponse;

		internal static ConfigEntry<float> m_StatusReponse;

		internal static ConfigEntry<int> _WrapperReponse;

		internal static ConfigEntry<int> attrReponse;

		internal static ConfigEntry<int> modelReponse;

		internal static ConfigEntry<float> algoReponse;

		internal static ConfigEntry<int> listenerReponse;

		internal static ConfigEntry<float> _ServiceReponse;

		internal static ConfigEntry<float> _TestReponse;

		internal static ConfigEntry<int> _ParameterReponse;

		internal static ConfigEntry<int> predicateReponse;

		internal static ConfigEntry<int> mappingReponse;

		internal static ConfigEntry<float> m_DatabaseReponse;

		internal static ConfigEntry<int> m_CandidateReponse;

		internal static ConfigEntry<float> configReponse;

		internal static ConfigEntry<float> m_StrategyReponse;

		internal static ConfigEntry<int> _TaskReponse;

		internal static ConfigEntry<int> _RuleReponse;

		internal static ConfigEntry<int> baseReponse;

		internal static ConfigEntry<float> _RoleReponse;

		internal static ConfigEntry<int> _VisitorReponse;

		internal static ConfigEntry<float> _DicReponse;

		internal static ConfigEntry<float> descriptorReponse;

		internal static ConfigEntry<int> m_IdentifierReponse;

		internal static ConfigEntry<int> clientReponse;

		internal static ConfigEntry<int> _InstanceReponse;

		internal static ConfigEntry<float> testsReponse;

		internal static ConfigEntry<int> m_MerchantReponse;

		internal static ConfigEntry<float> _InterceptorReponse;

		internal static ConfigEntry<float> m_InitializerReponse;

		internal static ConfigEntry<int> _ProcessorReponse;

		internal static ConfigEntry<int> propertyReponse;

		internal static ConfigEntry<int> m_AuthenticationReponse;

		internal static ConfigEntry<float> m_ExceptionReponse;

		internal static ConfigEntry<int> regReponse;

		internal static ConfigEntry<float> _HelperReponse;

		internal static ConfigEntry<float> m_CreatorReponse;

		internal static ConfigEntry<int> _WriterReponse;

		internal static ConfigEntry<int> _ObjectReponse;

		internal static ConfigEntry<int> tokenizerReponse;

		internal static ConfigEntry<float> processReponse;

		internal static ConfigEntry<int> m_ParserReponse;

		internal static ConfigEntry<float> structReponse;

		internal static ConfigEntry<float> _ValReponse;

		internal static ConfigEntry<int> m_ContextReponse;

		internal static ConfigEntry<int> _DefinitionReponse;

		internal static ConfigEntry<int> invocationReponse;

		internal static ConfigEntry<float> messageReponse;

		internal static ConfigEntry<int> importerReponse;

		internal static ConfigEntry<float> m_FieldReponse;

		internal static ConfigEntry<float> m_RepositoryReponse;

		internal static ConfigEntry<int> orderReponse;

		internal static ConfigEntry<int> _SerializerReponse;

		internal static ConfigEntry<int> _AdvisorReponse;

		internal static ConfigEntry<float> codeReponse;

		internal static ConfigEntry<int> m_ExpressionReponse;

		internal static ConfigEntry<float> m_ResolverReponse;

		internal static ConfigEntry<float> m_EventReponse;

		internal static ConfigEntry<int> _RegistryReponse;

		internal static ConfigEntry<int> _ConsumerReponse;

		internal static ConfigEntry<int> facadeReponse;

		internal static ConfigEntry<float> listReponse;

		internal static ConfigEntry<int> templateReponse;

		internal static ConfigEntry<float> connectionReponse;

		internal static ConfigEntry<float> _PoolReponse;

		internal static ConfigEntry<int> m_TagReponse;

		internal static ConfigEntry<int> _CallbackReponse;

		internal static ConfigEntry<int> _ObserverReponse;

		internal static ConfigEntry<int> m_PrinterReponse;

		internal static ConfigEntry<float> setterReponse;

		internal static ConfigEntry<int> _StateReponse;

		internal static ConfigEntry<int> _MockReponse;

		internal static ConfigEntry<float> requestReponse;

		internal static ConfigEntry<int> workerReponse;

		internal static ConfigEntry<int> m_ServerReponse;

		internal static ConfigEntry<float> _SingletonReponse;

		internal static ConfigEntry<int> m_ParamsReponse;

		internal static ConfigEntry<int> m_InfoReponse;

		internal static ConfigEntry<float> composerReponse;

		internal static ConfigEntry<int> _ClassReponse;

		internal static ConfigEntry<int> m_RecordReponse;

		internal static ConfigEntry<float> m_IssuerReponse;

		internal static MagicalMountsPlugin ResolveRecord;

		private Mount QuerySpecification(AssetBundle asset, MountType type, string prefab, GameObject itemToSpawn, GameObject itemForBook, GameObject explosion, string attach, string name, string description, float multiplierIcon, string category)
		{
			int num = 2;
			int num2 = num;
			Mount result = default(Mount);
			while (true)
			{
				switch (num2)
				{
				case 2:
					result = new Mount(asset, prefab, name, description, multiplierIcon, category, ((Object)itemForBook).name)
					{
						Type = type,
						SummonItem = ((Object)itemToSpawn).name,
						AddToBookItem = ((Object)itemForBook).name,
						ExplosionEffect = explosion,
						AttachmentPoint = attach
					};
					num2 = 1;
					if (<Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_894b6c8c7a7d46ae956f42f0efa48223 != 0)
					{
						num2 = 1;
					}
					break;
				default:
					return result;
				}
			}
		}

		public void Awake()
		{
			//IL_2f22: Unknown result type (might be due to invalid IL or missing references)
			//IL_2f88: Unknown result type (might be due to invalid IL or missing references)
			//IL_422b: Unknown result type (might be due to invalid IL or missing references)
			//IL_4291: Unknown result type (might be due to invalid IL or missing references)
			//IL_aac4: Unknown result type (might be due to invalid IL or missing references)
			//IL_ab2a: Unknown result type (might be due to invalid IL or missing references)
			//IL_7259: Unknown result type (might be due to invalid IL or missing references)
			//IL_72ba: Unknown result type (might be due to invalid IL or missing references)
			//IL_690a: Unknown result type (might be due to invalid IL or missing references)
			//IL_696a: Unknown result type (might be due to invalid IL or missing references)
			//IL_8122: Unknown result type (might be due to invalid IL or missing references)
			//IL_8188: Unknown result type (might be due to invalid IL or missing references)
			//IL_f79f: Unknown result type (might be due to invalid IL or missing references)
			//IL_f805: Unknown result type (might be due to invalid IL or missing references)
			//IL_136e2: Unknown result type (might be due to invalid IL or missing references)
			//IL_13743: Unknown result type (might be due to invalid IL or missing references)
			//IL_2c22: Unknown result type (might be due to invalid IL or missing references)
			//IL_2c88: Unknown result type (might be due to invalid IL or missing references)
			//IL_1bb9: Unknown result type (might be due to invalid IL or missing references)
			//IL_1c19: Unknown result type (might be due to invalid IL or missing references)
			//IL_cb38: Unknown result type (might be due to invalid IL or missing references)
			//IL_cb9e: Unknown result type (might be due to invalid IL or missing references)
			//IL_972b: Unknown result type (might be due to invalid IL or missing references)
			//IL_9791: Unknown result type (might be due to invalid IL or missing references)
			//IL_e695: Unknown result type (might be due to invalid IL or missing references)
			//IL_e6f5: Unknown result type (might be due to invalid IL or missing references)
			//IL_b409: Unknown result type (might be due to invalid IL or missing references)
			//IL_b46f: Unknown result type (might be due to invalid IL or missing references)
			//IL_11f1d: Unknown result type (might be due to invalid IL or missing references)
			//IL_11f83: Unknown result type (might be due to invalid IL or missing references)
			//IL_4bb9: Unknown result type (might be due to invalid IL or missing references)
			//IL_4c19: Unknown result type (might be due to invalid IL or missing references)
			//IL_3d38: Unknown result type (might be due to invalid IL or missing references)
			//IL_3d99: Unknown result type (might be due to invalid IL or missing references)
			//IL_30f8: Unknown result type (might be due to invalid IL or missing references)
			//IL_315e: Unknown result type (might be due to invalid IL or missing references)
			//IL_a5fd: Unknown result type (might be due to invalid IL or missing references)
			//IL_a65d: Unknown result type (might be due to invalid IL or missing references)
			//IL_110c4: Unknown result type (might be due to invalid IL or missing references)
			//IL_11124: Unknown result type (might be due to invalid IL or missing references)
			//IL_ed5b: Unknown result type (might be due to invalid IL or missing references)
			//IL_edc1: Unknown result type (might be due to invalid IL or missing references)
			//IL_4f97: Unknown result type (might be due to invalid IL or missing references)
			//IL_4ff7: Unknown result type (might be due to invalid IL or missing references)
			//IL_624e: Unknown result type (might be due to invalid IL or missing references)
			//IL_62b4: Unknown result type (might be due to invalid IL or missing references)
			//IL_d9e2: Unknown result type (might be due to invalid IL or missing references)
			//IL_da43: Unknown result type (might be due to invalid IL or missing references)
			//IL_ea01: Unknown result type (might be due to invalid IL or missing references)
			//IL_ea61: Unknown result type (might be due to invalid IL or missing references)
			//IL_16616: Unknown result type (might be due to invalid IL or missing references)
			//IL_1667c: Unknown result type (might be due to invalid IL or missing references)
			//IL_f093: Unknown result type (might be due to invalid IL or missing references)
			//IL_f0f9: Unknown result type (might be due to invalid IL or missing references)
			//IL_10f05: Unknown result type (might be due to invalid IL or missing references)
			//IL_10f65: Unknown result type (might be due to invalid IL or missing references)
			//IL_7de1: Unknown result type (might be due to invalid IL or missing references)
			//IL_7e41: Unknown result type (might be due to invalid IL or missing references)
			//IL_331f: Unknown result type (might be due to invalid IL or missing references)
			//IL_337f: Unknown result type (might be due to invalid IL or missing references)
			//IL_13056: Unknown result type (might be due to invalid IL or missing references)
			//IL_130b6: Unknown result type (might be due to invalid IL or missing references)
			int num = 860;
			Item item44 = default(Item);
			Item item93 = default(Item);
			BuildPiece buildPiece11 = default(BuildPiece);
			Item item3 = default(Item);
			Item item112 = default(Item);
			Item item45 = default(Item);
			BuildPiece buildPiece27 = default(BuildPiece);
			Item item77 = default(Item);
			BuildPiece buildPiece40 = default(BuildPiece);
			Item item9 = default(Item);
			Creature creature49 = default(Creature);
			Item item28 = default(Item);
			Item item12 = default(Item);
			BuildPiece buildPiece32 = default(BuildPiece);
			Item item110 = default(Item);
			Item item117 = default(Item);
			Creature creature48 = default(Creature);
			Item item57 = default(Item);
			Creature creature15 = default(Creature);
			Item item64 = default(Item);
			Item item90 = default(Item);
			Item item17 = default(Item);
			Item item24 = default(Item);
			Item item62 = default(Item);
			Item item38 = default(Item);
			Creature creature51 = default(Creature);
			BuildPiece buildPiece4 = default(BuildPiece);
			Creature creature29 = default(Creature);
			Item item81 = default(Item);
			Item item75 = default(Item);
			Creature creature62 = default(Creature);
			Item item36 = default(Item);
			Mount creature60 = default(Mount);
			Creature creature54 = default(Creature);
			Item item92 = default(Item);
			Item item46 = default(Item);
			Creature creature33 = default(Creature);
			Item item100 = default(Item);
			Item item68 = default(Item);
			Item item88 = default(Item);
			Item item = default(Item);
			Item item51 = default(Item);
			BuildPiece buildPiece16 = default(BuildPiece);
			Item item86 = default(Item);
			Mount creature63 = default(Mount);
			Item item87 = default(Item);
			Item item13 = default(Item);
			GameObject explosion3 = default(GameObject);
			Item item65 = default(Item);
			Item item35 = default(Item);
			Item item14 = default(Item);
			Item item98 = default(Item);
			BuildPiece buildPiece = default(BuildPiece);
			BuildPiece buildPiece30 = default(BuildPiece);
			Item item116 = default(Item);
			Item item37 = default(Item);
			Creature creature50 = default(Creature);
			Item item18 = default(Item);
			Item item8 = default(Item);
			Item item78 = default(Item);
			BuildPiece buildPiece21 = default(BuildPiece);
			Item item76 = default(Item);
			Item item99 = default(Item);
			Item item106 = default(Item);
			Item item89 = default(Item);
			Mount creature42 = default(Mount);
			Item item72 = default(Item);
			Item item2 = default(Item);
			GameObject explosion5 = default(GameObject);
			Item item103 = default(Item);
			Item item74 = default(Item);
			Creature creature39 = default(Creature);
			Mount creature32 = default(Mount);
			BuildPiece buildPiece14 = default(BuildPiece);
			Mount creature25 = default(Mount);
			Item item21 = default(Item);
			Item item71 = default(Item);
			Item item53 = default(Item);
			Item item7 = default(Item);
			BuildPiece buildPiece6 = default(BuildPiece);
			Item item39 = default(Item);
			Mount creature7 = default(Mount);
			Creature creature5 = default(Creature);
			Item item19 = default(Item);
			Creature creature2 = default(Creature);
			BuildPiece buildPiece2 = default(BuildPiece);
			Item item91 = default(Item);
			BuildPiece buildPiece13 = default(BuildPiece);
			Item item82 = default(Item);
			Item item118 = default(Item);
			Creature creature9 = default(Creature);
			Mount creature64 = default(Mount);
			Item item47 = default(Item);
			GameObject explosion4 = default(GameObject);
			Creature creature44 = default(Creature);
			Item item20 = default(Item);
			Item item63 = default(Item);
			BuildPiece buildPiece37 = default(BuildPiece);
			Item item25 = default(Item);
			BuildPiece buildPiece38 = default(BuildPiece);
			Item item96 = default(Item);
			Item item11 = default(Item);
			Item item94 = default(Item);
			Mount creature52 = default(Mount);
			GameObject explosion2 = default(GameObject);
			Mount creature22 = default(Mount);
			Item item107 = default(Item);
			GameObject explosion = default(GameObject);
			BuildPiece buildPiece8 = default(BuildPiece);
			Item item32 = default(Item);
			Item item31 = default(Item);
			Item item70 = default(Item);
			Item item115 = default(Item);
			Assembly executingAssembly = default(Assembly);
			Item item60 = default(Item);
			Item item66 = default(Item);
			Item item40 = default(Item);
			Item item105 = default(Item);
			Item item97 = default(Item);
			BuildPiece buildPiece20 = default(BuildPiece);
			BuildPiece buildPiece39 = default(BuildPiece);
			Item item54 = default(Item);
			Creature creature56 = default(Creature);
			Creature creature43 = default(Creature);
			Item item84 = default(Item);
			Item item61 = default(Item);
			Creature creature34 = default(Creature);
			Item item102 = default(Item);
			Item item73 = default(Item);
			Mount creature16 = default(Mount);
			Item item26 = default(Item);
			Creature creature38 = default(Creature);
			Item item108 = default(Item);
			BuildPiece buildPiece15 = default(BuildPiece);
			Creature creature12 = default(Creature);
			Item item79 = default(Item);
			Item item113 = default(Item);
			Item item42 = default(Item);
			BuildPiece buildPiece41 = default(BuildPiece);
			BuildPiece buildPiece29 = default(BuildPiece);
			Item item15 = default(Item);
			Creature creature58 = default(Creature);
			BuildPiece buildPiece25 = default(BuildPiece);
			Mount creature59 = default(Mount);
			Creature creature13 = default(Creature);
			Item item67 = default(Item);
			BuildPiece buildPiece7 = default(BuildPiece);
			BuildPiece buildPiece28 = default(BuildPiece);
			BuildPiece buildPiece33 = default(BuildPiece);
			Mount creature57 = default(Mount);
			Item item80 = default(Item);
			Item item10 = default(Item);
			BuildPiece buildPiece5 = default(BuildPiece);
			Item item111 = default(Item);
			Item item104 = default(Item);
			Item item101 = default(Item);
			Item item69 = default(Item);
			Item item83 = default(Item);
			Item item109 = default(Item);
			Mount creature45 = default(Mount);
			Creature creature20 = default(Creature);
			BuildPiece buildPiece34 = default(BuildPiece);
			Item item22 = default(Item);
			BuildPiece buildPiece26 = default(BuildPiece);
			BuildPiece buildPiece10 = default(BuildPiece);
			Creature creature28 = default(Creature);
			BuildPiece buildPiece18 = default(BuildPiece);
			Creature creature18 = default(Creature);
			Item item23 = default(Item);
			Item item27 = default(Item);
			Item item41 = default(Item);
			BuildPiece buildPiece35 = default(BuildPiece);
			BuildPiece buildPiece22 = default(BuildPiece);
			Item item34 = default(Item);
			Item item59 = default(Item);
			Creature creature = default(Creature);
			BuildPiece buildPiece23 = default(BuildPiece);
			Creature creature31 = default(Creature);
			BuildPiece buildPiece31 = default(BuildPiece);
			Mount creature30 = default(Mount);
			BuildPiece buildPiece19 = default(BuildPiece);
			Mount creature21 = default(Mount);
			Mount creature14 = default(Mount);
			Item item56 = default(Item);
			Item item52 = default(Item);
			Creature creature10 = default(Creature);
			Item item50 = default(Item);
			Mount creature8 = default(Mount);
			BuildPiece buildPiece3 = default(BuildPiece);
			Item item6 = default(Item);
			Item item30 = default(Item);
			Item item16 = default(Item);
			Item item4 = default(Item);
			BuildPiece buildPiece17 = default(BuildPiece);
			Item item95 = default(Item);
			Mount creature61 = default(Mount);
			Item item48 = default(Item);
			BuildPiece buildPiece42 = default(BuildPiece);
			Item item43 = default(Item);
			Creature creature19 = default(Creature);
			Item item33 = default(Item);
			Mount creature67 = default(Mount);
			BuildPiece buildPiece12 = default(BuildPiece);
			Item item58 = default(Item);
			Creature creature35 = default(Creature);
			Mount creature26 = default(Mount);
			Item item114 = default(Item);
			Creature creature24 = default(Creature);
			Item item55 = default(Item);
			Item item29 = default(Item);
			Item item5 = default(Item);
			Mount creature66 = default(Mount);
			Item item85 = default(Item);
			Mount creature65 = default(Mount);
			Mount creature55 = default(Mount);
			BuildPiece buildPiece36 = default(BuildPiece);
			BuildPiece buildPiece9 = default(BuildPiece);
			Mount creature36 = default(Mount);
			Mount creature4 = default(Mount);
			Creature creature6 = default(Creature);
			Mount creature46 = default(Mount);
			Mount creature40 = default(Mount);
			BuildPiece buildPiece24 = default(BuildPiece);
			Mount creature53 = default(Mount);
			Item item49 = default(Item);
			GameObject explosion6 = default(GameObject);
			Mount creature11 = default(Mount);
			Mount creature47 = default(Mount);
			Mount creature27 = default(Mount);
			Mount creature41 = default(Mount);
			Mount creature37 = default(Mount);
			Mount creature3 = default(Mount);
			Mount creature23 = default(Mount);
			Mount creature17 = default(Mount);
			while (true)
			{
				int num2 = num;
				while (true)
				{
					switch (num2)
					{
					case 651:
						item44.Crafting.Add(ItemManager.CraftingTable.Workbench, 4);
						num = 432;
						break;
					case 241:
						item93.Crafting.Add(ItemManager.CraftingTable.Workbench, 4);
						num2 = 694;
						continue;
					case 574:
						buildPiece11.Description.English(DispatcherAttribute.FindPolicy(0x647DDFEB ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_85dda70593694491979763aae742abf0));
						num2 = 491;
						if (<Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_0bc51dfcd4ea492abf4467f58efc1259 != 0)
						{
							num2 = 718;
						}
						continue;
					case 986:
						item3.RequiredItems.Add(DispatcherAttribute.FindPolicy(0x212B01C7 ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_96f4d9c8a227412c91dc55f2d7bb6411), 10);
						num2 = 698;
						continue;
					case 1100:
						item112 = new Item(DispatcherAttribute.FindPolicy(0xF27935A ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_e2ac7e83334f4ee2b4faae63f322f1fc), DispatcherAttribute.FindPolicy(0x1285B3B9 ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_843fa0efeeae401ebc3dd97b3f6cc8d9), DispatcherAttribute.FindPolicy(0x4189747C ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_bb42c305d9cf4402aa8a06025c265c0e));
						num2 = 705;
						continue;
					case 527:
						item45.RequiredItems.Add(DispatcherAttribute.FindPolicy(0x1A7D8EB5 ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_c0bcc41541a34781bb174adc1f1021ad), 250);
						num2 = 71;
						continue;
					case 455:
						buildPiece27.RequiredItems.Add(DispatcherAttribute.FindPolicy(-1789260723 ^ -1703045145 ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_e2ac7e83334f4ee2b4faae63f322f1fc), 5, recover: true);
						num2 = 178;
						continue;
					case 878:
						item77.RequiredItems.Add(DispatcherAttribute.FindPolicy(0x67B2EEFF ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_9162fee099e444a8ad0c8f1f78137a13), 250);
						num2 = 635;
						continue;
					case 838:
						buildPiece40.Description.English(DispatcherAttribute.FindPolicy(--357002894 ^ 0xF3AF337 ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_c0bcc41541a34781bb174adc1f1021ad));
						num2 = 599;
						continue;
					case 656:
						item77 = new Item(DispatcherAttribute.FindPolicy(0x10736F3D ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_8fdde41cd8d042c99f0b49148c654606), DispatcherAttribute.FindPolicy(0x3EBCE0E7 ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_c0f07c067a9e4b5ca85cc257f8899e97), DispatcherAttribute.FindPolicy(0x7BD67461 ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_25d7dfa94d9747c0a61cf0be093fccb5));
						num2 = 683;
						continue;
					case 195:
						item9.RequiredItems.Add(DispatcherAttribute.FindPolicy(0xF278C86 ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_e2ac7e83334f4ee2b4faae63f322f1fc), 900);
						num2 = 1145;
						continue;
					case 395:
						creature49.Drops[DispatcherAttribute.FindPolicy(0x1285BD9D ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_843fa0efeeae401ebc3dd97b3f6cc8d9)].DropChance = 0f;
						num = 263;
						break;
					case 864:
						item28.Description.English(DispatcherAttribute.FindPolicy(0x27765FF9 ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_11b8f870b8ca4b23856a9fb4b96d249c));
						num2 = 1149;
						if (<Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_5cf61c1d67934a4dad4771ce8c63ee39 == 0)
						{
							num2 = 245;
						}
						continue;
					case 503:
						item12.Crafting.Add(ItemManager.CraftingTable.Workbench, 4);
						num2 = 205;
						if (<Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_3cf415bbfa134625a4e4b4281bdf2293 == 0)
						{
							num2 = 65;
						}
						continue;
					case 1048:
						buildPiece32.Category.Add(DispatcherAttribute.FindPolicy(0x2776360F ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_11b8f870b8ca4b23856a9fb4b96d249c));
						num2 = 1191;
						continue;
					case 68:
						item110.Name.English(DispatcherAttribute.FindPolicy(0x647DF73D ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_85dda70593694491979763aae742abf0));
						num2 = 514;
						continue;
					case 733:
						item117.RequiredItems.Add(DispatcherAttribute.FindPolicy(0x58F85822 ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_3ade89368242461abb3afba08ed0eb91), 300);
						num2 = 792;
						continue;
					case 469:
						creature48.Drops[DispatcherAttribute.FindPolicy(0x6D929358 ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_3357146a1a98443694a5a2344b022aad)].DropChance = 0f;
						num2 = 375;
						if (<Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_b197bad9f19647eeadb393352dc5456b != 0)
						{
							num2 = 380;
						}
						continue;
					case 777:
						Key_SummonMount = ((BaseUnityPlugin)this).Config.Bind<KeyCode>(DispatcherAttribute.FindPolicy(-1789260723 ^ -1350147114 ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_e3d1ec81a16c4e85b81013edf6c19dce), DispatcherAttribute.FindPolicy(0x750B377B ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_45d4ee4c58424598aa466a649c3fb5e2), (KeyCode)291, DispatcherAttribute.FindPolicy(0x27763F67 ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_11b8f870b8ca4b23856a9fb4b96d249c));
						num2 = 895;
						if (<Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_3c3ee68579674204bcf7f8d60605c8aa == 0)
						{
							num2 = 348;
						}
						continue;
					case 414:
						item57.RequiredItems.Add(DispatcherAttribute.FindPolicy(0x702AF2BB ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_0c97cddc268040e8a7bafa5f31d22b07), 500);
						num = 1060;
						break;
					case 1199:
						ConfigGeneration.FillSpecification(creature15);
						num2 = 600;
						if (<Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_c0f07c067a9e4b5ca85cc257f8899e97 == 0)
						{
							num2 = 426;
						}
						continue;
					case 121:
						item64.Name.English(DispatcherAttribute.FindPolicy(0x703A4A24 ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_ee678aac982749129c2277a56f69ad27));
						num2 = 978;
						if (<Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_6658a2be25f8490588ea6ff67c0b13d2 == 0)
						{
							num2 = 964;
						}
						continue;
					case 284:
						item90.Description.English(DispatcherAttribute.FindPolicy(0x647DE4F7 ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_85dda70593694491979763aae742abf0));
						num2 = 128;
						if (<Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_d1e4362b12ba43758ced8aa2ce18b191 == 0)
						{
							num2 = 506;
						}
						continue;
					case 1091:
						item17.RequiredItems.Add(DispatcherAttribute.FindPolicy(0x442DA708 ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_0669df8032c94431a7764f08856908bf), 500);
						num2 = 417;
						if (<Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_844c90fc396f4bd3a73fa2bc9d5dd2d6 == 0)
						{
							num2 = 1004;
						}
						continue;
					case 516:
						item24.Name.English(DispatcherAttribute.FindPolicy(0x234C36E3 ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_a60c73647c724d968f20adc20f420b1c));
						num2 = 709;
						continue;
					case 1076:
						item62.RequiredItems.Add(DispatcherAttribute.FindPolicy(0x247134D2 ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_2eb6ee419c7f42f38518eb08164648ef), 400);
						num2 = 279;
						continue;
					case 317:
						item38.RequiredItems.Add(DispatcherAttribute.FindPolicy(0x58F85822 ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_3ade89368242461abb3afba08ed0eb91), 500);
						num2 = 463;
						if (<Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_1a237a99af9c4040ac0e8b7840ca45bd == 0)
						{
							num2 = 725;
						}
						continue;
					case 871:
						creature51.Drops[DispatcherAttribute.FindPolicy(0x1285BD9D ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_843fa0efeeae401ebc3dd97b3f6cc8d9)].Amount = new CreatureManager.Range(1f, 2f);
						num2 = 225;
						if (<Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_041d49d2e947412e985d9c0598f32bd2 == 0)
						{
							num2 = 607;
						}
						continue;
					case 823:
						buildPiece4 = new BuildPiece(DispatcherAttribute.FindPolicy(0x29D8E023 ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_b197bad9f19647eeadb393352dc5456b), DispatcherAttribute.FindPolicy(0x24713B46 ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_2eb6ee419c7f42f38518eb08164648ef), DispatcherAttribute.FindPolicy(0x50D0A421 ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_78da9b7e4d88437fa4999dd5e441ae83));
						num2 = 946;
						continue;
					case 341:
						creature29.Drops[DispatcherAttribute.FindPolicy(0x7208AFC4 ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_da45b7f9705d4954823c7fe6c90a08d1)].DropChance = 0f;
						num2 = 40;
						continue;
					case 924:
						item81.Crafting.Add(ItemManager.CraftingTable.Workbench, 2);
						num2 = 1135;
						continue;
					case 496:
						item75 = new Item(DispatcherAttribute.FindPolicy(0x57565D5E ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_6658a2be25f8490588ea6ff67c0b13d2), DispatcherAttribute.FindPolicy(0x5C2D9617 ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_44006f309c684731a5089f116f102982), DispatcherAttribute.FindPolicy(--874498345 ^ 0x228BF6BB ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_eef1032244ce418e932c5a6e3e165989));
						num2 = 889;
						continue;
					case 327:
						creature62 = new Creature(DispatcherAttribute.FindPolicy(0x66FC4D6C ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_3cf415bbfa134625a4e4b4281bdf2293), DispatcherAttribute.FindPolicy(0x7C1EEA32 ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_46c5f7f62cf443fda94ac0d2dc532be6), DispatcherAttribute.FindPolicy(0x57565B30 ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_6658a2be25f8490588ea6ff67c0b13d2))
						{
							ConfigurationEnabled = true,
							CanSpawn = false,
							CanBeTamed = true,
							Faction = (Faction)0,
							FoodItems = DispatcherAttribute.FindPolicy(0x24710BE2 ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_2eb6ee419c7f42f38518eb08164648ef),
							SpecificSpawnTime = SpawnTime.Always,
							RequiredAltitude = new CreatureManager.Range(5f, 1000f),
							RequiredOceanDepth = new CreatureManager.Range(0f, 0f),
							RequiredGlobalKey = GlobalKey.None,
							Biome = (Biome)1,
							SpecificSpawnArea = SpawnArea.Everywhere,
							GroupSize = new CreatureManager.Range(1f, 2f),
							CheckSpawnInterval = 600,
							SpawnChance = 100f,
							ForestSpawn = Forest.Both,
							RequiredWeather = Weather.ClearSkies,
							SpawnAltitude = 10f,
							CanHaveStars = false,
							AttackImmediately = false,
							Maximum = 2
						};
						num2 = 358;
						continue;
					case 431:
						item36.Crafting.Add(ItemManager.CraftingTable.Workbench, 4);
						num2 = 67;
						continue;
					case 984:
						ConfigGeneration.PatchSpecification(creature60);
						num2 = 282;
						if (<Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_b197bad9f19647eeadb393352dc5456b == 0)
						{
							num2 = 192;
						}
						continue;
					case 650:
						creature54.Drops[DispatcherAttribute.FindPolicy(0x129BEA2F ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_ce7ee0869c0041bbb3058182d7dbdb53)].DropChance = 0f;
						num2 = 994;
						continue;
					case 843:
						item92.Crafting.Add(ItemManager.CraftingTable.Workbench, 4);
						num2 = 201;
						continue;
					case 934:
						item62.Name.English(DispatcherAttribute.FindPolicy(0x3D89ADED ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_88fd7915297b434f9d0ad753baad3ff0));
						num2 = 598;
						if (<Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_e3d1ec81a16c4e85b81013edf6c19dce != 0)
						{
							num2 = 619;
						}
						continue;
					case 1015:
						item46.Name.English(DispatcherAttribute.FindPolicy(0x24714934 ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_2eb6ee419c7f42f38518eb08164648ef));
						num2 = 120;
						if (<Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_eef1032244ce418e932c5a6e3e165989 == 0)
						{
							num2 = 50;
						}
						continue;
					case 144:
						creature33.Drops[DispatcherAttribute.FindPolicy(0x234C63D1 ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_a60c73647c724d968f20adc20f420b1c)].Amount = new CreatureManager.Range(1f, 2f);
						num2 = 247;
						continue;
					case 825:
						item100.Name.English(DispatcherAttribute.FindPolicy(0x1AF4CD36 ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_945735f627df4d318bb89a4434056a65));
						num2 = 990;
						continue;
					case 1193:
						item68.Description.English(DispatcherAttribute.FindPolicy(0xC284EA ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_91517bfd8c4a444caec6dadd6e1ad8ba));
						num2 = 724;
						continue;
					case 1028:
						item88.Crafting.Add(ItemManager.CraftingTable.Workbench, 4);
						num2 = 1079;
						continue;
					case 826:
						item.Name.English(DispatcherAttribute.FindPolicy(0x10732BB1 ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_8fdde41cd8d042c99f0b49148c654606));
						num2 = 64;
						if (<Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_13af386c102742daab17547737a24a29 != 0)
						{
							num2 = 12;
						}
						continue;
					case 326:
						item51.Description.English(DispatcherAttribute.FindPolicy(0x78F6F205 ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_d6d3d1b370cb46e9b9904c3ed19eaeba));
						num = 1202;
						break;
					case 289:
						buildPiece16 = new BuildPiece(DispatcherAttribute.FindPolicy(0x1AF4F1D0 ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_945735f627df4d318bb89a4434056a65), DispatcherAttribute.FindPolicy(0x79B158C5 ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_3ae4a4e226f3425abf4b272f1181e9eb), DispatcherAttribute.FindPolicy(0x703A7E60 ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_ee678aac982749129c2277a56f69ad27));
						num2 = 254;
						if (<Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_0e3d801b3d68430eaab4e129e6c6213d == 0)
						{
							num2 = 85;
						}
						continue;
					case 311:
						item86.RequiredItems.Add(DispatcherAttribute.FindPolicy(0x107370D7 ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_8fdde41cd8d042c99f0b49148c654606), 500);
						num2 = 113;
						continue;
					case 415:
						InventorySystem.PrepareThread(DispatcherAttribute.FindPolicy(0x6D92FFE8 ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_3357146a1a98443694a5a2344b022aad));
						num2 = 373;
						if (<Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_2de628c6a6784c60a3824b6b8578aec7 == 0)
						{
							num2 = 692;
						}
						continue;
					case 756:
						creature63 = QuerySpecification(_Token, MountType.Flying, DispatcherAttribute.FindPolicy(0x79B13C09 ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_3ae4a4e226f3425abf4b272f1181e9eb), item87.Prefab, item13.Prefab, explosion3, DispatcherAttribute.FindPolicy(0x58F82B6C ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_3ade89368242461abb3afba08ed0eb91), DispatcherAttribute.FindPolicy(0x66FC782E ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_3cf415bbfa134625a4e4b4281bdf2293), DispatcherAttribute.FindPolicy(0x1AF4C774 ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_945735f627df4d318bb89a4434056a65), 1f, DispatcherAttribute.FindPolicy(0x3DF9825A ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_0bc51dfcd4ea492abf4467f58efc1259));
						num2 = 493;
						if (<Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_94da802681184abf9c6d7baa14f7d61e == 0)
						{
							num2 = 529;
						}
						continue;
					case 852:
						InventorySystem.PrepareThread(DispatcherAttribute.FindPolicy(0x29D8E505 ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_b197bad9f19647eeadb393352dc5456b));
						num = 292;
						break;
					case 599:
						buildPiece40.RequiredItems.Add(DispatcherAttribute.FindPolicy(0x7D120E2E ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_b48c14fc84664bb2a93e4301283fe316), 5, recover: true);
						num = 30;
						break;
					case 648:
						item65.RequiredItems.Add(DispatcherAttribute.FindPolicy(0x27762101 ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_11b8f870b8ca4b23856a9fb4b96d249c), 550);
						num2 = 251;
						continue;
					case 485:
						InventorySystem.PrepareThread(DispatcherAttribute.FindPolicy(0x204B5058 ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_9b03a95e6bb24c67b44167314739f95e));
						num2 = 500;
						continue;
					case 591:
						item35.Description.English(DispatcherAttribute.FindPolicy(0x57561FA0 ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_6658a2be25f8490588ea6ff67c0b13d2));
						num2 = 263;
						if (<Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_13771591b5124a74aee28639b0531a1f == 0)
						{
							num2 = 676;
						}
						continue;
					case 1035:
						item14.RequiredItems.Add(DispatcherAttribute.FindPolicy(0x27761C1F ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_11b8f870b8ca4b23856a9fb4b96d249c), 10);
						num2 = 995;
						if (<Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_b197bad9f19647eeadb393352dc5456b == 0)
						{
							num2 = 289;
						}
						continue;
					case 985:
						item98.RequiredItems.Add(DispatcherAttribute.FindPolicy(0xD9AF017 ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_bd69a92a348743ca91e70acf3ff2103d), 400);
						num2 = 976;
						continue;
					case 905:
						buildPiece.RequiredItems.Add(DispatcherAttribute.FindPolicy(0x35B684BA ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_6300c63db0404ebe8918b884e0d91520), 5, recover: true);
						num2 = 58;
						if (<Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_4dbf15c5f7d742b1a907fc7a4aee18df == 0)
						{
							num2 = 176;
						}
						continue;
					case 761:
						buildPiece30.Name.English(DispatcherAttribute.FindPolicy(0x277639B5 ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_11b8f870b8ca4b23856a9fb4b96d249c));
						num = 457;
						break;
					case 88:
						item116.Description.English(DispatcherAttribute.FindPolicy(0x55FA9741 ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_5cf61c1d67934a4dad4771ce8c63ee39));
						num2 = 822;
						continue;
					case 595:
						item77.RequiredItems.Add(DispatcherAttribute.FindPolicy(0x703A67E4 ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_ee678aac982749129c2277a56f69ad27), 250);
						num2 = 878;
						continue;
					case 890:
						item37.RequiredUpgradeItems.Add(DispatcherAttribute.FindPolicy(0x75F56392 ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_b0fb67a39d814a3da397fbd3bef5bf89), 100);
						num2 = 207;
						if (<Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_44006f309c684731a5089f116f102982 == 0)
						{
							num2 = 1;
						}
						continue;
					case 430:
						creature50.Drops[DispatcherAttribute.FindPolicy(0x277654FF ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_11b8f870b8ca4b23856a9fb4b96d249c)].Amount = new CreatureManager.Range(1f, 2f);
						num2 = 778;
						if (<Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_017c2aeacc81426185f47c157299999a == 0)
						{
							num2 = 1154;
						}
						continue;
					case 953:
						item18.Name.English(DispatcherAttribute.FindPolicy(0x79B10D7F ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_3ae4a4e226f3425abf4b272f1181e9eb));
						num2 = 663;
						if (<Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_0669df8032c94431a7764f08856908bf != 0)
						{
							num2 = 678;
						}
						continue;
					case 355:
						item8 = new Item(DispatcherAttribute.FindPolicy(0x10736F3D ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_8fdde41cd8d042c99f0b49148c654606), DispatcherAttribute.FindPolicy(0x3EBC9595 ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_c0f07c067a9e4b5ca85cc257f8899e97), DispatcherAttribute.FindPolicy(0x5C2DC109 ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_44006f309c684731a5089f116f102982));
						num2 = 30;
						if (<Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_7a86ad3f644341d5b87cd0324bfaf511 == 0)
						{
							num2 = 215;
						}
						continue;
					case 401:
						item78.RequiredItems.Add(DispatcherAttribute.FindPolicy(0x50BA73D9 ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9e0cff3.m_b72c275b483a4b5d909c1a1d3078c8b5), 250);
						num2 = 1072;
						continue;
					case 287:
						buildPiece21 = new BuildPiece(DispatcherAttribute.FindPolicy(0x78F6C42B ^ <Module>{f8272082-7aee-48aa-994a-a99924b1abc3}.m_2a844d7e90f8400cb59e720ef9

plugins/IronDad-CustomSoulcatcher/IronDad_CustomSoulcatcher.dll

Decompiled 6 months ago
using System;
using System.Collections;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Collections.Specialized;
using System.ComponentModel;
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.Dynamic;
using System.Globalization;
using System.IO;
using System.IO.Compression;
using System.Linq;
using System.Linq.Expressions;
using System.Reflection;
using System.Reflection.Emit;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Serialization;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Cryptography;
using System.Security.Permissions;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading;
using System.Threading.Tasks;
using System.Xml.Serialization;
using BepInEx;
using BepInEx.Bootstrap;
using BepInEx.Configuration;
using ExtendedItemDataFramework;
using HarmonyLib;
using ItemManager;
using JetBrains.Annotations;
using Jewelcrafting;
using LocalizationManager;
using Microsoft.CodeAnalysis;
using MonoMod.Utils;
using ServerSync;
using SkillManager;
using UnityEngine;
using UnityEngine.EventSystems;
using UnityEngine.Events;
using UnityEngine.UI;
using YamlDotNet.Core;
using YamlDotNet.Core.Events;
using YamlDotNet.Core.Tokens;
using YamlDotNet.Helpers;
using YamlDotNet.Serialization;
using YamlDotNet.Serialization.BufferedDeserialization;
using YamlDotNet.Serialization.BufferedDeserialization.TypeDiscriminators;
using YamlDotNet.Serialization.Callbacks;
using YamlDotNet.Serialization.Converters;
using YamlDotNet.Serialization.EventEmitters;
using YamlDotNet.Serialization.NamingConventions;
using YamlDotNet.Serialization.NodeDeserializers;
using YamlDotNet.Serialization.NodeTypeResolvers;
using YamlDotNet.Serialization.ObjectFactories;
using YamlDotNet.Serialization.ObjectGraphTraversalStrategies;
using YamlDotNet.Serialization.ObjectGraphVisitors;
using YamlDotNet.Serialization.Schemas;
using YamlDotNet.Serialization.TypeInspectors;
using YamlDotNet.Serialization.TypeResolvers;
using YamlDotNet.Serialization.Utilities;
using YamlDotNet.Serialization.ValueDeserializers;
using fastJSON;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: AssemblyTitle("Soulcatcher_KG_JC_Additions")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Soulcatcher_KG_JC_Additions")]
[assembly: AssemblyCopyright("Copyright ©  2022")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("2ED4D3E3-D23D-4E36-92E6-C2303E7843E8")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.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;
		}
	}
}
namespace SkillManager
{
	[PublicAPI]
	public class Skill
	{
		public static class LocalizationCache
		{
			private static readonly Dictionary<string, Localization> localizations = new Dictionary<string, Localization>();

			internal static void LocalizationPostfix(Localization __instance, string language)
			{
				string key = localizations.FirstOrDefault((KeyValuePair<string, Localization> l) => l.Value == __instance).Key;
				if (key != null)
				{
					localizations.Remove(key);
				}
				if (!localizations.ContainsKey(language))
				{
					localizations.Add(language, __instance);
				}
			}

			public static Localization ForLanguage(string? language = null)
			{
				//IL_0024: Unknown result type (might be due to invalid IL or missing references)
				//IL_002a: Expected O, but got Unknown
				if (localizations.TryGetValue(language ?? PlayerPrefs.GetString("language", "English"), out var value))
				{
					return value;
				}
				value = new Localization();
				if (language != null)
				{
					value.SetupLanguage(language);
				}
				return value;
			}
		}

		[PublicAPI]
		public class LocalizeKey
		{
			private static readonly List<LocalizeKey> keys = new List<LocalizeKey>();

			public readonly string Key;

			public readonly Dictionary<string, string> Localizations = new Dictionary<string, string>();

			public LocalizeKey(string key)
			{
				Key = key.Replace("$", "");
				keys.Add(this);
			}

			public void Alias(string alias)
			{
				Localizations.Clear();
				if (!alias.Contains("$"))
				{
					alias = "$" + alias;
				}
				Localizations["alias"] = alias;
				Localization.instance.AddWord(Key, Localization.instance.Localize(alias));
			}

			public LocalizeKey English(string key)
			{
				return addForLang("English", key);
			}

			public LocalizeKey Swedish(string key)
			{
				return addForLang("Swedish", key);
			}

			public LocalizeKey French(string key)
			{
				return addForLang("French", key);
			}

			public LocalizeKey Italian(string key)
			{
				return addForLang("Italian", key);
			}

			public LocalizeKey German(string key)
			{
				return addForLang("German", key);
			}

			public LocalizeKey Spanish(string key)
			{
				return addForLang("Spanish", key);
			}

			public LocalizeKey Russian(string key)
			{
				return addForLang("Russian", key);
			}

			public LocalizeKey Romanian(string key)
			{
				return addForLang("Romanian", key);
			}

			public LocalizeKey Bulgarian(string key)
			{
				return addForLang("Bulgarian", key);
			}

			public LocalizeKey Macedonian(string key)
			{
				return addForLang("Macedonian", key);
			}

			public LocalizeKey Finnish(string key)
			{
				return addForLang("Finnish", key);
			}

			public LocalizeKey Danish(string key)
			{
				return addForLang("Danish", key);
			}

			public LocalizeKey Norwegian(string key)
			{
				return addForLang("Norwegian", key);
			}

			public LocalizeKey Icelandic(string key)
			{
				return addForLang("Icelandic", key);
			}

			public LocalizeKey Turkish(string key)
			{
				return addForLang("Turkish", key);
			}

			public LocalizeKey Lithuanian(string key)
			{
				return addForLang("Lithuanian", key);
			}

			public LocalizeKey Czech(string key)
			{
				return addForLang("Czech", key);
			}

			public LocalizeKey Hungarian(string key)
			{
				return addForLang("Hungarian", key);
			}

			public LocalizeKey Slovak(string key)
			{
				return addForLang("Slovak", key);
			}

			public LocalizeKey Polish(string key)
			{
				return addForLang("Polish", key);
			}

			public LocalizeKey Dutch(string key)
			{
				return addForLang("Dutch", key);
			}

			public LocalizeKey Portuguese_European(string key)
			{
				return addForLang("Portuguese_European", key);
			}

			public LocalizeKey Portuguese_Brazilian(string key)
			{
				return addForLang("Portuguese_Brazilian", key);
			}

			public LocalizeKey Chinese(string key)
			{
				return addForLang("Chinese", key);
			}

			public LocalizeKey Japanese(string key)
			{
				return addForLang("Japanese", key);
			}

			public LocalizeKey Korean(string key)
			{
				return addForLang("Korean", key);
			}

			public LocalizeKey Hindi(string key)
			{
				return addForLang("Hindi", key);
			}

			public LocalizeKey Thai(string key)
			{
				return addForLang("Thai", key);
			}

			public LocalizeKey Abenaki(string key)
			{
				return addForLang("Abenaki", key);
			}

			public LocalizeKey Croatian(string key)
			{
				return addForLang("Croatian", key);
			}

			public LocalizeKey Georgian(string key)
			{
				return addForLang("Georgian", key);
			}

			public LocalizeKey Greek(string key)
			{
				return addForLang("Greek", key);
			}

			public LocalizeKey Serbian(string key)
			{
				return addForLang("Serbian", key);
			}

			public LocalizeKey Ukrainian(string key)
			{
				return addForLang("Ukrainian", key);
			}

			private LocalizeKey addForLang(string lang, string value)
			{
				Localizations[lang] = value;
				if (Localization.instance.GetSelectedLanguage() == lang)
				{
					Localization.instance.AddWord(Key, value);
				}
				else if (lang == "English" && !Localization.instance.m_translations.ContainsKey(Key))
				{
					Localization.instance.AddWord(Key, value);
				}
				return this;
			}

			[HarmonyPriority(300)]
			internal static void AddLocalizedKeys(Localization __instance, string language)
			{
				foreach (LocalizeKey key in keys)
				{
					string value2;
					if (key.Localizations.TryGetValue(language, out var value) || key.Localizations.TryGetValue("English", out value))
					{
						__instance.AddWord(key.Key, value);
					}
					else if (key.Localizations.TryGetValue("alias", out value2))
					{
						__instance.AddWord(key.Key, Localization.instance.Localize(value2));
					}
				}
			}
		}

		private class ConfigurationManagerAttributes
		{
			[UsedImplicitly]
			public string? Category;
		}

		[HarmonyPatch(typeof(Skills), "IsSkillValid")]
		private static class Patch_Skills_IsSkillValid
		{
			private static void Postfix(SkillType type, ref bool __result)
			{
				//IL_000a: Unknown result type (might be due to invalid IL or missing references)
				if (!__result && skills.ContainsKey(type))
				{
					__result = true;
				}
			}
		}

		private static readonly Dictionary<SkillType, Skill> skills;

		internal static readonly Dictionary<string, Skill> skillByName;

		private readonly string skillName;

		private readonly string internalSkillName;

		private readonly SkillDef skillDef;

		public readonly LocalizeKey Name;

		public readonly LocalizeKey Description;

		private float skillEffectFactor = 1f;

		private int skillLoss = 5;

		public bool Configurable;

		private static bool InitializedTerminal;

		private static Localization? _english;

		private static BaseUnityPlugin? _plugin;

		private static bool hasConfigSync;

		private static object? _configSync;

		public float SkillGainFactor
		{
			get
			{
				return skillDef.m_increseStep;
			}
			set
			{
				skillDef.m_increseStep = value;
				this.SkillGainFactorChanged?.Invoke(value);
			}
		}

		public float SkillEffectFactor
		{
			get
			{
				return skillEffectFactor;
			}
			set
			{
				skillEffectFactor = value;
				this.SkillEffectFactorChanged?.Invoke(value);
			}
		}

		public int SkillLoss
		{
			get
			{
				return skillLoss;
			}
			set
			{
				skillLoss = value;
				this.SkillLossChanged?.Invoke(value);
			}
		}

		private static Localization english => _english ?? (_english = LocalizationCache.ForLanguage("English"));

		private static BaseUnityPlugin plugin
		{
			get
			{
				//IL_0041: Unknown result type (might be due to invalid IL or missing references)
				//IL_0046: Unknown result type (might be due to invalid IL or missing references)
				//IL_004c: Expected O, but got Unknown
				object obj = _plugin;
				if (obj == null)
				{
					BaseUnityPlugin val = (BaseUnityPlugin)Chainloader.ManagerObject.GetComponent((Type)Assembly.GetExecutingAssembly().DefinedTypes.First((TypeInfo t) => t.IsClass && typeof(BaseUnityPlugin).IsAssignableFrom(t)));
					_plugin = val;
					obj = (object)val;
				}
				return (BaseUnityPlugin)obj;
			}
		}

		private static object? configSync
		{
			get
			{
				if (_configSync == null && hasConfigSync)
				{
					Type type = Assembly.GetExecutingAssembly().GetType("ServerSync.ConfigSync");
					if ((object)type != null)
					{
						_configSync = Activator.CreateInstance(type, plugin.Info.Metadata.GUID + " SkillManager");
						type.GetField("CurrentVersion").SetValue(_configSync, plugin.Info.Metadata.Version.ToString());
						type.GetProperty("IsLocked").SetValue(_configSync, true);
					}
					else
					{
						hasConfigSync = false;
					}
				}
				return _configSync;
			}
		}

		public event Action<float>? SkillGainFactorChanged;

		public event Action<float>? SkillEffectFactorChanged;

		public event Action<float>? SkillLossChanged;

		public Skill(string englishName, string icon)
			: this(englishName, loadSprite(icon, 64, 64))
		{
		}

		public Skill(string englishName, Sprite icon)
		{
			//IL_0019: Unknown result type (might be due to invalid IL or missing references)
			//IL_001e: Unknown result type (might be due to invalid IL or missing references)
			//IL_003a: Unknown result type (might be due to invalid IL or missing references)
			//IL_004e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0053: Unknown result type (might be due to invalid IL or missing references)
			//IL_0064: Unknown result type (might be due to invalid IL or missing references)
			//IL_006b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0076: Unknown result type (might be due to invalid IL or missing references)
			//IL_0077: Unknown result type (might be due to invalid IL or missing references)
			//IL_0078: Unknown result type (might be due to invalid IL or missing references)
			//IL_0082: Expected O, but got Unknown
			SkillType val = fromName(englishName);
			string text = new Regex("[^a-zA-Z]").Replace(englishName, "_");
			skills[val] = this;
			skillByName[englishName] = this;
			skillDef = new SkillDef
			{
				m_description = "$skilldesc_" + text,
				m_icon = icon,
				m_increseStep = 1f,
				m_skill = val
			};
			internalSkillName = text;
			skillName = englishName;
			Name = new LocalizeKey("skill_" + ((object)(SkillType)(ref val)).ToString()).English(englishName);
			Description = new LocalizeKey("skilldesc_" + text);
		}

		public static SkillType fromName(string englishName)
		{
			return (SkillType)Math.Abs(StringExtensionMethods.GetStableHashCode(englishName));
		}

		static Skill()
		{
			//IL_0025: Unknown result type (might be due to invalid IL or missing references)
			//IL_002a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0058: Unknown result type (might be due to invalid IL or missing references)
			//IL_0065: Expected O, but got Unknown
			//IL_0066: Unknown result type (might be due to invalid IL or missing references)
			//IL_0094: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a1: Expected O, but got Unknown
			//IL_00a2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cf: Unknown result type (might be due to invalid IL or missing references)
			//IL_00dd: Expected O, but got Unknown
			//IL_00de: Unknown result type (might be due to invalid IL or missing references)
			//IL_010b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0119: Expected O, but got Unknown
			//IL_011a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0148: Unknown result type (might be due to invalid IL or missing references)
			//IL_0155: Expected O, but got Unknown
			//IL_0156: Unknown result type (might be due to invalid IL or missing references)
			//IL_0183: Unknown result type (might be due to invalid IL or missing references)
			//IL_019e: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ab: Expected O, but got Unknown
			//IL_01ab: Expected O, but got Unknown
			//IL_01ac: Unknown result type (might be due to invalid IL or missing references)
			//IL_01da: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e7: Expected O, but got Unknown
			//IL_0214: Unknown result type (might be due to invalid IL or missing references)
			//IL_0231: Unknown result type (might be due to invalid IL or missing references)
			//IL_023c: Expected O, but got Unknown
			//IL_023c: Expected O, but got Unknown
			skills = new Dictionary<SkillType, Skill>();
			skillByName = new Dictionary<string, Skill>();
			InitializedTerminal = false;
			hasConfigSync = true;
			Harmony val = new Harmony("org.bepinex.helpers.skillmanager");
			val.Patch((MethodBase)AccessTools.DeclaredMethod(typeof(FejdStartup), "Awake", (Type[])null, (Type[])null), (HarmonyMethod)null, new HarmonyMethod(AccessTools.DeclaredMethod(typeof(Skill), "Patch_FejdStartup", (Type[])null, (Type[])null)), (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null);
			val.Patch((MethodBase)AccessTools.DeclaredMethod(typeof(Skills), "GetSkillDef", (Type[])null, (Type[])null), (HarmonyMethod)null, new HarmonyMethod(AccessTools.DeclaredMethod(typeof(Skill), "Patch_Skills_GetSkillDef", (Type[])null, (Type[])null)), (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null);
			val.Patch((MethodBase)AccessTools.DeclaredMethod(typeof(Skills), "CheatRaiseSkill", (Type[])null, (Type[])null), new HarmonyMethod(AccessTools.DeclaredMethod(typeof(Skill), "Patch_Skills_CheatRaiseskill", (Type[])null, (Type[])null)), (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null);
			val.Patch((MethodBase)AccessTools.DeclaredMethod(typeof(Skills), "CheatResetSkill", (Type[])null, (Type[])null), new HarmonyMethod(AccessTools.DeclaredMethod(typeof(Skill), "Patch_Skills_CheatResetSkill", (Type[])null, (Type[])null)), (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null);
			val.Patch((MethodBase)AccessTools.DeclaredMethod(typeof(Localization), "LoadCSV", (Type[])null, (Type[])null), (HarmonyMethod)null, new HarmonyMethod(AccessTools.DeclaredMethod(typeof(LocalizeKey), "AddLocalizedKeys", (Type[])null, (Type[])null)), (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null);
			val.Patch((MethodBase)AccessTools.DeclaredMethod(typeof(Terminal), "InitTerminal", (Type[])null, (Type[])null), new HarmonyMethod(AccessTools.DeclaredMethod(typeof(Skill), "Patch_Terminal_InitTerminal_Prefix", (Type[])null, (Type[])null)), new HarmonyMethod(AccessTools.DeclaredMethod(typeof(Skill), "Patch_Terminal_InitTerminal", (Type[])null, (Type[])null)), (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null);
			val.Patch((MethodBase)AccessTools.DeclaredMethod(typeof(Localization), "SetupLanguage", (Type[])null, (Type[])null), (HarmonyMethod)null, new HarmonyMethod(AccessTools.DeclaredMethod(typeof(LocalizationCache), "LocalizationPostfix", (Type[])null, (Type[])null)), (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null);
			val.Patch((MethodBase)AccessTools.DeclaredMethod(typeof(Skills), "OnDeath", (Type[])null, (Type[])null), new HarmonyMethod(AccessTools.DeclaredMethod(typeof(Skill), "Patch_Skills_OnDeath_Prefix", (Type[])null, (Type[])null)), (HarmonyMethod)null, (HarmonyMethod)null, new HarmonyMethod(AccessTools.DeclaredMethod(typeof(Skill), "Patch_Skills_OnDeath_Finalizer", (Type[])null, (Type[])null)), (HarmonyMethod)null);
		}

		private static void Patch_FejdStartup()
		{
			//IL_00bc: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c6: Expected O, but got Unknown
			//IL_0134: Unknown result type (might be due to invalid IL or missing references)
			//IL_013e: Expected O, but got Unknown
			//IL_01a5: Unknown result type (might be due to invalid IL or missing references)
			//IL_01af: Expected O, but got Unknown
			foreach (Skill skill in skills.Values)
			{
				if (skill.Configurable)
				{
					string key = skill.Name.Key;
					string group = new Regex("['[\"\\]]").Replace(english.Localize(key), "").Trim();
					string category = Localization.instance.Localize(key).Trim();
					ConfigEntry<float> skillGain = config(group, "Skill gain factor", skill.SkillGainFactor, new ConfigDescription("The rate at which you gain experience for the skill.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0.01f, 5f), new object[1]
					{
						new ConfigurationManagerAttributes
						{
							Category = category
						}
					}));
					skill.SkillGainFactor = skillGain.Value;
					skillGain.SettingChanged += delegate
					{
						skill.SkillGainFactor = skillGain.Value;
					};
					ConfigEntry<float> skillEffect = config(group, "Skill effect factor", skill.SkillEffectFactor, new ConfigDescription("The power of the skill, based on the default power.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0.01f, 5f), new object[1]
					{
						new ConfigurationManagerAttributes
						{
							Category = category
						}
					}));
					skill.SkillEffectFactor = skillEffect.Value;
					skillEffect.SettingChanged += delegate
					{
						skill.SkillEffectFactor = skillEffect.Value;
					};
					ConfigEntry<int> skillLoss = config(group, "Skill loss", skill.skillLoss, new ConfigDescription("How much experience to lose on death.", (AcceptableValueBase)(object)new AcceptableValueRange<int>(0, 100), new object[1]
					{
						new ConfigurationManagerAttributes
						{
							Category = category
						}
					}));
					skill.skillLoss = skillLoss.Value;
					skillLoss.SettingChanged += delegate
					{
						skill.skillLoss = skillLoss.Value;
					};
				}
			}
		}

		private static void Patch_Skills_GetSkillDef(ref SkillDef? __result, List<SkillDef> ___m_skills, SkillType type)
		{
			//IL_0004: Unknown result type (might be due to invalid IL or missing references)
			if (__result == null)
			{
				SkillDef val = GetSkillDef(type);
				if (val != null)
				{
					___m_skills.Add(val);
					__result = val;
				}
			}
		}

		private static bool Patch_Skills_CheatRaiseskill(Skills __instance, string name, float value, Player ___m_player)
		{
			//IL_0017: Unknown result type (might be due to invalid IL or missing references)
			//IL_001c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0022: Unknown result type (might be due to invalid IL or missing references)
			//IL_003c: Unknown result type (might be due to invalid IL or missing references)
			foreach (SkillType key in skills.Keys)
			{
				SkillType current = key;
				Skill skill = skills[current];
				if (string.Equals(skill.internalSkillName, name, StringComparison.CurrentCultureIgnoreCase))
				{
					Skill skill2 = __instance.GetSkill(current);
					skill2.m_level += value;
					skill2.m_level = Mathf.Clamp(skill2.m_level, 0f, 100f);
					((Character)___m_player).Message((MessageType)1, "Skill increased " + Localization.instance.Localize("$skill_" + ((object)(SkillType)(ref current)).ToString()) + ": " + (int)skill2.m_level, 0, skill2.m_info.m_icon);
					Console.instance.Print("Skill " + skill.internalSkillName + " = " + skill2.m_level);
					return false;
				}
			}
			return true;
		}

		private static bool Patch_Skills_CheatResetSkill(Skills __instance, string name)
		{
			//IL_0014: Unknown result type (might be due to invalid IL or missing references)
			//IL_0019: Unknown result type (might be due to invalid IL or missing references)
			//IL_001f: 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)
			foreach (SkillType key in skills.Keys)
			{
				Skill skill = skills[key];
				if (string.Equals(skill.internalSkillName, name, StringComparison.CurrentCultureIgnoreCase))
				{
					__instance.ResetSkill(key);
					Console.instance.Print("Skill " + skill.internalSkillName + " reset");
					return false;
				}
			}
			return true;
		}

		private static void Patch_Skills_OnDeath_Prefix(Skills __instance, ref Dictionary<SkillType, Skill>? __state)
		{
			//IL_002b: Unknown result type (might be due to invalid IL or missing references)
			//IL_003d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0091: Unknown result type (might be due to invalid IL or missing references)
			if (__state == null)
			{
				__state = new Dictionary<SkillType, Skill>();
			}
			foreach (KeyValuePair<SkillType, Skill> skill in skills)
			{
				if (__instance.m_skillData.TryGetValue(skill.Key, out var value))
				{
					__state[skill.Key] = value;
					if (skill.Value.skillLoss > 0)
					{
						Skill obj = value;
						obj.m_level -= value.m_level * (float)skill.Value.SkillLoss / 100f;
						value.m_accumulator = 0f;
					}
					__instance.m_skillData.Remove(skill.Key);
				}
			}
		}

		private static void Patch_Skills_OnDeath_Finalizer(Skills __instance, ref Dictionary<SkillType, Skill>? __state)
		{
			//IL_001e: Unknown result type (might be due to invalid IL or missing references)
			if (__state == null)
			{
				return;
			}
			foreach (KeyValuePair<SkillType, Skill> item in __state)
			{
				__instance.m_skillData[item.Key] = item.Value;
			}
			__state = null;
		}

		private static void Patch_Terminal_InitTerminal_Prefix()
		{
			InitializedTerminal = Terminal.m_terminalInitialized;
		}

		private static void Patch_Terminal_InitTerminal()
		{
			if (!InitializedTerminal)
			{
				AddSkill(Terminal.commands["raiseskill"]);
				AddSkill(Terminal.commands["resetskill"]);
			}
			static void AddSkill(ConsoleCommand command)
			{
				//IL_001a: Unknown result type (might be due to invalid IL or missing references)
				//IL_0024: Expected O, but got Unknown
				ConsoleOptionsFetcher fetcher = command.m_tabOptionsFetcher;
				command.m_tabOptionsFetcher = (ConsoleOptionsFetcher)delegate
				{
					List<string> list = fetcher.Invoke();
					list.AddRange(skills.Values.Select((Skill skill) => skill.internalSkillName));
					return list;
				};
			}
		}

		private static SkillDef? GetSkillDef(SkillType skillType)
		{
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			//IL_0014: Unknown result type (might be due to invalid IL or missing references)
			if (!skills.ContainsKey(skillType))
			{
				return null;
			}
			return skills[skillType].skillDef;
		}

		private static byte[] ReadEmbeddedFileBytes(string name)
		{
			using MemoryStream memoryStream = new MemoryStream();
			Assembly.GetExecutingAssembly().GetManifestResourceStream(Assembly.GetExecutingAssembly().GetName().Name + "." + name).CopyTo(memoryStream);
			return memoryStream.ToArray();
		}

		private static Texture2D loadTexture(string name)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_001d: Expected O, but got Unknown
			//IL_001f: Expected O, but got Unknown
			Texture2D val = new Texture2D(0, 0);
			ImageConversion.LoadImage(val, ReadEmbeddedFileBytes("icons." + name));
			return val;
		}

		private static Sprite loadSprite(string name, int width, int height)
		{
			//IL_0014: Unknown result type (might be due to invalid IL or missing references)
			//IL_0019: Unknown result type (might be due to invalid IL or missing references)
			return Sprite.Create(loadTexture(name), new Rect(0f, 0f, (float)width, (float)height), Vector2.zero);
		}

		private static ConfigEntry<T> config<T>(string group, string name, T value, ConfigDescription description)
		{
			ConfigEntry<T> val = plugin.Config.Bind<T>(group, name, value, description);
			configSync?.GetType().GetMethod("AddConfigEntry").MakeGenericMethod(typeof(T))
				.Invoke(configSync, new object[1] { val });
			return val;
		}

		private static ConfigEntry<T> config<T>(string group, string name, T value, string description)
		{
			//IL_000a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0014: Expected O, but got Unknown
			return config(group, name, value, new ConfigDescription(description, (AcceptableValueBase)null, Array.Empty<object>()));
		}
	}
	[PublicAPI]
	public static class SkillExtensions
	{
		public static float GetSkillFactor(this Character character, string name)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			return character.GetSkillFactor(Skill.fromName(name)) * Skill.skillByName[name].SkillEffectFactor;
		}

		public static float GetSkillFactor(this Skills skills, string name)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			return skills.GetSkillFactor(Skill.fromName(name)) * Skill.skillByName[name].SkillEffectFactor;
		}

		public static void RaiseSkill(this Character character, string name, float value = 1f)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			character.RaiseSkill(Skill.fromName(name), value);
		}

		public static void RaiseSkill(this Skills skill, string name, float value = 1f)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			skill.RaiseSkill(Skill.fromName(name), value);
		}

		public static void LowerSkill(this Character character, string name, float factor = 1f)
		{
			character.GetSkills().LowerSkill(name, factor);
		}

		public static void LowerSkill(this Skills skills, string name, float factor)
		{
			//IL_000f: Unknown result type (might be due to invalid IL or missing references)
			if (factor > 0f && skills.m_skillData.TryGetValue(Skill.fromName(name), out var value))
			{
				Skill obj = value;
				obj.m_level -= value.m_level * factor;
				value.m_accumulator = 0f;
			}
		}
	}
}
namespace ServerSync
{
	[PublicAPI]
	public abstract class OwnConfigEntryBase
	{
		public object? LocalBaseValue;

		public bool SynchronizedConfig = true;

		public abstract ConfigEntryBase BaseConfig { get; }
	}
	[PublicAPI]
	public class SyncedConfigEntry<T> : OwnConfigEntryBase
	{
		public readonly ConfigEntry<T> SourceConfig;

		public override ConfigEntryBase BaseConfig => (ConfigEntryBase)(object)SourceConfig;

		public T Value
		{
			get
			{
				return SourceConfig.Value;
			}
			set
			{
				SourceConfig.Value = value;
			}
		}

		public SyncedConfigEntry(ConfigEntry<T> sourceConfig)
		{
			SourceConfig = sourceConfig;
		}

		public void AssignLocalValue(T value)
		{
			if (LocalBaseValue == null)
			{
				Value = value;
			}
			else
			{
				LocalBaseValue = value;
			}
		}
	}
	public abstract class CustomSyncedValueBase
	{
		public object? LocalBaseValue;

		public readonly string Identifier;

		public readonly Type Type;

		private object? boxedValue;

		protected bool localIsOwner;

		public readonly int Priority;

		public object? BoxedValue
		{
			get
			{
				return boxedValue;
			}
			set
			{
				boxedValue = value;
				this.ValueChanged?.Invoke();
			}
		}

		public event Action? ValueChanged;

		protected CustomSyncedValueBase(ConfigSync configSync, string identifier, Type type, int priority)
		{
			Priority = priority;
			Identifier = identifier;
			Type = type;
			configSync.AddCustomValue(this);
			localIsOwner = configSync.IsSourceOfTruth;
			configSync.SourceOfTruthChanged += delegate(bool truth)
			{
				localIsOwner = truth;
			};
		}
	}
	[PublicAPI]
	public sealed class CustomSyncedValue<T> : CustomSyncedValueBase
	{
		public T Value
		{
			get
			{
				return (T)base.BoxedValue;
			}
			set
			{
				base.BoxedValue = value;
			}
		}

		public CustomSyncedValue(ConfigSync configSync, string identifier, T value = default(T), int priority = 0)
			: base(configSync, identifier, typeof(T), priority)
		{
			Value = value;
		}

		public void AssignLocalValue(T value)
		{
			if (localIsOwner)
			{
				Value = value;
			}
			else
			{
				LocalBaseValue = value;
			}
		}
	}
	internal class ConfigurationManagerAttributes
	{
		[UsedImplicitly]
		public bool? ReadOnly = false;
	}
	[PublicAPI]
	public class ConfigSync
	{
		[HarmonyPatch(typeof(ZRpc), "HandlePackage")]
		private static class SnatchCurrentlyHandlingRPC
		{
			public static ZRpc? currentRpc;

			[HarmonyPrefix]
			private static void Prefix(ZRpc __instance)
			{
				currentRpc = __instance;
			}
		}

		[HarmonyPatch(typeof(ZNet), "Awake")]
		internal static class RegisterRPCPatch
		{
			[HarmonyPostfix]
			private static void Postfix(ZNet __instance)
			{
				isServer = __instance.IsServer();
				foreach (ConfigSync configSync2 in configSyncs)
				{
					ZRoutedRpc.instance.Register<ZPackage>(configSync2.Name + " ConfigSync", (Action<long, ZPackage>)configSync2.RPC_FromOtherClientConfigSync);
					if (isServer)
					{
						configSync2.InitialSyncDone = true;
						Debug.Log((object)("Registered '" + configSync2.Name + " ConfigSync' RPC - waiting for incoming connections"));
					}
				}
				if (isServer)
				{
					((MonoBehaviour)__instance).StartCoroutine(WatchAdminListChanges());
				}
				static void SendAdmin(List<ZNetPeer> peers, bool isAdmin)
				{
					ZPackage package = ConfigsToPackage(null, null, new PackageEntry[1]
					{
						new PackageEntry
						{
							section = "Internal",
							key = "lockexempt",
							type = typeof(bool),
							value = isAdmin
						}
					});
					ConfigSync configSync = configSyncs.First();
					if (configSync != null)
					{
						((MonoBehaviour)ZNet.instance).StartCoroutine(configSync.sendZPackage(peers, package));
					}
				}
				static IEnumerator WatchAdminListChanges()
				{
					MethodInfo listContainsId = AccessTools.DeclaredMethod(typeof(ZNet), "ListContainsId", (Type[])null, (Type[])null);
					SyncedList adminList = (SyncedList)AccessTools.DeclaredField(typeof(ZNet), "m_adminList").GetValue(ZNet.instance);
					List<string> CurrentList = new List<string>(adminList.GetList());
					while (true)
					{
						yield return (object)new WaitForSeconds(30f);
						if (!adminList.GetList().SequenceEqual(CurrentList))
						{
							CurrentList = new List<string>(adminList.GetList());
							List<ZNetPeer> list = ZNet.instance.GetPeers().Where(delegate(ZNetPeer p)
							{
								string hostName = p.m_rpc.GetSocket().GetHostName();
								return ((object)listContainsId != null) ? ((bool)listContainsId.Invoke(ZNet.instance, new object[2] { adminList, hostName })) : adminList.Contains(hostName);
							}).ToList();
							SendAdmin(ZNet.instance.GetPeers().Except(list).ToList(), isAdmin: false);
							SendAdmin(list, isAdmin: true);
						}
					}
				}
			}
		}

		[HarmonyPatch(typeof(ZNet), "OnNewConnection")]
		private static class RegisterClientRPCPatch
		{
			[HarmonyPostfix]
			private static void Postfix(ZNet __instance, ZNetPeer peer)
			{
				if (__instance.IsServer())
				{
					return;
				}
				foreach (ConfigSync configSync in configSyncs)
				{
					peer.m_rpc.Register<ZPackage>(configSync.Name + " ConfigSync", (Action<ZRpc, ZPackage>)configSync.RPC_FromServerConfigSync);
				}
			}
		}

		private class ParsedConfigs
		{
			public readonly Dictionary<OwnConfigEntryBase, object?> configValues = new Dictionary<OwnConfigEntryBase, object>();

			public readonly Dictionary<CustomSyncedValueBase, object?> customValues = new Dictionary<CustomSyncedValueBase, object>();
		}

		[HarmonyPatch(typeof(ZNet), "Shutdown")]
		private class ResetConfigsOnShutdown
		{
			[HarmonyPostfix]
			private static void Postfix()
			{
				ProcessingServerUpdate = true;
				foreach (ConfigSync configSync in configSyncs)
				{
					configSync.resetConfigsFromServer();
					configSync.IsSourceOfTruth = true;
					configSync.InitialSyncDone = false;
				}
				ProcessingServerUpdate = false;
			}
		}

		[HarmonyPatch(typeof(ZNet), "RPC_PeerInfo")]
		private class SendConfigsAfterLogin
		{
			private class BufferingSocket : ISocket
			{
				public volatile bool finished;

				public volatile int versionMatchQueued = -1;

				public readonly List<ZPackage> Package = new List<ZPackage>();

				public readonly ISocket Original;

				public BufferingSocket(ISocket original)
				{
					Original = original;
				}

				public bool IsConnected()
				{
					return Original.IsConnected();
				}

				public ZPackage Recv()
				{
					return Original.Recv();
				}

				public int GetSendQueueSize()
				{
					return Original.GetSendQueueSize();
				}

				public int GetCurrentSendRate()
				{
					return Original.GetCurrentSendRate();
				}

				public bool IsHost()
				{
					return Original.IsHost();
				}

				public void Dispose()
				{
					Original.Dispose();
				}

				public bool GotNewData()
				{
					return Original.GotNewData();
				}

				public void Close()
				{
					Original.Close();
				}

				public string GetEndPointString()
				{
					return Original.GetEndPointString();
				}

				public void GetAndResetStats(out int totalSent, out int totalRecv)
				{
					Original.GetAndResetStats(ref totalSent, ref totalRecv);
				}

				public void GetConnectionQuality(out float localQuality, out float remoteQuality, out int ping, out float outByteSec, out float inByteSec)
				{
					Original.GetConnectionQuality(ref localQuality, ref remoteQuality, ref ping, ref outByteSec, ref inByteSec);
				}

				public ISocket Accept()
				{
					return Original.Accept();
				}

				public int GetHostPort()
				{
					return Original.GetHostPort();
				}

				public bool Flush()
				{
					return Original.Flush();
				}

				public string GetHostName()
				{
					return Original.GetHostName();
				}

				public void VersionMatch()
				{
					if (finished)
					{
						Original.VersionMatch();
					}
					else
					{
						versionMatchQueued = Package.Count;
					}
				}

				public void Send(ZPackage pkg)
				{
					//IL_004c: Unknown result type (might be due to invalid IL or missing references)
					//IL_0052: Expected O, but got Unknown
					int pos = pkg.GetPos();
					pkg.SetPos(0);
					int num = pkg.ReadInt();
					if ((num == StringExtensionMethods.GetStableHashCode("PeerInfo") || num == StringExtensionMethods.GetStableHashCode("RoutedRPC") || num == StringExtensionMethods.GetStableHashCode("ZDOData")) && !finished)
					{
						ZPackage val = new ZPackage(pkg.GetArray());
						val.SetPos(pos);
						Package.Add(val);
					}
					else
					{
						pkg.SetPos(pos);
						Original.Send(pkg);
					}
				}
			}

			[HarmonyPriority(800)]
			[HarmonyPrefix]
			private static void Prefix(ref Dictionary<Assembly, BufferingSocket>? __state, ZNet __instance, ZRpc rpc)
			{
				//IL_0073: Unknown result type (might be due to invalid IL or missing references)
				if (__instance.IsServer())
				{
					BufferingSocket value = new BufferingSocket(rpc.GetSocket());
					AccessTools.DeclaredField(typeof(ZRpc), "m_socket").SetValue(rpc, value);
					object? obj = AccessTools.DeclaredMethod(typeof(ZNet), "GetPeer", new Type[1] { typeof(ZRpc) }, (Type[])null).Invoke(__instance, new object[1] { rpc });
					ZNetPeer val = (ZNetPeer)((obj is ZNetPeer) ? obj : null);
					if (val != null && (int)ZNet.m_onlineBackend != 0)
					{
						AccessTools.DeclaredField(typeof(ZNetPeer), "m_socket").SetValue(val, value);
					}
					if (__state == null)
					{
						__state = new Dictionary<Assembly, BufferingSocket>();
					}
					__state[Assembly.GetExecutingAssembly()] = value;
				}
			}

			[HarmonyPostfix]
			private static void Postfix(Dictionary<Assembly, BufferingSocket> __state, ZNet __instance, ZRpc rpc)
			{
				ZNetPeer peer;
				if (__instance.IsServer())
				{
					object obj = AccessTools.DeclaredMethod(typeof(ZNet), "GetPeer", new Type[1] { typeof(ZRpc) }, (Type[])null).Invoke(__instance, new object[1] { rpc });
					peer = (ZNetPeer)((obj is ZNetPeer) ? obj : null);
					if (peer == null)
					{
						SendBufferedData();
					}
					else
					{
						((MonoBehaviour)__instance).StartCoroutine(sendAsync());
					}
				}
				void SendBufferedData()
				{
					if (rpc.GetSocket() is BufferingSocket bufferingSocket)
					{
						AccessTools.DeclaredField(typeof(ZRpc), "m_socket").SetValue(rpc, bufferingSocket.Original);
						object? obj2 = AccessTools.DeclaredMethod(typeof(ZNet), "GetPeer", new Type[1] { typeof(ZRpc) }, (Type[])null).Invoke(__instance, new object[1] { rpc });
						ZNetPeer val2 = (ZNetPeer)((obj2 is ZNetPeer) ? obj2 : null);
						if (val2 != null)
						{
							AccessTools.DeclaredField(typeof(ZNetPeer), "m_socket").SetValue(val2, bufferingSocket.Original);
						}
					}
					BufferingSocket bufferingSocket2 = __state[Assembly.GetExecutingAssembly()];
					bufferingSocket2.finished = true;
					for (int i = 0; i < bufferingSocket2.Package.Count; i++)
					{
						if (i == bufferingSocket2.versionMatchQueued)
						{
							bufferingSocket2.Original.VersionMatch();
						}
						bufferingSocket2.Original.Send(bufferingSocket2.Package[i]);
					}
					if (bufferingSocket2.Package.Count == bufferingSocket2.versionMatchQueued)
					{
						bufferingSocket2.Original.VersionMatch();
					}
				}
				IEnumerator sendAsync()
				{
					foreach (ConfigSync configSync in configSyncs)
					{
						List<PackageEntry> list = new List<PackageEntry>();
						if (configSync.CurrentVersion != null)
						{
							list.Add(new PackageEntry
							{
								section = "Internal",
								key = "serverversion",
								type = typeof(string),
								value = configSync.CurrentVersion
							});
						}
						MethodInfo methodInfo = AccessTools.DeclaredMethod(typeof(ZNet), "ListContainsId", (Type[])null, (Type[])null);
						SyncedList val = (SyncedList)AccessTools.DeclaredField(typeof(ZNet), "m_adminList").GetValue(ZNet.instance);
						list.Add(new PackageEntry
						{
							section = "Internal",
							key = "lockexempt",
							type = typeof(bool),
							value = (((object)methodInfo == null) ? ((object)val.Contains(rpc.GetSocket().GetHostName())) : methodInfo.Invoke(ZNet.instance, new object[2]
							{
								val,
								rpc.GetSocket().GetHostName()
							}))
						});
						ZPackage package = ConfigsToPackage(configSync.allConfigs.Select((OwnConfigEntryBase c) => c.BaseConfig), configSync.allCustomValues, list, partial: false);
						yield return ((MonoBehaviour)__instance).StartCoroutine(configSync.sendZPackage(new List<ZNetPeer> { peer }, package));
					}
					SendBufferedData();
				}
			}
		}

		private class PackageEntry
		{
			public string section;

			public string key;

			public Type type;

			public object? value;
		}

		[HarmonyPatch(typeof(ConfigEntryBase), "GetSerializedValue")]
		private static class PreventSavingServerInfo
		{
			[HarmonyPrefix]
			private static bool Prefix(ConfigEntryBase __instance, ref string __result)
			{
				OwnConfigEntryBase ownConfigEntryBase = configData(__instance);
				if (ownConfigEntryBase == null || isWritableConfig(ownConfigEntryBase))
				{
					return true;
				}
				__result = TomlTypeConverter.ConvertToString(ownConfigEntryBase.LocalBaseValue, __instance.SettingType);
				return false;
			}
		}

		[HarmonyPatch(typeof(ConfigEntryBase), "SetSerializedValue")]
		private static class PreventConfigRereadChangingValues
		{
			[HarmonyPrefix]
			private static bool Prefix(ConfigEntryBase __instance, string value)
			{
				OwnConfigEntryBase ownConfigEntryBase = configData(__instance);
				if (ownConfigEntryBase == null || ownConfigEntryBase.LocalBaseValue == null)
				{
					return true;
				}
				try
				{
					ownConfigEntryBase.LocalBaseValue = TomlTypeConverter.ConvertToValue(value, __instance.SettingType);
				}
				catch (Exception ex)
				{
					Debug.LogWarning((object)$"Config value of setting \"{__instance.Definition}\" could not be parsed and will be ignored. Reason: {ex.Message}; Value: {value}");
				}
				return false;
			}
		}

		private class InvalidDeserializationTypeException : Exception
		{
			public string expected;

			public string received;

			public string field = "";
		}

		public static bool ProcessingServerUpdate;

		public readonly string Name;

		public string? DisplayName;

		public string? CurrentVersion;

		public string? MinimumRequiredVersion;

		public bool ModRequired;

		private bool? forceConfigLocking;

		private bool isSourceOfTruth = true;

		private static readonly HashSet<ConfigSync> configSyncs;

		private readonly HashSet<OwnConfigEntryBase> allConfigs = new HashSet<OwnConfigEntryBase>();

		private HashSet<CustomSyncedValueBase> allCustomValues = new HashSet<CustomSyncedValueBase>();

		private static bool isServer;

		private static bool lockExempt;

		private OwnConfigEntryBase? lockedConfig;

		private const byte PARTIAL_CONFIGS = 1;

		private const byte FRAGMENTED_CONFIG = 2;

		private const byte COMPRESSED_CONFIG = 4;

		private readonly Dictionary<string, SortedDictionary<int, byte[]>> configValueCache = new Dictionary<string, SortedDictionary<int, byte[]>>();

		private readonly List<KeyValuePair<long, string>> cacheExpirations = new List<KeyValuePair<long, string>>();

		private static long packageCounter;

		public bool IsLocked
		{
			get
			{
				bool? flag = forceConfigLocking;
				bool num;
				if (!flag.HasValue)
				{
					if (lockedConfig == null)
					{
						goto IL_0051;
					}
					num = ((IConvertible)lockedConfig.BaseConfig.BoxedValue).ToInt32(CultureInfo.InvariantCulture) != 0;
				}
				else
				{
					num = flag.GetValueOrDefault();
				}
				if (num)
				{
					return !lockExempt;
				}
				goto IL_0051;
				IL_0051:
				return false;
			}
			set
			{
				forceConfigLocking = value;
			}
		}

		public bool IsAdmin
		{
			get
			{
				if (!lockExempt)
				{
					return isSourceOfTruth;
				}
				return true;
			}
		}

		public bool IsSourceOfTruth
		{
			get
			{
				return isSourceOfTruth;
			}
			private set
			{
				if (value != isSourceOfTruth)
				{
					isSourceOfTruth = value;
					this.SourceOfTruthChanged?.Invoke(value);
				}
			}
		}

		public bool InitialSyncDone { get; private set; }

		public event Action<bool>? SourceOfTruthChanged;

		private event Action? lockedConfigChanged;

		static ConfigSync()
		{
			ProcessingServerUpdate = false;
			configSyncs = new HashSet<ConfigSync>();
			lockExempt = false;
			packageCounter = 0L;
			RuntimeHelpers.RunClassConstructor(typeof(VersionCheck).TypeHandle);
		}

		public ConfigSync(string name)
		{
			Name = name;
			configSyncs.Add(this);
			new VersionCheck(this);
		}

		public SyncedConfigEntry<T> AddConfigEntry<T>(ConfigEntry<T> configEntry)
		{
			OwnConfigEntryBase ownConfigEntryBase = configData((ConfigEntryBase)(object)configEntry);
			SyncedConfigEntry<T> syncedEntry = ownConfigEntryBase as SyncedConfigEntry<T>;
			if (syncedEntry == null)
			{
				syncedEntry = new SyncedConfigEntry<T>(configEntry);
				AccessTools.DeclaredField(typeof(ConfigDescription), "<Tags>k__BackingField").SetValue(((ConfigEntryBase)configEntry).Description, new object[1]
				{
					new ConfigurationManagerAttributes()
				}.Concat(((ConfigEntryBase)configEntry).Description.Tags ?? Array.Empty<object>()).Concat(new SyncedConfigEntry<T>[1] { syncedEntry }).ToArray());
				configEntry.SettingChanged += delegate
				{
					if (!ProcessingServerUpdate && syncedEntry.SynchronizedConfig)
					{
						Broadcast(ZRoutedRpc.Everybody, (ConfigEntryBase)configEntry);
					}
				};
				allConfigs.Add(syncedEntry);
			}
			return syncedEntry;
		}

		public SyncedConfigEntry<T> AddLockingConfigEntry<T>(ConfigEntry<T> lockingConfig) where T : IConvertible
		{
			if (lockedConfig != null)
			{
				throw new Exception("Cannot initialize locking ConfigEntry twice");
			}
			lockedConfig = AddConfigEntry<T>(lockingConfig);
			lockingConfig.SettingChanged += delegate
			{
				this.lockedConfigChanged?.Invoke();
			};
			return (SyncedConfigEntry<T>)lockedConfig;
		}

		internal void AddCustomValue(CustomSyncedValueBase customValue)
		{
			if (allCustomValues.Select((CustomSyncedValueBase v) => v.Identifier).Concat(new string[1] { "serverversion" }).Contains(customValue.Identifier))
			{
				throw new Exception("Cannot have multiple settings with the same name or with a reserved name (serverversion)");
			}
			allCustomValues.Add(customValue);
			allCustomValues = new HashSet<CustomSyncedValueBase>(allCustomValues.OrderByDescending((CustomSyncedValueBase v) => v.Priority));
			customValue.ValueChanged += delegate
			{
				if (!ProcessingServerUpdate)
				{
					Broadcast(ZRoutedRpc.Everybody, customValue);
				}
			};
		}

		private void RPC_FromServerConfigSync(ZRpc rpc, ZPackage package)
		{
			lockedConfigChanged += serverLockedSettingChanged;
			IsSourceOfTruth = false;
			if (HandleConfigSyncRPC(0L, package, clientUpdate: false))
			{
				InitialSyncDone = true;
			}
		}

		private void RPC_FromOtherClientConfigSync(long sender, ZPackage package)
		{
			HandleConfigSyncRPC(sender, package, clientUpdate: true);
		}

		private bool HandleConfigSyncRPC(long sender, ZPackage package, bool clientUpdate)
		{
			//IL_0209: Unknown result type (might be due to invalid IL or missing references)
			//IL_0210: Expected O, but got Unknown
			//IL_01b8: Unknown result type (might be due to invalid IL or missing references)
			//IL_01bf: Expected O, but got Unknown
			//IL_006c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0073: Expected O, but got Unknown
			try
			{
				if (isServer && IsLocked)
				{
					ZRpc? currentRpc = SnatchCurrentlyHandlingRPC.currentRpc;
					object obj;
					if (currentRpc == null)
					{
						obj = null;
					}
					else
					{
						ISocket socket = currentRpc.GetSocket();
						obj = ((socket != null) ? socket.GetHostName() : null);
					}
					string text = (string)obj;
					if (text != null)
					{
						MethodInfo methodInfo = AccessTools.DeclaredMethod(typeof(ZNet), "ListContainsId", (Type[])null, (Type[])null);
						SyncedList val = (SyncedList)AccessTools.DeclaredField(typeof(ZNet), "m_adminList").GetValue(ZNet.instance);
						if (!(((object)methodInfo == null) ? val.Contains(text) : ((bool)methodInfo.Invoke(ZNet.instance, new object[2] { val, text }))))
						{
							return false;
						}
					}
				}
				cacheExpirations.RemoveAll(delegate(KeyValuePair<long, string> kv)
				{
					if (kv.Key < DateTimeOffset.Now.Ticks)
					{
						configValueCache.Remove(kv.Value);
						return true;
					}
					return false;
				});
				byte b = package.ReadByte();
				if ((b & 2u) != 0)
				{
					long num = package.ReadLong();
					string text2 = sender.ToString() + num;
					if (!configValueCache.TryGetValue(text2, out var value))
					{
						value = new SortedDictionary<int, byte[]>();
						configValueCache[text2] = value;
						cacheExpirations.Add(new KeyValuePair<long, string>(DateTimeOffset.Now.AddSeconds(60.0).Ticks, text2));
					}
					int key = package.ReadInt();
					int num2 = package.ReadInt();
					value.Add(key, package.ReadByteArray());
					if (value.Count < num2)
					{
						return false;
					}
					configValueCache.Remove(text2);
					package = new ZPackage(value.Values.SelectMany((byte[] a) => a).ToArray());
					b = package.ReadByte();
				}
				ProcessingServerUpdate = true;
				if ((b & 4u) != 0)
				{
					MemoryStream stream = new MemoryStream(package.ReadByteArray());
					MemoryStream memoryStream = new MemoryStream();
					using (DeflateStream deflateStream = new DeflateStream(stream, CompressionMode.Decompress))
					{
						deflateStream.CopyTo(memoryStream);
					}
					package = new ZPackage(memoryStream.ToArray());
					b = package.ReadByte();
				}
				if ((b & 1) == 0)
				{
					resetConfigsFromServer();
				}
				ParsedConfigs parsedConfigs = ReadConfigsFromPackage(package);
				ConfigFile val2 = null;
				bool saveOnConfigSet = false;
				foreach (KeyValuePair<OwnConfigEntryBase, object> configValue in parsedConfigs.configValues)
				{
					if (!isServer && configValue.Key.LocalBaseValue == null)
					{
						configValue.Key.LocalBaseValue = configValue.Key.BaseConfig.BoxedValue;
					}
					if (val2 == null)
					{
						val2 = configValue.Key.BaseConfig.ConfigFile;
						saveOnConfigSet = val2.SaveOnConfigSet;
						val2.SaveOnConfigSet = false;
					}
					configValue.Key.BaseConfig.BoxedValue = configValue.Value;
				}
				if (val2 != null)
				{
					val2.SaveOnConfigSet = saveOnConfigSet;
				}
				foreach (KeyValuePair<CustomSyncedValueBase, object> customValue in parsedConfigs.customValues)
				{
					if (!isServer)
					{
						CustomSyncedValueBase key2 = customValue.Key;
						if (key2.LocalBaseValue == null)
						{
							key2.LocalBaseValue = customValue.Key.BoxedValue;
						}
					}
					customValue.Key.BoxedValue = customValue.Value;
				}
				Debug.Log((object)string.Format("Received {0} configs and {1} custom values from {2} for mod {3}", parsedConfigs.configValues.Count, parsedConfigs.customValues.Count, (isServer || clientUpdate) ? $"client {sender}" : "the server", DisplayName ?? Name));
				if (!isServer)
				{
					serverLockedSettingChanged();
				}
				return true;
			}
			finally
			{
				ProcessingServerUpdate = false;
			}
		}

		private ParsedConfigs ReadConfigsFromPackage(ZPackage package)
		{
			ParsedConfigs parsedConfigs = new ParsedConfigs();
			Dictionary<string, OwnConfigEntryBase> dictionary = allConfigs.Where((OwnConfigEntryBase c) => c.SynchronizedConfig).ToDictionary((OwnConfigEntryBase c) => c.BaseConfig.Definition.Section + "_" + c.BaseConfig.Definition.Key, (OwnConfigEntryBase c) => c);
			Dictionary<string, CustomSyncedValueBase> dictionary2 = allCustomValues.ToDictionary((CustomSyncedValueBase c) => c.Identifier, (CustomSyncedValueBase c) => c);
			int num = package.ReadInt();
			for (int i = 0; i < num; i++)
			{
				string text = package.ReadString();
				string text2 = package.ReadString();
				string text3 = package.ReadString();
				Type type = Type.GetType(text3);
				if (text3 == "" || type != null)
				{
					object obj;
					try
					{
						obj = ((text3 == "") ? null : ReadValueWithTypeFromZPackage(package, type));
					}
					catch (InvalidDeserializationTypeException ex)
					{
						Debug.LogWarning((object)("Got unexpected struct internal type " + ex.received + " for field " + ex.field + " struct " + text3 + " for " + text2 + " in section " + text + " for mod " + (DisplayName ?? Name) + ", expecting " + ex.expected));
						continue;
					}
					OwnConfigEntryBase value2;
					if (text == "Internal")
					{
						CustomSyncedValueBase value;
						if (text2 == "serverversion")
						{
							if (obj?.ToString() != CurrentVersion)
							{
								Debug.LogWarning((object)("Received server version is not equal: server version = " + (obj?.ToString() ?? "null") + "; local version = " + (CurrentVersion ?? "unknown")));
							}
						}
						else if (text2 == "lockexempt")
						{
							if (obj is bool flag)
							{
								lockExempt = flag;
							}
						}
						else if (dictionary2.TryGetValue(text2, out value))
						{
							if ((text3 == "" && (!value.Type.IsValueType || Nullable.GetUnderlyingType(value.Type) != null)) || GetZPackageTypeString(value.Type) == text3)
							{
								parsedConfigs.customValues[value] = obj;
								continue;
							}
							Debug.LogWarning((object)("Got unexpected type " + text3 + " for internal value " + text2 + " for mod " + (DisplayName ?? Name) + ", expecting " + value.Type.AssemblyQualifiedName));
						}
					}
					else if (dictionary.TryGetValue(text + "_" + text2, out value2))
					{
						Type type2 = configType(value2.BaseConfig);
						if ((text3 == "" && (!type2.IsValueType || Nullable.GetUnderlyingType(type2) != null)) || GetZPackageTypeString(type2) == text3)
						{
							parsedConfigs.configValues[value2] = obj;
							continue;
						}
						Debug.LogWarning((object)("Got unexpected type " + text3 + " for " + text2 + " in section " + text + " for mod " + (DisplayName ?? Name) + ", expecting " + type2.AssemblyQualifiedName));
					}
					else
					{
						Debug.LogWarning((object)("Received unknown config entry " + text2 + " in section " + text + " for mod " + (DisplayName ?? Name) + ". This may happen if client and server versions of the mod do not match."));
					}
					continue;
				}
				Debug.LogWarning((object)("Got invalid type " + text3 + ", abort reading of received configs"));
				return new ParsedConfigs();
			}
			return parsedConfigs;
		}

		private static bool isWritableConfig(OwnConfigEntryBase config)
		{
			ConfigSync configSync = configSyncs.FirstOrDefault((ConfigSync cs) => cs.allConfigs.Contains(config));
			if (configSync == null)
			{
				return true;
			}
			if (!configSync.IsSourceOfTruth && config.SynchronizedConfig && config.LocalBaseValue != null)
			{
				if (!configSync.IsLocked)
				{
					if (config == configSync.lockedConfig)
					{
						return lockExempt;
					}
					return true;
				}
				return false;
			}
			return true;
		}

		private void serverLockedSettingChanged()
		{
			foreach (OwnConfigEntryBase allConfig in allConfigs)
			{
				configAttribute<ConfigurationManagerAttributes>(allConfig.BaseConfig).ReadOnly = !isWritableConfig(allConfig);
			}
		}

		private void resetConfigsFromServer()
		{
			ConfigFile val = null;
			bool saveOnConfigSet = false;
			foreach (OwnConfigEntryBase item in allConfigs.Where((OwnConfigEntryBase config) => config.LocalBaseValue != null))
			{
				if (val == null)
				{
					val = item.BaseConfig.ConfigFile;
					saveOnConfigSet = val.SaveOnConfigSet;
					val.SaveOnConfigSet = false;
				}
				item.BaseConfig.BoxedValue = item.LocalBaseValue;
				item.LocalBaseValue = null;
			}
			if (val != null)
			{
				val.SaveOnConfigSet = saveOnConfigSet;
			}
			foreach (CustomSyncedValueBase item2 in allCustomValues.Where((CustomSyncedValueBase config) => config.LocalBaseValue != null))
			{
				item2.BoxedValue = item2.LocalBaseValue;
				item2.LocalBaseValue = null;
			}
			lockedConfigChanged -= serverLockedSettingChanged;
			serverLockedSettingChanged();
		}

		private IEnumerator<bool> distributeConfigToPeers(ZNetPeer peer, ZPackage package)
		{
			ZRoutedRpc rpc = ZRoutedRpc.instance;
			if (rpc == null)
			{
				yield break;
			}
			byte[] data = package.GetArray();
			if (data != null && data.LongLength > 250000)
			{
				int fragments = (int)(1 + (data.LongLength - 1) / 250000);
				long packageIdentifier = ++packageCounter;
				int fragment = 0;
				while (fragment < fragments)
				{
					foreach (bool item in waitForQueue())
					{
						yield return item;
					}
					if (peer.m_socket.IsConnected())
					{
						ZPackage val = new ZPackage();
						val.Write((byte)2);
						val.Write(packageIdentifier);
						val.Write(fragment);
						val.Write(fragments);
						val.Write(data.Skip(250000 * fragment).Take(250000).ToArray());
						SendPackage(val);
						if (fragment != fragments - 1)
						{
							yield return true;
						}
						int num = fragment + 1;
						fragment = num;
						continue;
					}
					break;
				}
				yield break;
			}
			foreach (bool item2 in waitForQueue())
			{
				yield return item2;
			}
			SendPackage(package);
			void SendPackage(ZPackage pkg)
			{
				string text = Name + " ConfigSync";
				if (isServer)
				{
					peer.m_rpc.Invoke(text, new object[1] { pkg });
				}
				else
				{
					rpc.InvokeRoutedRPC(peer.m_server ? 0 : peer.m_uid, text, new object[1] { pkg });
				}
			}
			IEnumerable<bool> waitForQueue()
			{
				float timeout = Time.time + 30f;
				while (peer.m_socket.GetSendQueueSize() > 20000)
				{
					if (Time.time > timeout)
					{
						Debug.Log((object)$"Disconnecting {peer.m_uid} after 30 seconds config sending timeout");
						peer.m_rpc.Invoke("Error", new object[1] { (object)(ConnectionStatus)5 });
						ZNet.instance.Disconnect(peer);
						break;
					}
					yield return false;
				}
			}
		}

		private IEnumerator sendZPackage(long target, ZPackage package)
		{
			if (!Object.op_Implicit((Object)(object)ZNet.instance))
			{
				return Enumerable.Empty<object>().GetEnumerator();
			}
			List<ZNetPeer> list = (List<ZNetPeer>)AccessTools.DeclaredField(typeof(ZRoutedRpc), "m_peers").GetValue(ZRoutedRpc.instance);
			if (target != ZRoutedRpc.Everybody)
			{
				list = list.Where((ZNetPeer p) => p.m_uid == target).ToList();
			}
			return sendZPackage(list, package);
		}

		private IEnumerator sendZPackage(List<ZNetPeer> peers, ZPackage package)
		{
			if (!Object.op_Implicit((Object)(object)ZNet.instance))
			{
				yield break;
			}
			byte[] array = package.GetArray();
			if (array != null && array.LongLength > 10000)
			{
				ZPackage val = new ZPackage();
				val.Write((byte)4);
				MemoryStream memoryStream = new MemoryStream();
				using (DeflateStream deflateStream = new DeflateStream(memoryStream, CompressionLevel.Optimal))
				{
					deflateStream.Write(array, 0, array.Length);
				}
				val.Write(memoryStream.ToArray());
				package = val;
			}
			List<IEnumerator<bool>> writers = (from peer in peers
				where peer.IsReady()
				select peer into p
				select distributeConfigToPeers(p, package)).ToList();
			writers.RemoveAll((IEnumerator<bool> writer) => !writer.MoveNext());
			while (writers.Count > 0)
			{
				yield return null;
				writers.RemoveAll((IEnumerator<bool> writer) => !writer.MoveNext());
			}
		}

		private void Broadcast(long target, params ConfigEntryBase[] configs)
		{
			if (!IsLocked || isServer)
			{
				ZPackage package = ConfigsToPackage(configs);
				ZNet instance = ZNet.instance;
				if (instance != null)
				{
					((MonoBehaviour)instance).StartCoroutine(sendZPackage(target, package));
				}
			}
		}

		private void Broadcast(long target, params CustomSyncedValueBase[] customValues)
		{
			if (!IsLocked || isServer)
			{
				ZPackage package = ConfigsToPackage(null, customValues);
				ZNet instance = ZNet.instance;
				if (instance != null)
				{
					((MonoBehaviour)instance).StartCoroutine(sendZPackage(target, package));
				}
			}
		}

		private static OwnConfigEntryBase? configData(ConfigEntryBase config)
		{
			return config.Description.Tags?.OfType<OwnConfigEntryBase>().SingleOrDefault();
		}

		public static SyncedConfigEntry<T>? ConfigData<T>(ConfigEntry<T> config)
		{
			return ((ConfigEntryBase)config).Description.Tags?.OfType<SyncedConfigEntry<T>>().SingleOrDefault();
		}

		private static T configAttribute<T>(ConfigEntryBase config)
		{
			return config.Description.Tags.OfType<T>().First();
		}

		private static Type configType(ConfigEntryBase config)
		{
			return configType(config.SettingType);
		}

		private static Type configType(Type type)
		{
			if (!type.IsEnum)
			{
				return type;
			}
			return Enum.GetUnderlyingType(type);
		}

		private static ZPackage ConfigsToPackage(IEnumerable<ConfigEntryBase>? configs = null, IEnumerable<CustomSyncedValueBase>? customValues = null, IEnumerable<PackageEntry>? packageEntries = null, bool partial = true)
		{
			//IL_0050: Unknown result type (might be due to invalid IL or missing references)
			//IL_0056: Expected O, but got Unknown
			List<ConfigEntryBase> list = configs?.Where((ConfigEntryBase config) => configData(config).SynchronizedConfig).ToList() ?? new List<ConfigEntryBase>();
			List<CustomSyncedValueBase> list2 = customValues?.ToList() ?? new List<CustomSyncedValueBase>();
			ZPackage val = new ZPackage();
			val.Write(partial ? ((byte)1) : ((byte)0));
			val.Write(list.Count + list2.Count + (packageEntries?.Count() ?? 0));
			foreach (PackageEntry item in packageEntries ?? Array.Empty<PackageEntry>())
			{
				AddEntryToPackage(val, item);
			}
			foreach (CustomSyncedValueBase item2 in list2)
			{
				AddEntryToPackage(val, new PackageEntry
				{
					section = "Internal",
					key = item2.Identifier,
					type = item2.Type,
					value = item2.BoxedValue
				});
			}
			foreach (ConfigEntryBase item3 in list)
			{
				AddEntryToPackage(val, new PackageEntry
				{
					section = item3.Definition.Section,
					key = item3.Definition.Key,
					type = configType(item3),
					value = item3.BoxedValue
				});
			}
			return val;
		}

		private static void AddEntryToPackage(ZPackage package, PackageEntry entry)
		{
			package.Write(entry.section);
			package.Write(entry.key);
			package.Write((entry.value == null) ? "" : GetZPackageTypeString(entry.type));
			AddValueToZPackage(package, entry.value);
		}

		private static string GetZPackageTypeString(Type type)
		{
			return type.AssemblyQualifiedName;
		}

		private static void AddValueToZPackage(ZPackage package, object? value)
		{
			Type type = value?.GetType();
			if (value is Enum)
			{
				value = ((IConvertible)value).ToType(Enum.GetUnderlyingType(value.GetType()), CultureInfo.InvariantCulture);
			}
			else
			{
				if (value is ICollection collection)
				{
					package.Write(collection.Count);
					{
						foreach (object item in collection)
						{
							AddValueToZPackage(package, item);
						}
						return;
					}
				}
				if ((object)type != null && type.IsValueType && !type.IsPrimitive)
				{
					FieldInfo[] fields = type.GetFields(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic);
					package.Write(fields.Length);
					FieldInfo[] array = fields;
					foreach (FieldInfo fieldInfo in array)
					{
						package.Write(GetZPackageTypeString(fieldInfo.FieldType));
						AddValueToZPackage(package, fieldInfo.GetValue(value));
					}
					return;
				}
			}
			ZRpc.Serialize(new object[1] { value }, ref package);
		}

		private static object ReadValueWithTypeFromZPackage(ZPackage package, Type type)
		{
			if ((object)type != null && type.IsValueType && !type.IsPrimitive && !type.IsEnum)
			{
				FieldInfo[] fields = type.GetFields(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic);
				int num = package.ReadInt();
				if (num != fields.Length)
				{
					throw new InvalidDeserializationTypeException
					{
						received = $"(field count: {num})",
						expected = $"(field count: {fields.Length})"
					};
				}
				object uninitializedObject = FormatterServices.GetUninitializedObject(type);
				FieldInfo[] array = fields;
				foreach (FieldInfo fieldInfo in array)
				{
					string text = package.ReadString();
					if (text != GetZPackageTypeString(fieldInfo.FieldType))
					{
						throw new InvalidDeserializationTypeException
						{
							received = text,
							expected = GetZPackageTypeString(fieldInfo.FieldType),
							field = fieldInfo.Name
						};
					}
					fieldInfo.SetValue(uninitializedObject, ReadValueWithTypeFromZPackage(package, fieldInfo.FieldType));
				}
				return uninitializedObject;
			}
			if (type.IsGenericType && type.GetGenericTypeDefinition() == typeof(Dictionary<, >))
			{
				int num2 = package.ReadInt();
				IDictionary dictionary = (IDictionary)Activator.CreateInstance(type);
				Type type2 = typeof(KeyValuePair<, >).MakeGenericType(type.GenericTypeArguments);
				FieldInfo field = type2.GetField("key", BindingFlags.Instance | BindingFlags.NonPublic);
				FieldInfo field2 = type2.GetField("value", BindingFlags.Instance | BindingFlags.NonPublic);
				for (int j = 0; j < num2; j++)
				{
					object obj = ReadValueWithTypeFromZPackage(package, type2);
					dictionary.Add(field.GetValue(obj), field2.GetValue(obj));
				}
				return dictionary;
			}
			if (type != typeof(List<string>) && type.IsGenericType)
			{
				Type type3 = typeof(ICollection<>).MakeGenericType(type.GenericTypeArguments[0]);
				if ((object)type3 != null && type3.IsAssignableFrom(type))
				{
					int num3 = package.ReadInt();
					object obj2 = Activator.CreateInstance(type);
					MethodInfo method = type3.GetMethod("Add");
					for (int k = 0; k < num3; k++)
					{
						method.Invoke(obj2, new object[1] { ReadValueWithTypeFromZPackage(package, type.GenericTypeArguments[0]) });
					}
					return obj2;
				}
			}
			ParameterInfo parameterInfo = (ParameterInfo)FormatterServices.GetUninitializedObject(typeof(ParameterInfo));
			AccessTools.DeclaredField(typeof(ParameterInfo), "ClassImpl").SetValue(parameterInfo, type);
			List<object> source = new List<object>();
			ZRpc.Deserialize(new ParameterInfo[2] { null, parameterInfo }, package, ref source);
			return source.First();
		}
	}
	[PublicAPI]
	[HarmonyPatch]
	public class VersionCheck
	{
		private static readonly HashSet<VersionCheck> versionChecks;

		private static readonly Dictionary<string, string> notProcessedNames;

		public string Name;

		private string? displayName;

		private string? currentVersion;

		private string? minimumRequiredVersion;

		public bool ModRequired = true;

		private string? ReceivedCurrentVersion;

		private string? ReceivedMinimumRequiredVersion;

		private readonly List<ZRpc> ValidatedClients = new List<ZRpc>();

		private ConfigSync? ConfigSync;

		public string DisplayName
		{
			get
			{
				return displayName ?? Name;
			}
			set
			{
				displayName = value;
			}
		}

		public string CurrentVersion
		{
			get
			{
				return currentVersion ?? "0.0.0";
			}
			set
			{
				currentVersion = value;
			}
		}

		public string MinimumRequiredVersion
		{
			get
			{
				string text = minimumRequiredVersion;
				if (text == null)
				{
					if (!ModRequired)
					{
						return "0.0.0";
					}
					text = CurrentVersion;
				}
				return text;
			}
			set
			{
				minimumRequiredVersion = value;
			}
		}

		private static void PatchServerSync()
		{
			//IL_0056: Unknown result type (might be due to invalid IL or missing references)
			//IL_005c: Expected O, but got Unknown
			Patches patchInfo = PatchProcessor.GetPatchInfo((MethodBase)AccessTools.DeclaredMethod(typeof(ZNet), "Awake", (Type[])null, (Type[])null));
			if (patchInfo != null && patchInfo.Postfixes.Count((Patch p) => p.PatchMethod.DeclaringType == typeof(ConfigSync.RegisterRPCPatch)) > 0)
			{
				return;
			}
			Harmony val = new Harmony("org.bepinex.helpers.ServerSync");
			foreach (Type item in from t in typeof(ConfigSync).GetNestedTypes(BindingFlags.NonPublic).Concat(new Type[1] { typeof(VersionCheck) })
				where t.IsClass
				select t)
			{
				val.PatchAll(item);
			}
		}

		static VersionCheck()
		{
			versionChecks = new HashSet<VersionCheck>();
			notProcessedNames = new Dictionary<string, string>();
			typeof(ThreadingHelper).GetMethod("StartSyncInvoke").Invoke(ThreadingHelper.Instance, new object[1]
			{
				new Action(PatchServerSync)
			});
		}

		public VersionCheck(string name)
		{
			Name = name;
			ModRequired = true;
			versionChecks.Add(this);
		}

		public VersionCheck(ConfigSync configSync)
		{
			ConfigSync = configSync;
			Name = ConfigSync.Name;
			versionChecks.Add(this);
		}

		public void Initialize()
		{
			ReceivedCurrentVersion = null;
			ReceivedMinimumRequiredVersion = null;
			if (ConfigSync != null)
			{
				Name = ConfigSync.Name;
				DisplayName = ConfigSync.DisplayName;
				CurrentVersion = ConfigSync.CurrentVersion;
				MinimumRequiredVersion = ConfigSync.MinimumRequiredVersion;
				ModRequired = ConfigSync.ModRequired;
			}
		}

		private bool IsVersionOk()
		{
			if (ReceivedMinimumRequiredVersion == null || ReceivedCurrentVersion == null)
			{
				return !ModRequired;
			}
			bool num = new System.Version(CurrentVersion) >= new System.Version(ReceivedMinimumRequiredVersion);
			bool flag = new System.Version(ReceivedCurrentVersion) >= new System.Version(MinimumRequiredVersion);
			return num && flag;
		}

		private string ErrorClient()
		{
			if (ReceivedMinimumRequiredVersion == null)
			{
				return DisplayName + " is not installed on the server.";
			}
			if (!(new System.Version(CurrentVersion) >= new System.Version(ReceivedMinimumRequiredVersion)))
			{
				return DisplayName + " needs to be at least version " + ReceivedMinimumRequiredVersion + ". You have version " + CurrentVersion + ".";
			}
			return DisplayName + " may not be higher than version " + ReceivedCurrentVersion + ". You have version " + CurrentVersion + ".";
		}

		private string ErrorServer(ZRpc rpc)
		{
			return "Disconnect: The client (" + rpc.GetSocket().GetHostName() + ") doesn't have the correct " + DisplayName + " version " + MinimumRequiredVersion;
		}

		private string Error(ZRpc? rpc = null)
		{
			if (rpc != null)
			{
				return ErrorServer(rpc);
			}
			return ErrorClient();
		}

		private static VersionCheck[] GetFailedClient()
		{
			return versionChecks.Where((VersionCheck check) => !check.IsVersionOk()).ToArray();
		}

		private static VersionCheck[] GetFailedServer(ZRpc rpc)
		{
			return versionChecks.Where((VersionCheck check) => check.ModRequired && !check.ValidatedClients.Contains(rpc)).ToArray();
		}

		private static void Logout()
		{
			Game.instance.Logout();
			AccessTools.DeclaredField(typeof(ZNet), "m_connectionStatus").SetValue(null, (object)(ConnectionStatus)3);
		}

		private static void DisconnectClient(ZRpc rpc)
		{
			rpc.Invoke("Error", new object[1] { 3 });
		}

		private static void CheckVersion(ZRpc rpc, ZPackage pkg)
		{
			CheckVersion(rpc, pkg, null);
		}

		private static void CheckVersion(ZRpc rpc, ZPackage pkg, Action<ZRpc, ZPackage>? original)
		{
			string text = pkg.ReadString();
			string text2 = pkg.ReadString();
			string text3 = pkg.ReadString();
			bool flag = false;
			foreach (VersionCheck versionCheck in versionChecks)
			{
				if (!(text != versionCheck.Name))
				{
					Debug.Log((object)("Received " + versionCheck.DisplayName + " version " + text3 + " and minimum version " + text2 + " from the " + (ZNet.instance.IsServer() ? "client" : "server") + "."));
					versionCheck.ReceivedMinimumRequiredVersion = text2;
					versionCheck.ReceivedCurrentVersion = text3;
					if (ZNet.instance.IsServer() && versionCheck.IsVersionOk())
					{
						versionCheck.ValidatedClients.Add(rpc);
					}
					flag = true;
				}
			}
			if (flag)
			{
				return;
			}
			pkg.SetPos(0);
			if (original != null)
			{
				original(rpc, pkg);
				if (pkg.GetPos() == 0)
				{
					notProcessedNames.Add(text, text3);
				}
			}
		}

		[HarmonyPatch(typeof(ZNet), "RPC_PeerInfo")]
		[HarmonyPrefix]
		private static bool RPC_PeerInfo(ZRpc rpc, ZNet __instance)
		{
			VersionCheck[] array = (__instance.IsServer() ? GetFailedServer(rpc) : GetFailedClient());
			if (array.Length == 0)
			{
				return true;
			}
			VersionCheck[] array2 = array;
			for (int i = 0; i < array2.Length; i++)
			{
				Debug.LogWarning((object)array2[i].Error(rpc));
			}
			if (__instance.IsServer())
			{
				DisconnectClient(rpc);
			}
			else
			{
				Logout();
			}
			return false;
		}

		[HarmonyPatch(typeof(ZNet), "OnNewConnection")]
		[HarmonyPrefix]
		private static void RegisterAndCheckVersion(ZNetPeer peer, ZNet __instance)
		{
			//IL_0172: Unknown result type (might be due to invalid IL or missing references)
			//IL_0179: Expected O, but got Unknown
			notProcessedNames.Clear();
			IDictionary dictionary = (IDictionary)typeof(ZRpc).GetField("m_functions", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(peer.m_rpc);
			if (dictionary.Contains(StringExtensionMethods.GetStableHashCode("ServerSync VersionCheck")))
			{
				object obj = dictionary[StringExtensionMethods.GetStableHashCode("ServerSync VersionCheck")];
				Action<ZRpc, ZPackage> action = (Action<ZRpc, ZPackage>)obj.GetType().GetField("m_action", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(obj);
				peer.m_rpc.Register<ZPackage>("ServerSync VersionCheck", (Action<ZRpc, ZPackage>)delegate(ZRpc rpc, ZPackage pkg)
				{
					CheckVersion(rpc, pkg, action);
				});
			}
			else
			{
				peer.m_rpc.Register<ZPackage>("ServerSync VersionCheck", (Action<ZRpc, ZPackage>)CheckVersion);
			}
			foreach (VersionCheck versionCheck in versionChecks)
			{
				versionCheck.Initialize();
				if (versionCheck.ModRequired || __instance.IsServer())
				{
					Debug.Log((object)("Sending " + versionCheck.DisplayName + " version " + versionCheck.CurrentVersion + " and minimum version " + versionCheck.MinimumRequiredVersion + " to the " + (__instance.IsServer() ? "client" : "server") + "."));
					ZPackage val = new ZPackage();
					val.Write(versionCheck.Name);
					val.Write(versionCheck.MinimumRequiredVersion);
					val.Write(versionCheck.CurrentVersion);
					peer.m_rpc.Invoke("ServerSync VersionCheck", new object[1] { val });
				}
			}
		}

		[HarmonyPatch(typeof(ZNet), "Disconnect")]
		[HarmonyPrefix]
		private static void RemoveDisconnected(ZNetPeer peer, ZNet __instance)
		{
			if (!__instance.IsServer())
			{
				return;
			}
			foreach (VersionCheck versionCheck in versionChecks)
			{
				versionCheck.ValidatedClients.Remove(peer.m_rpc);
			}
		}

		[HarmonyPatch(typeof(FejdStartup), "ShowConnectError")]
		[HarmonyPostfix]
		private static void ShowConnectionError(FejdStartup __instance)
		{
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0013: Invalid comparison between Unknown and I4
			//IL_014e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0153: Unknown result type (might be due to invalid IL or missing references)
			//IL_0161: Unknown result type (might be due to invalid IL or missing references)
			//IL_018b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0197: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a5: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b7: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c5: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ca: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d5: Unknown result type (might be due to invalid IL or missing references)
			if (!__instance.m_connectionFailedPanel.activeSelf || (int)ZNet.GetConnectionStatus() != 3)
			{
				return;
			}
			bool flag = false;
			VersionCheck[] failedClient = GetFailedClient();
			if (failedClient.Length != 0)
			{
				string text = string.Join("\n", failedClient.Select((VersionCheck check) => check.Error()));
				Text connectionFailedError = __instance.m_connectionFailedError;
				connectionFailedError.text = connectionFailedError.text + "\n" + text;
				flag = true;
			}
			foreach (KeyValuePair<string, string> item in notProcessedNames.OrderBy((KeyValuePair<string, string> kv) => kv.Key))
			{
				if (!__instance.m_connectionFailedError.text.Contains(item.Key))
				{
					Text connectionFailedError2 = __instance.m_connectionFailedError;
					connectionFailedError2.text = connectionFailedError2.text + "\nServer expects you to have " + item.Key + " (Version: " + item.Value + ") installed.";
					flag = true;
				}
			}
			if (flag)
			{
				RectTransform component = ((Component)__instance.m_connectionFailedPanel.transform.Find("Image")).GetComponent<RectTransform>();
				Vector2 sizeDelta = component.sizeDelta;
				sizeDelta.x = 675f;
				component.sizeDelta = sizeDelta;
				float num = 105f;
				RectTransform component2 = ((Component)((Component)component).transform.Find("ButtonOk")).GetComponent<RectTransform>();
				component2.anchoredPosition = new Vector2(component2.anchoredPosition.x, component2.anchoredPosition.y - (num - component.sizeDelta.y) / 2f);
				sizeDelta = component.sizeDelta;
				sizeDelta.y = num;
				component.sizeDelta = sizeDelta;
			}
		}
	}
}
namespace LocalizationManager
{
	[PublicAPI]
	public class Localizer
	{
		private static readonly Dictionary<string, Dictionary<string, Func<string>>> PlaceholderProcessors;

		private static readonly Dictionary<string, Dictionary<string, string>> loadedTexts;

		private static readonly ConditionalWeakTable<Localization, string> localizationLanguage;

		private static readonly List<WeakReference<Localization>> localizationObjects;

		private static BaseUnityPlugin? _plugin;

		private static readonly List<string> fileExtensions;

		private static BaseUnityPlugin plugin
		{
			get
			{
				//IL_009b: Unknown result type (might be due to invalid IL or missing references)
				//IL_00a5: Expected O, but got Unknown
				if (_plugin == null)
				{
					IEnumerable<TypeInfo> source;
					try
					{
						source = Assembly.GetExecutingAssembly().DefinedTypes.ToList();
					}
					catch (ReflectionTypeLoadException ex)
					{
						source = from t in ex.Types
							where t != null
							select t.GetTypeInfo();
					}
					_plugin = (BaseUnityPlugin)Chainloader.ManagerObject.GetComponent((Type)source.First((TypeInfo t) => t.IsClass && typeof(BaseUnityPlugin).IsAssignableFrom(t)));
				}
				return _plugin;
			}
		}

		private static void UpdatePlaceholderText(Localization localization, string key)
		{
			localizationLanguage.TryGetValue(localization, out var value);
			string text = loadedTexts[value][key];
			if (PlaceholderProcessors.TryGetValue(key, out var value2))
			{
				text = value2.Aggregate(text, (string current, KeyValuePair<string, Func<string>> kv) => current.Replace("{" + kv.Key + "}", kv.Value()));
			}
			localization.AddWord(key, text);
		}

		public static void AddPlaceholder<T>(string key, string placeholder, ConfigEntry<T> config, Func<T, string>? convertConfigValue = null) where T : notnull
		{
			Func<T, string> convertConfigValue2 = convertConfigValue;
			if (convertConfigValue2 == null)
			{
				convertConfigValue2 = (T val) => val.ToString();
			}
			if (!PlaceholderProcessors.ContainsKey(key))
			{
				PlaceholderProcessors[key] = new Dictionary<string, Func<string>>();
			}
			config.SettingChanged += delegate
			{
				UpdatePlaceholder();
			};
			if (loadedTexts.ContainsKey(Localization.instance.GetSelectedLanguage()))
			{
				UpdatePlaceholder();
			}
			void UpdatePlaceholder()
			{
				PlaceholderProcessors[key][placeholder] = () => convertConfigValue2(config.Value);
				UpdatePlaceholderText(Localization.instance, key);
			}
		}

		public static void AddText(string key, string text)
		{
			List<WeakReference<Localization>> list = new List<WeakReference<Localization>>();
			foreach (WeakReference<Localization> localizationObject in localizationObjects)
			{
				if (localizationObject.TryGetTarget(out var target))
				{
					Dictionary<string, string> dictionary = loadedTexts[localizationLanguage.GetOrCreateValue(target)];
					if (!target.m_translations.ContainsKey(key))
					{
						dictionary[key] = text;
						target.AddWord(key, text);
					}
				}
				else
				{
					list.Add(localizationObject);
				}
			}
			foreach (WeakReference<Localization> item in list)
			{
				localizationObjects.Remove(item);
			}
		}

		public static void Load()
		{
			LoadLocalization(Localization.instance, Localization.instance.GetSelectedLanguage());
		}

		private static void LoadLocalization(Localization __instance, string language)
		{
			if (!localizationLanguage.Remove(__instance))
			{
				localizationObjects.Add(new WeakReference<Localization>(__instance));
			}
			localizationLanguage.Add(__instance, language);
			Dictionary<string, string> dictionary = new Dictionary<string, string>();
			foreach (string item in from f in Directory.GetFiles(Path.GetDirectoryName(Paths.PluginPath), plugin.Info.Metadata.Name + ".*", SearchOption.AllDirectories)
				where fileExtensions.IndexOf(Path.GetExtension(f)) >= 0
				select f)
			{
				string text = Path.GetFileNameWithoutExtension(item).Split(new char[1] { '.' })[1];
				if (dictionary.ContainsKey(text))
				{
					Debug.LogWarning((object)("Duplicate key " + text + " found for " + plugin.Info.Metadata.Name + ". The duplicate file found at " + item + " will be skipped."));
				}
				else
				{
					dictionary[text] = item;
				}
			}
			byte[] array = LoadTranslationFromAssembly("English");
			if (array == null)
			{
				throw new Exception("Found no English localizations in mod " + plugin.Info.Metadata.Name + ". Expected an embedded resource translations/English.json or translations/English.yml.");
			}
			Dictionary<string, string> dictionary2 = new DeserializerBuilder().IgnoreFields().Build().Deserialize<Dictionary<string, string>>(Encoding.UTF8.GetString(array));
			if (dictionary2 == null)
			{
				throw new Exception("Localization for mod " + plugin.Info.Metadata.Name + " failed: Localization file was empty.");
			}
			string text2 = null;
			if (language != "English")
			{
				if (dictionary.ContainsKey(language))
				{
					text2 = File.ReadAllText(dictionary[language]);
				}
				else
				{
					byte[] array2 = LoadTranslationFromAssembly(language);
					if (array2 != null)
					{
						text2 = Encoding.UTF8.GetString(array2);
					}
				}
			}
			if (text2 == null && dictionary.ContainsKey("English"))
			{
				text2 = File.ReadAllText(dictionary["English"]);
			}
			if (text2 != null)
			{
				foreach (KeyValuePair<string, string> item2 in new DeserializerBuilder().IgnoreFields().Build().Deserialize<Dictionary<string, string>>(text2) ?? new Dictionary<string, string>())
				{
					dictionary2[item2.Key] = item2.Value;
				}
			}
			loadedTexts[language] = dictionary2;
			foreach (KeyValuePair<string, string> item3 in dictionary2)
			{
				UpdatePlaceholderText(__instance, item3.Key);
			}
		}

		static Localizer()
		{
			//IL_004d: Unknown result type (might be due to invalid IL or missing references)
			//IL_007f: Unknown result type (might be due to invalid IL or missing references)
			//IL_008c: Expected O, but got Unknown
			PlaceholderProcessors = new Dictionary<string, Dictionary<string, Func<string>>>();
			loadedTexts = new Dictionary<string, Dictionary<string, string>>();
			localizationLanguage = new ConditionalWeakTable<Localization, string>();
			localizationObjects = new List<WeakReference<Localization>>();
			fileExtensions = new List<string> { ".json", ".yml" };
			new Harmony("org.bepinex.helpers.LocalizationManager").Patch((MethodBase)AccessTools.DeclaredMethod(typeof(Localization), "LoadCSV", (Type[])null, (Type[])null), (HarmonyMethod)null, new HarmonyMethod(AccessTools.DeclaredMethod(typeof(Localizer), "LoadLocalization", (Type[])null, (Type[])null)), (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null);
		}

		private static byte[]? LoadTranslationFromAssembly(string language)
		{
			foreach (string fileExtension in fileExtensions)
			{
				byte[] array = ReadEmbeddedFileBytes("translations." + language + fileExtension);
				if (array != null)
				{
					return array;
				}
			}
			return null;
		}

		public static byte[]? ReadEmbeddedFileBytes(string resourceFileName, Assembly? containingAssembly = null)
		{
			using MemoryStream memoryStream = new MemoryStream();
			if ((object)containingAssembly == null)
			{
				containingAssembly = Assembly.GetCallingAssembly();
			}
			string text = containingAssembly.GetManifestResourceNames().FirstOrDefault((string str) => str.EndsWith(resourceFileName, StringComparison.Ordinal));
			if (text != null)
			{
				containingAssembly.GetManifestResourceStream(text)?.CopyTo(memoryStream);
			}
			return (memoryStream.Length == 0L) ? null : memoryStream.ToArray();
		}
	}
}
namespace ItemManager
{
	[PublicAPI]
	public enum CraftingTable
	{
		Disabled,
		Inventory,
		[InternalName("piece_workbench")]
		Workbench,
		[InternalName("piece_cauldron")]
		Cauldron,
		[InternalName("forge")]
		Forge,
		[InternalName("piece_artisanstation")]
		ArtisanTable,
		[InternalName("piece_stonecutter")]
		StoneCutter,
		[InternalName("piece_magetable")]
		MageTable,
		[InternalName("blackforge")]
		BlackForge,
		Custom
	}
	[PublicAPI]
	public enum ConversionPiece
	{
		Disabled,
		[InternalName("smelter")]
		Smelter,
		[InternalName("charcoal_kiln")]
		CharcoalKiln,
		[InternalName("blastfurnace")]
		BlastFurnace,
		[InternalName("windmill")]
		Windmill,
		[InternalName("piece_spinningwheel")]
		SpinningWheel,
		[InternalName("eitrrefinery")]
		EitrRefinery,
		Custom
	}
	public class InternalName : Attribute
	{
		public readonly string internalName;

		public InternalName(string internalName)
		{
			this.internalName = internalName;
		}
	}
	[PublicAPI]
	public class RequiredResourceList
	{
		public readonly List<Requirement> Requirements = new List<Requirement>();

		public bool Free;

		public void Add(string itemName, int amount, int quality = 0)
		{
			Requirements.Add(new Requirement
			{
				itemName = itemName,
				amount = amount,
				quality = quality
			});
		}

		public void Add(string itemName, ConfigEntry<int> amountConfig, int quality = 0)
		{
			Requirements.Add(new Requirement
			{
				itemName = itemName,
				amountConfig = amountConfig,
				quality = quality
			});
		}
	}
	[PublicAPI]
	public class CraftingStationList
	{
		public readonly List<CraftingStationConfig> Stations = new List<CraftingStationConfig>();

		public void Add(CraftingTable table, int level)
		{
			Stations.Add(new CraftingStationConfig
			{
				Table = table,
				level = level
			});
		}

		public void Add(string customTable, int level)
		{
			Stations.Add(new CraftingStationConfig
			{
				Table = CraftingTable.Custom,
				level = level,
				custom = customTable
			});
		}
	}
	[PublicAPI]
	public class ItemRecipe
	{
		public readonly RequiredResourceList RequiredItems = new RequiredResourceList();

		public readonly RequiredResourceList RequiredUpgradeItems = new RequiredResourceList();

		public readonly CraftingStationList Crafting = new CraftingStationList();

		public int CraftAmount = 1;

		public bool RequireOnlyOneIngredient;

		public float QualityResultAmountMultiplier = 1f;

		public ConfigEntryBase? RecipeIsActive;
	}
	[PublicAPI]
	public class Trade
	{
		public Trader Trader;

		public uint Price;

		public uint Stack = 1u;

		public string? RequiredGlobalKey;
	}
	[PublicAPI]
	[Flags]
	public enum Trader
	{
		None = 0,
		Haldor = 1,
		Hildir = 2
	}
	public struct Requirement
	{
		public string itemName;

		public int amount;

		public ConfigEntry<int>? amountConfig;

		[Description("Set to a non-zero value to apply the requirement only for a specific quality")]
		public int quality;
	}
	public struct CraftingStationConfig
	{
		public CraftingTable Table;

		public int level;

		public string? custom;
	}
	[Flags]
	public enum Configurability
	{
		Disabled = 0,
		Recipe = 1,
		Stats = 2,
		Drop = 4,
		Trader = 8,
		Full = 0xF
	}
	[PublicAPI]
	public class DropTargets
	{
		public readonly List<DropTarget> Drops = new List<DropTarget>();

		public void Add(string creatureName, float chance, int min = 1, int? max = null, bool levelMultiplier = true)
		{
			Drops.Add(new DropTarget
			{
				creature = creatureName,
				chance = chance,
				min = min,
				max = (max ?? min),
				levelMultiplier = levelMultiplier
			});
		}
	}
	public struct DropTarget
	{
		public string creature;

		public int min;

		public int max;

		public float chance;

		public bool levelMultiplier;
	}
	public enum Toggle
	{
		On = 1,
		Off = 0
	}
	[PublicAPI]
	public class Item
	{
		private class ItemConfig
		{
			public ConfigEntry<string>? craft;

			public ConfigEntry<string>? upgrade;

			public ConfigEntry<CraftingTable> table;

			public ConfigEntry<int> tableLevel;

			public ConfigEntry<string> customTable;

			public ConfigEntry<int>? maximumTableLevel;

			public ConfigEntry<Toggle> requireOneIngredient;

			public ConfigEntry<float> qualityResultAmountMultiplier;
		}

		private class TraderConfig
		{
			public ConfigEntry<Trader> trader;

			public ConfigEntry<uint> price;

			public ConfigEntry<uint> stack;

			public ConfigEntry<string> requiredGlobalKey;
		}

		private class RequirementQuality
		{
			public int quality;
		}

		private class ConfigurationManagerAttributes
		{
			[UsedImplicitly]
			public int? Order;

			[UsedImplicitly]
			public bool? Browsable;

			[UsedImplicitly]
			public string? Category;

			[UsedImplicitly]
			public Action<ConfigEntryBase>? CustomDrawer;

			public Func<bool>? browsability;
		}

		[PublicAPI]
		public enum DamageModifier
		{
			Normal,
			Resistant,
			Weak,
			Immune,
			Ignore,
			VeryResistant,
			VeryWeak,
			None
		}

		private delegate void setDmgFunc(ref DamageTypes dmg, float value);

		private class SerializedRequirements
		{
			public readonly List<Requirement> Reqs;

			public SerializedRequirements(List<Requirement> reqs)
			{
				Reqs = reqs;
			}

			public SerializedRequirements(string reqs)
				: this(reqs.Split(new char[1] { ',' }).Select(delegate(string r)
				{
					string[] array = r.Split(new char[1] { ':' });
					Requirement result = default(Requirement);
					result.itemName = array[0];
					result.amount = ((array.Length <= 1 || !int.TryParse(array[1], out var result2)) ? 1 : result2);
					result.quality = ((array.Length > 2 && int.TryParse(array[2], out var result3)) ? result3 : 0);
					return result;
				}).ToList())
			{
			}

			public override string ToString()
			{
				return string.Join(",", Reqs.Select((Requirement r) => $"{r.itemName}:{r.amount}" + ((r.quality > 0) ? $":{r.quality}" : "")));
			}

			public static ItemDrop? fetchByName(ObjectDB objectDB, string name)
			{
				GameObject itemPrefab = objectDB.GetItemPrefab(name);
				ItemDrop obj = ((itemPrefab != null) ? itemPrefab.GetComponent<ItemDrop>() : null);
				if ((Object)(object)obj == (Object)null)
				{
					Debug.LogWarning((object)("The required item '" + name + "' does not exist."));
				}
				return obj;
			}

			public static Requirement[] toPieceReqs(ObjectDB objectDB, SerializedRequirements craft, SerializedRequirements upgrade)
			{
				//IL_00f0: Unknown result type (might be due to invalid IL or missing references)
				//IL_00f5: Unknown result type (might be due to invalid IL or missing references)
				//IL_00fd: Unknown result type (might be due to invalid IL or missing references)
				//IL_0178: Unknown result type (might be due to invalid IL or missing references)
				//IL_017d: Unknown result type (might be due to invalid IL or missing references)
				//IL_0185: Unknown result type (might be due to invalid IL or missing references)
				//IL_018c: Unknown result type (might be due to invalid IL or missing references)
				//IL_018f: Expected O, but got Unknown
				//IL_0194: Expected O, but got Unknown
				//IL_011c: Unknown result type (might be due to invalid IL or missing references)
				//IL_0125: Expected O, but got Unknown
				Dictionary<string, Requirement> dictionary = craft.Reqs.Where((Requirement r) => r.itemName != "").ToDictionary((Func<Requirement, string>)((Requirement r) => r.itemName), (Func<Requirement, Requirement>)delegate(Requirement r)
				{
					//IL_000d: Unknown result type (might be due to invalid IL or missing references)
					//IL_0012: Unknown result type (might be due to invalid IL or missing references)
					//IL_002f: 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_003e: Expected O, but got Unknown
					ItemDrop val6 = ResItem(r);
					return (val6 != null) ? new Requirement
					{
						m_amount = (r.amountConfig?.Value ?? r.amount),
						m_resItem = val6,
						m_amountPerLevel = 0
					} : ((Requirement)null);
				});
				List<Requirement> list = dictionary.Values.Where((Requirement v) => v != null).ToList();
				foreach (Requirement item in upgrade.Reqs.Where((Requirement r) => r.itemName != ""))
				{
					if (item.quality > 0)
					{
						ItemDrop val = ResItem(item);
						if (val != null)
						{
							Requirement val2 = new Requirement
							{
								m_resItem = val,
								m_amountPerLevel = (item.amountConfig?.Value ?? item.amount),
								m_amount = 0
							};
							list.Add(val2);
							requirementQuality.Add(val2, new RequirementQuality
							{
								quality = item.quality
							});
						}
						continue;
					}
					if (!dictionary.TryGetValue(item.itemName, out var value) || value == null)
					{
						ItemDrop val3 = ResItem(item);
						if (val3 != null)
						{
							string itemName = item.itemName;
							Requirement val4 = new Requirement
							{
								m_resItem = val3,
								m_amount = 0
							};
							Requirement val5 = val4;
							dictionary[itemName] = val4;
							value = val5;
							list.Add(value);
						}
					}
					if (value != null)
					{
						value.m_amountPerLevel = item.amountConfig?.Value ?? item.amount;
					}
				}
				return list.ToArray();
				ItemDrop? ResItem(Requirement r)
				{
					return fetchByName(objectDB, r.itemName);
				}
			}
		}

		private class SerializedDrop
		{
			public readonly List<DropTarget> Drops;

			public SerializedDrop(List<DropTarget> drops)
			{
				Drops = drops;
			}

			public SerializedDrop(string drops)
			{
				Drops = ((drops == "") ? ((IEnumerable<string>)Array.Empty<string>()) : ((IEnumerable<string>)drops.Split(new char[1] { ',' }))).Select(delegate(string r)
				{
					string[] array = r.Split(new char[1] { ':' });
					if (array.Length <= 2 || !int.TryParse(array[2], out var result))
					{
						result = 1;
					}
					if (array.Length <= 3 || !int.TryParse(array[3], out var result2))
					{
						result2 = result;
					}
					bool levelMultiplier = array.Length <= 4 || array[4] != "0";
					DropTarget result3 = default(DropTarget);
					result3.creature = array[0];
					result3.chance = ((array.Length > 1 && float.TryParse(array[1], out var result4)) ? result4 : 1f);
					result3.min = result;
					result3.max = result2;
					result3.levelMultiplier = levelMultiplier;
					return result3;
				}).ToList();
			}

			public override string ToString()
			{
				return string.Join(",", Drops.Select((DropTarget r) => $"{r.creature}:{r.chance.ToString(CultureInfo.InvariantCulture)}:{r.min}:" + ((r.min == r.max) ? "" : $"{r.max}") + (r.levelMultiplier ? "" : ":0")));
			}

			private static Character? fetchByName(ZNetScene netScene, string name)
			{
				GameObject prefab = netScene.GetPrefab(name);
				Character obj = ((prefab != null) ? prefab.GetComponent<Character>() : null);
				if ((Object)(object)obj == (Object)null)
				{
					Debug.LogWarning((object)("The drop target character '" + name + "' does not exist."));
				}
				return obj;
			}

			public Dictionary<Character, Drop> toCharacterDrops(ZNetScene netScene, GameObject item)
			{
				//IL_002e: Unknown result type (might be due to invalid IL or missing references)
				//IL_0033: Unknown result type (might be due to invalid IL or missing references)
				//IL_003a: Unknown result type (might be due to invalid IL or missing references)
				//IL_0046: Unknown result type (might be due to invalid IL or missing references)
				//IL_0052: Unknown result type (might be due to invalid IL or missing references)
				//IL_005e: Unknown result type (might be due to invalid IL or missing references)
				//IL_006f: Expected O, but got Unknown
				Dictionary<Character, Drop> dictionary = new Dictionary<Character, Drop>();
				foreach (DropTarget drop in Drops)
				{
					Character val = fetchByName(netScene, drop.creature);
					if (val != null)
					{
						dictionary[val] = new Drop
						{
							m_prefab = item,
							m_amountMin = drop.min,
							m_amountMax = drop.max,
							m_chance = drop.chance,
							m_levelMultiplier = drop.levelMultiplier
						};
					}
				}
				return dictionary;
			}
		}

		private static readonly List<Item> registeredItems = new List<Item>();

		private static readonly Dictionary<ItemDrop, Item> itemDropMap = new Dictionary<ItemDrop, Item>();

		private static Dictionary<Item, Dictionary<string, List<Recipe>>> activeRecipes = new Dictionary<Item, Dictionary<string, List<Recipe>>>();

		private static Dictionary<Recipe, ConfigEntryBase?> hiddenCraftRecipes = new Dictionary<Recipe, ConfigEntryBase>();

		private static Dictionary<Recipe, ConfigEntryBase?> hiddenUpgradeRecipes = new Dictionary<Recipe, ConfigEntryBase>();

		private static Dictionary<Item, Dictionary<string, ItemConfig>> itemCraftConfigs = new Dictionary<Item, Dictionary<string, ItemConfig>>();

		private static Dictionary<Item, ConfigEntry<string>> itemDropConfigs = new Dictionary<Item, ConfigEntry<string>>();

		private Dictionary<CharacterDrop, Drop> characterDrops = new Dictionary<CharacterDrop, Drop>();

		private readonly Dictionary<ConfigEntryBase, Action> statsConfigs = new Dictionary<ConfigEntryBase, Action>();

		private static readonly ConditionalWeakTable<Requirement, RequirementQuality> requirementQuality = new ConditionalWeakTable<Requirement, RequirementQuality>();

		public static Configurability DefaultConfigurability = Configurability.Full;

		public Configurability? Configurable;

		private Configurability configurationVisible = Configurability.Full;

		private TraderConfig? traderConfig;

		public readonly GameObject Prefab;

		[Description("Specifies the maximum required crafting station level to upgrade and repair the item.\nDefault is calculated from crafting station level and maximum quality.")]
		public int MaximumRequiredStationLevel = int.MaxValue;

		[Description("Assigns the item as a drop item to a creature.\nUses a creature name, a drop chance and a minimum and maximum amount.")]
		public readonly DropTargets DropsFrom = new DropTargets();

		[Description("Configures whether the item can be bought at the trader.\nDon't forget to set cost to something above 0 or the item will be sold for free.")]
		public readonly Trade Trade = new Trade();

		internal List<Conversion> Conversions = new List<Conversion>();

		internal List<ItemConversion> conversions = new List<ItemConversion>();

		public Dictionary<string, ItemRecipe> Recipes = new Dictionary<string, ItemRecipe>();

		private LocalizeKey? _name;

		private LocalizeKey? _description;

		private static object? configManager;

		private static Localization? _english;

		private static BaseUnityPlugin? _plugin;

		private static bool hasConfigSync = true;

		private static object? _configSync;