Decompiled source of JousToonOutline v1.1.0

GDWeave/mods/Jous.ToonOutline/Jous.ToonOutline.data.dll

Decompiled 2 months ago
using System;
using System.Collections;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.ConstrainedExecution;
using System.Runtime.InteropServices;
using System.Runtime.Serialization;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using System.Text.Json.Serialization;
using System.Threading;
using <CppImplementationDetails>;
using <CrtImplementationDetails>;
using Jous.ToonOutline;

[assembly: SecurityRules(SecurityRuleSet.Level1)]
[assembly: TargetFramework(".NETCoreApp,Version=v8.0", FrameworkDisplayName = ".NET 8.0")]
[assembly: AssemblyVersion("0.0.0.0")]
internal class <Module>
{
	public unsafe static delegate*<long, void> __m2mep@?RunMod@@$$J0YAX_J@Z/* Not supported: data(02 00 00 06 00 00 00 00) */;

	public unsafe static delegate*<void> __m2mep@?StopMod@@$$J0YAXXZ/* Not supported: data(03 00 00 06 00 00 00 00) */;

	internal static __s_GUID _GUID_cb2f6723_ab3a_11d2_9c40_00c04fa30a3e/* Not supported: data(23 67 2F CB 3A AB D2 11 9C 40 00 C0 4F A3 0A 3E) */;

	internal static __s_GUID _GUID_cb2f6722_ab3a_11d2_9c40_00c04fa30a3e/* Not supported: data(22 67 2F CB 3A AB D2 11 9C 40 00 C0 4F A3 0A 3E) */;

	[FixedAddressValueType]
	internal static int ?Uninitialized@CurrentDomain@<CrtImplementationDetails>@@$$Q2HA;

	internal unsafe static delegate*<void> ?A0xeb4f7d22.?Uninitialized$initializer$@CurrentDomain@<CrtImplementationDetails>@@$$Q2P6MXXZEA/* Not supported: data(16 00 00 06 00 00 00 00) */;

	[FixedAddressValueType]
	internal static Progress ?InitializedNative@CurrentDomain@<CrtImplementationDetails>@@$$Q2W4Progress@2@A;

	internal unsafe static delegate*<void> ?A0xeb4f7d22.?InitializedNative$initializer$@CurrentDomain@<CrtImplementationDetails>@@$$Q2P6MXXZEA/* Not supported: data(19 00 00 06 00 00 00 00) */;

	internal static __s_GUID _GUID_90f1a06c_7712_4762_86b5_7a5eba6bdb02/* Not supported: data(6C A0 F1 90 12 77 62 47 86 B5 7A 5E BA 6B DB 02) */;

	internal static __s_GUID _GUID_90f1a06e_7712_4762_86b5_7a5eba6bdb02/* Not supported: data(6E A0 F1 90 12 77 62 47 86 B5 7A 5E BA 6B DB 02) */;

	[FixedAddressValueType]
	internal static Progress ?InitializedPerAppDomain@CurrentDomain@<CrtImplementationDetails>@@$$Q2W4Progress@2@A;

	internal static bool ?Entered@DefaultDomain@<CrtImplementationDetails>@@2_NA/* Not supported: data(00) */;

	internal static TriBool ?hasNative@DefaultDomain@<CrtImplementationDetails>@@0W4TriBool@2@A/* Not supported: data() */;

	internal static bool ?InitializedPerProcess@DefaultDomain@<CrtImplementationDetails>@@2_NA/* Not supported: data(00) */;

	internal static int ?Count@AllDomains@<CrtImplementationDetails>@@2HA/* Not supported: data(00 00 00 00) */;

	[FixedAddressValueType]
	internal static int ?Initialized@CurrentDomain@<CrtImplementationDetails>@@$$Q2HA;

	internal static bool ?InitializedNativeFromCCTOR@DefaultDomain@<CrtImplementationDetails>@@2_NA/* Not supported: data(00) */;

	[FixedAddressValueType]
	internal static bool ?IsDefaultDomain@CurrentDomain@<CrtImplementationDetails>@@$$Q2_NA;

	[FixedAddressValueType]
	internal static Progress ?InitializedVtables@CurrentDomain@<CrtImplementationDetails>@@$$Q2W4Progress@2@A;

	internal static bool ?InitializedNative@DefaultDomain@<CrtImplementationDetails>@@2_NA/* Not supported: data(00) */;

	[FixedAddressValueType]
	internal static Progress ?InitializedPerProcess@CurrentDomain@<CrtImplementationDetails>@@$$Q2W4Progress@2@A;

	internal static TriBool ?hasPerProcess@DefaultDomain@<CrtImplementationDetails>@@0W4TriBool@2@A/* Not supported: data() */;

	internal static $ArrayType$$$BY00Q6MPEBXXZ __xc_mp_z/* Not supported: data(00 00 00 00 00 00 00 00) */;

	internal static $ArrayType$$$BY00Q6MPEBXXZ __xi_vt_z/* Not supported: data(00 00 00 00 00 00 00 00) */;

	internal unsafe static delegate*<void> ?A0xeb4f7d22.?InitializedPerProcess$initializer$@CurrentDomain@<CrtImplementationDetails>@@$$Q2P6MXXZEA/* Not supported: data(1A 00 00 06 00 00 00 00) */;

	internal static $ArrayType$$$BY00Q6MPEBXXZ __xc_ma_a/* Not supported: data(00 00 00 00 00 00 00 00) */;

	internal static $ArrayType$$$BY00Q6MPEBXXZ __xc_ma_z/* Not supported: data(00 00 00 00 00 00 00 00) */;

	internal unsafe static delegate*<void> ?A0xeb4f7d22.?InitializedPerAppDomain$initializer$@CurrentDomain@<CrtImplementationDetails>@@$$Q2P6MXXZEA/* Not supported: data(1B 00 00 06 00 00 00 00) */;

	internal static $ArrayType$$$BY00Q6MPEBXXZ __xi_vt_a/* Not supported: data(00 00 00 00 00 00 00 00) */;

	internal unsafe static delegate*<void> ?A0xeb4f7d22.?Initialized$initializer$@CurrentDomain@<CrtImplementationDetails>@@$$Q2P6MXXZEA/* Not supported: data(15 00 00 06 00 00 00 00) */;

	internal static $ArrayType$$$BY00Q6MPEBXXZ __xc_mp_a/* Not supported: data(00 00 00 00 00 00 00 00) */;

	internal unsafe static delegate*<void> ?A0xeb4f7d22.?InitializedVtables$initializer$@CurrentDomain@<CrtImplementationDetails>@@$$Q2P6MXXZEA/* Not supported: data(18 00 00 06 00 00 00 00) */;

	internal unsafe static delegate*<void> ?A0xeb4f7d22.?IsDefaultDomain$initializer$@CurrentDomain@<CrtImplementationDetails>@@$$Q2P6MXXZEA/* Not supported: data(17 00 00 06 00 00 00 00) */;

	public unsafe static delegate*<void*, int> __m2mep@?DoNothing@DefaultDomain@<CrtImplementationDetails>@@$$FCAJPEAX@Z/* Not supported: data(0F 00 00 06 00 00 00 00) */;

	public unsafe static delegate*<void*, int> __m2mep@?_UninitializeDefaultDomain@LanguageSupport@<CrtImplementationDetails>@@$$FCAJPEAX@Z/* Not supported: data(24 00 00 06 00 00 00 00) */;

	public unsafe static int** __unep@?DoNothing@DefaultDomain@<CrtImplementationDetails>@@$$FCAJPEAX@Z/* Not supported: data(20 40 00 80 01 00 00 00) */;

	public unsafe static int** __unep@?_UninitializeDefaultDomain@LanguageSupport@<CrtImplementationDetails>@@$$FCAJPEAX@Z/* Not supported: data(30 40 00 80 01 00 00 00) */;

	internal unsafe static delegate*<void>* ?A0xdf32f105.__onexitbegin_m/*Field data (rva=0xd2f0) could not be foundin any section!*/;

	internal static ulong ?A0xdf32f105.__exit_list_size/*Field data (rva=0xd2e8) could not be foundin any section!*/;

	[FixedAddressValueType]
	internal unsafe static delegate*<void>* __onexitend_app_domain;

	[FixedAddressValueType]
	internal unsafe static void* ?_lock@AtExitLock@<CrtImplementationDetails>@@$$Q0PEAXEA;

	[FixedAddressValueType]
	internal static int ?_ref_count@AtExitLock@<CrtImplementationDetails>@@$$Q0HA;

	internal unsafe static delegate*<void>* ?A0xdf32f105.__onexitend_m/*Field data (rva=0xd2f8) could not be foundin any section!*/;

	[FixedAddressValueType]
	internal static ulong __exit_list_size_app_domain;

	[FixedAddressValueType]
	internal unsafe static delegate*<void>* __onexitbegin_app_domain;

	internal static $ArrayType$$$BY0A@P6AHXZ __xi_z/* Not supported: data(00) */;

	internal static __scrt_native_startup_state __scrt_current_native_startup_state/* Not supported: data() */;

	internal unsafe static void* __scrt_native_startup_lock/* Not supported: data(00 00 00 00 00 00 00 00) */;

	internal static $ArrayType$$$BY0A@P6AXXZ __xc_a/* Not supported: data(00) */;

	internal static $ArrayType$$$BY0A@P6AHXZ __xi_a/* Not supported: data(00) */;

	internal static uint __scrt_native_dllmain_reason/* Not supported: data(FF FF FF FF) */;

	internal static $ArrayType$$$BY0A@P6AXXZ __xc_z/* Not supported: data(00) */;

	internal static void Jous.ToonOutline.Logger.?A0x71d38344.Information(string Str)
	{
		Type[] array = new Type[1];
		Type typeFromHandle = typeof(string);
		array[0] = typeFromHandle;
		Type type = Vars.logger.GetType();
		string name = "Information";
		type.GetMethod(name, array).Invoke(parameters: new object[1] { Str }, obj: Vars.logger);
	}

	internal static void RunMod(long ptr)
	{
		nint value = new IntPtr(ptr);
		Vars.modInterface = GCHandle.FromIntPtr(value).Target;
		Type type = Vars.modInterface.GetType();
		string name = "Logger";
		Vars.logger = type.GetProperty(name, BindingFlags.Instance | BindingFlags.Public).GetValue(Vars.modInterface);
		Vars.Mod = new Main();
	}

	internal static void StopMod()
	{
		if (Vars.Mod != null)
		{
			((IDisposable)Vars.Mod)?.Dispose();
		}
	}

	internal static Main.Config Jous.ToonOutline.ImodInterface.?A0x71d38344.ReadConfig<class Main::Config ^>()
	{
		Type type = Vars.modInterface.GetType();
		string name = "ReadConfig";
		MethodInfo? method = type.GetMethod(name);
		Type[] array = new Type[1];
		Type typeFromHandle = typeof(Main.Config);
		array[0] = typeFromHandle;
		return (Main.Config)method.MakeGenericMethod(array).Invoke(Vars.modInterface, null);
	}

	internal static void <CrtImplementationDetails>.ThrowNestedModuleLoadException(Exception innerException, Exception nestedException)
	{
		throw new ModuleLoadExceptionHandlerException("A nested exception occurred after the primary exception that caused the C++ module to fail to load.\n", innerException, nestedException);
	}

	internal static void <CrtImplementationDetails>.ThrowModuleLoadException(string errorMessage)
	{
		throw new ModuleLoadException(errorMessage);
	}

	internal static void <CrtImplementationDetails>.ThrowModuleLoadException(string errorMessage, Exception innerException)
	{
		throw new ModuleLoadException(errorMessage, innerException);
	}

	internal static void <CrtImplementationDetails>.RegisterModuleUninitializer(EventHandler handler)
	{
		ModuleUninitializer._ModuleUninitializer.AddHandler(handler);
	}

	[SecuritySafeCritical]
	internal unsafe static Guid <CrtImplementationDetails>.FromGUID(_GUID* guid)
	{
		return new Guid(*(uint*)guid, *(ushort*)((ulong)(nint)guid + 4uL), *(ushort*)((ulong)(nint)guid + 6uL), *(byte*)((ulong)(nint)guid + 8uL), *(byte*)((ulong)(nint)guid + 9uL), *(byte*)((ulong)(nint)guid + 10uL), *(byte*)((ulong)(nint)guid + 11uL), *(byte*)((ulong)(nint)guid + 12uL), *(byte*)((ulong)(nint)guid + 13uL), *(byte*)((ulong)(nint)guid + 14uL), *(byte*)((ulong)(nint)guid + 15uL));
	}

	[SecurityCritical]
	internal unsafe static int __get_default_appdomain(IUnknown** ppUnk)
	{
		//IL_0003: Expected I, but got I8
		//IL_0050: Expected I, but got I8
		//IL_005e: Expected I, but got I8
		ICorRuntimeHost* ptr = null;
		int num;
		try
		{
			Guid guid = <CrtImplementationDetails>.FromGUID((_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _GUID_cb2f6722_ab3a_11d2_9c40_00c04fa30a3e));
			Guid guid2 = guid;
			Guid guid3 = <CrtImplementationDetails>.FromGUID((_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _GUID_cb2f6723_ab3a_11d2_9c40_00c04fa30a3e));
			Guid guid4 = guid3;
			ptr = (ICorRuntimeHost*)((IntPtr)RuntimeEnvironment.GetRuntimeInterfaceAsIntPtr(guid3, guid)).ToPointer();
		}
		catch (Exception e)
		{
			num = Marshal.GetHRForException(e);
			goto IL_003a;
		}
		goto IL_003e;
		IL_003a:
		if (num >= 0)
		{
			goto IL_003e;
		}
		goto IL_005f;
		IL_003e:
		long num2 = *(long*)(*(long*)ptr + 104);
		num = ((delegate* unmanaged[Cdecl, Cdecl]<nint, IUnknown**, int>)num2)((nint)ptr, ppUnk);
		ICorRuntimeHost* intPtr = ptr;
		((delegate* unmanaged[Cdecl, Cdecl]<nint, uint>)(*(ulong*)(*(long*)intPtr + 16)))((nint)intPtr);
		goto IL_005f;
		IL_005f:
		return num;
	}

	internal unsafe static void __release_appdomain(IUnknown* ppUnk)
	{
		//IL_000d: Expected I, but got I8
		((delegate* unmanaged[Cdecl, Cdecl]<nint, uint>)(*(ulong*)(*(long*)ppUnk + 16)))((nint)ppUnk);
	}

	[SecurityCritical]
	internal unsafe static AppDomain <CrtImplementationDetails>.GetDefaultDomain()
	{
		//IL_0003: Expected I, but got I8
		IUnknown* ptr = null;
		int num = __get_default_appdomain(&ptr);
		if (num >= 0)
		{
			try
			{
				nint pUnk = new IntPtr(ptr);
				return (AppDomain)Marshal.GetObjectForIUnknown(pUnk);
			}
			finally
			{
				__release_appdomain(ptr);
			}
		}
		Marshal.ThrowExceptionForHR(num);
		return null;
	}

	[SecurityCritical]
	internal unsafe static void <CrtImplementationDetails>.DoCallBackInDefaultDomain(delegate* unmanaged[Cdecl, Cdecl]<void*, int> function, void* cookie)
	{
		//IL_005e: Expected I, but got I8
		//IL_0044: Expected I, but got I8
		Guid riid = <CrtImplementationDetails>.FromGUID((_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _GUID_90f1a06c_7712_4762_86b5_7a5eba6bdb02));
		ICLRRuntimeHost* ptr = (ICLRRuntimeHost*)((IntPtr)RuntimeEnvironment.GetRuntimeInterfaceAsIntPtr(<CrtImplementationDetails>.FromGUID((_GUID*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _GUID_90f1a06e_7712_4762_86b5_7a5eba6bdb02)), riid)).ToPointer();
		try
		{
			AppDomain appDomain = <CrtImplementationDetails>.GetDefaultDomain();
			long num = *(long*)(*(long*)ptr + 64);
			uint id = (uint)appDomain.Id;
			int num2 = ((delegate* unmanaged[Cdecl, Cdecl]<nint, uint, delegate* unmanaged[Cdecl, Cdecl]<void*, int>, void*, int>)num)((nint)ptr, id, function, cookie);
			if (num2 < 0)
			{
				Marshal.ThrowExceptionForHR(num2);
			}
		}
		finally
		{
			((delegate* unmanaged[Cdecl, Cdecl]<nint, uint>)(*(ulong*)(*(long*)ptr + 16)))((nint)ptr);
		}
	}

	[return: MarshalAs(UnmanagedType.U1)]
	internal static bool __scrt_is_safe_for_managed_code()
	{
		uint _scrt_native_dllmain_reason = __scrt_native_dllmain_reason;
		if (_scrt_native_dllmain_reason != 0 && _scrt_native_dllmain_reason != 1)
		{
			return true;
		}
		return false;
	}

	[SecuritySafeCritical]
	internal unsafe static int <CrtImplementationDetails>.DefaultDomain.DoNothing(void* cookie)
	{
		GC.KeepAlive(int.MaxValue);
		return 0;
	}

	[SecuritySafeCritical]
	[return: MarshalAs(UnmanagedType.U1)]
	internal unsafe static bool <CrtImplementationDetails>.DefaultDomain.HasPerProcess()
	{
		//IL_0023: Expected I, but got I8
		if (?hasPerProcess@DefaultDomain@<CrtImplementationDetails>@@0W4TriBool@2@A == (TriBool)2)
		{
			void** ptr = (void**)System.Runtime.CompilerServices.Unsafe.AsPointer(ref __xc_mp_a);
			if (System.Runtime.CompilerServices.Unsafe.IsAddressLessThan(ref __xc_mp_a, ref __xc_mp_z))
			{
				do
				{
					if (*(long*)ptr == 0L)
					{
						ptr = (void**)((ulong)(nint)ptr + 8uL);
						continue;
					}
					?hasPerProcess@DefaultDomain@<CrtImplementationDetails>@@0W4TriBool@2@A = (TriBool)(-1);
					return true;
				}
				while (ptr < System.Runtime.CompilerServices.Unsafe.AsPointer(ref __xc_mp_z));
			}
			?hasPerProcess@DefaultDomain@<CrtImplementationDetails>@@0W4TriBool@2@A = (TriBool)0;
			return false;
		}
		return ?hasPerProcess@DefaultDomain@<CrtImplementationDetails>@@0W4TriBool@2@A == (TriBool)(-1);
	}

	[SecuritySafeCritical]
	[return: MarshalAs(UnmanagedType.U1)]
	internal unsafe static bool <CrtImplementationDetails>.DefaultDomain.HasNative()
	{
		//IL_0023: Expected I, but got I8
		//IL_0050: Expected I, but got I8
		if (?hasNative@DefaultDomain@<CrtImplementationDetails>@@0W4TriBool@2@A == (TriBool)2)
		{
			void** ptr = (void**)System.Runtime.CompilerServices.Unsafe.AsPointer(ref __xi_a);
			if (System.Runtime.CompilerServices.Unsafe.IsAddressLessThan(ref __xi_a, ref __xi_z))
			{
				do
				{
					if (*(long*)ptr == 0L)
					{
						ptr = (void**)((ulong)(nint)ptr + 8uL);
						continue;
					}
					?hasNative@DefaultDomain@<CrtImplementationDetails>@@0W4TriBool@2@A = (TriBool)(-1);
					return true;
				}
				while (ptr < System.Runtime.CompilerServices.Unsafe.AsPointer(ref __xi_z));
			}
			void** ptr2 = (void**)System.Runtime.CompilerServices.Unsafe.AsPointer(ref __xc_a);
			if (System.Runtime.CompilerServices.Unsafe.IsAddressLessThan(ref __xc_a, ref __xc_z))
			{
				do
				{
					if (*(long*)ptr2 == 0L)
					{
						ptr2 = (void**)((ulong)(nint)ptr2 + 8uL);
						continue;
					}
					?hasNative@DefaultDomain@<CrtImplementationDetails>@@0W4TriBool@2@A = (TriBool)(-1);
					return true;
				}
				while (ptr2 < System.Runtime.CompilerServices.Unsafe.AsPointer(ref __xc_z));
			}
			?hasNative@DefaultDomain@<CrtImplementationDetails>@@0W4TriBool@2@A = (TriBool)0;
			return false;
		}
		return ?hasNative@DefaultDomain@<CrtImplementationDetails>@@0W4TriBool@2@A == (TriBool)(-1);
	}

	[SecuritySafeCritical]
	[return: MarshalAs(UnmanagedType.U1)]
	internal static bool <CrtImplementationDetails>.DefaultDomain.NeedsInitialization()
	{
		int num = (((<CrtImplementationDetails>.DefaultDomain.HasPerProcess() && !?InitializedPerProcess@DefaultDomain@<CrtImplementationDetails>@@2_NA) || (<CrtImplementationDetails>.DefaultDomain.HasNative() && !?InitializedNative@DefaultDomain@<CrtImplementationDetails>@@2_NA && __scrt_current_native_startup_state == (__scrt_native_startup_state)0)) ? 1 : 0);
		return (byte)num != 0;
	}

	[return: MarshalAs(UnmanagedType.U1)]
	internal static bool <CrtImplementationDetails>.DefaultDomain.NeedsUninitialization()
	{
		return ?Entered@DefaultDomain@<CrtImplementationDetails>@@2_NA;
	}

	[SecurityCritical]
	internal unsafe static void <CrtImplementationDetails>.DefaultDomain.Initialize()
	{
		//IL_000c: Expected I, but got I8
		<CrtImplementationDetails>.DoCallBackInDefaultDomain((delegate* unmanaged[Cdecl, Cdecl]<void*, int>)__unep@?DoNothing@DefaultDomain@<CrtImplementationDetails>@@$$FCAJPEAX@Z, null);
	}

	internal static void ?A0xeb4f7d22.??__E?Initialized@CurrentDomain@<CrtImplementationDetails>@@$$Q2HA@@YMXXZ()
	{
		?Initialized@CurrentDomain@<CrtImplementationDetails>@@$$Q2HA = 0;
	}

	internal static void ?A0xeb4f7d22.??__E?Uninitialized@CurrentDomain@<CrtImplementationDetails>@@$$Q2HA@@YMXXZ()
	{
		?Uninitialized@CurrentDomain@<CrtImplementationDetails>@@$$Q2HA = 0;
	}

	internal static void ?A0xeb4f7d22.??__E?IsDefaultDomain@CurrentDomain@<CrtImplementationDetails>@@$$Q2_NA@@YMXXZ()
	{
		?IsDefaultDomain@CurrentDomain@<CrtImplementationDetails>@@$$Q2_NA = false;
	}

	internal static void ?A0xeb4f7d22.??__E?InitializedVtables@CurrentDomain@<CrtImplementationDetails>@@$$Q2W4Progress@2@A@@YMXXZ()
	{
		?InitializedVtables@CurrentDomain@<CrtImplementationDetails>@@$$Q2W4Progress@2@A = (Progress)0;
	}

	internal static void ?A0xeb4f7d22.??__E?InitializedNative@CurrentDomain@<CrtImplementationDetails>@@$$Q2W4Progress@2@A@@YMXXZ()
	{
		?InitializedNative@CurrentDomain@<CrtImplementationDetails>@@$$Q2W4Progress@2@A = (Progress)0;
	}

	internal static void ?A0xeb4f7d22.??__E?InitializedPerProcess@CurrentDomain@<CrtImplementationDetails>@@$$Q2W4Progress@2@A@@YMXXZ()
	{
		?InitializedPerProcess@CurrentDomain@<CrtImplementationDetails>@@$$Q2W4Progress@2@A = (Progress)0;
	}

	internal static void ?A0xeb4f7d22.??__E?InitializedPerAppDomain@CurrentDomain@<CrtImplementationDetails>@@$$Q2W4Progress@2@A@@YMXXZ()
	{
		?InitializedPerAppDomain@CurrentDomain@<CrtImplementationDetails>@@$$Q2W4Progress@2@A = (Progress)0;
	}

	[SecuritySafeCritical]
	[DebuggerStepThrough]
	internal unsafe static void <CrtImplementationDetails>.LanguageSupport.InitializeVtables(LanguageSupport* P_0)
	{
		gcroot<System::String ^>.=((gcroot<System::String ^>*)P_0, "The C++ module failed to load during vtable initialization.\n");
		?InitializedVtables@CurrentDomain@<CrtImplementationDetails>@@$$Q2W4Progress@2@A = (Progress)1;
		_initterm_m((delegate*<void*>*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref __xi_vt_a), (delegate*<void*>*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref __xi_vt_z));
		?InitializedVtables@CurrentDomain@<CrtImplementationDetails>@@$$Q2W4Progress@2@A = (Progress)2;
	}

	[SecuritySafeCritical]
	internal unsafe static void <CrtImplementationDetails>.LanguageSupport.InitializeDefaultAppDomain(LanguageSupport* P_0)
	{
		gcroot<System::String ^>.=((gcroot<System::String ^>*)P_0, "The C++ module failed to load while attempting to initialize the default appdomain.\n");
		<CrtImplementationDetails>.DefaultDomain.Initialize();
	}

	[SecuritySafeCritical]
	[DebuggerStepThrough]
	internal unsafe static void <CrtImplementationDetails>.LanguageSupport.InitializeNative(LanguageSupport* P_0)
	{
		gcroot<System::String ^>.=((gcroot<System::String ^>*)P_0, "The C++ module failed to load during native initialization.\n");
		__security_init_cookie();
		?InitializedNative@DefaultDomain@<CrtImplementationDetails>@@2_NA = true;
		if (!__scrt_is_safe_for_managed_code())
		{
			abort();
		}
		if (__scrt_current_native_startup_state == (__scrt_native_startup_state)1)
		{
			abort();
		}
		if (__scrt_current_native_startup_state == (__scrt_native_startup_state)0)
		{
			?InitializedNative@CurrentDomain@<CrtImplementationDetails>@@$$Q2W4Progress@2@A = (Progress)1;
			__scrt_current_native_startup_state = (__scrt_native_startup_state)1;
			if (_initterm_e((delegate* unmanaged[Cdecl, Cdecl]<int>*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref __xi_a), (delegate* unmanaged[Cdecl, Cdecl]<int>*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref __xi_z)) != 0)
			{
				<CrtImplementationDetails>.ThrowModuleLoadException(gcroot<System::String ^>..PE$AAVString@System@@((gcroot<System::String ^>*)P_0));
			}
			_initterm((delegate* unmanaged[Cdecl, Cdecl]<void>*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref __xc_a), (delegate* unmanaged[Cdecl, Cdecl]<void>*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref __xc_z));
			__scrt_current_native_startup_state = (__scrt_native_startup_state)2;
			?InitializedNativeFromCCTOR@DefaultDomain@<CrtImplementationDetails>@@2_NA = true;
			?InitializedNative@CurrentDomain@<CrtImplementationDetails>@@$$Q2W4Progress@2@A = (Progress)2;
		}
	}

	[SecurityCritical]
	[DebuggerStepThrough]
	internal unsafe static void <CrtImplementationDetails>.LanguageSupport.InitializePerProcess(LanguageSupport* P_0)
	{
		gcroot<System::String ^>.=((gcroot<System::String ^>*)P_0, "The C++ module failed to load during process initialization.\n");
		?InitializedPerProcess@CurrentDomain@<CrtImplementationDetails>@@$$Q2W4Progress@2@A = (Progress)1;
		_initatexit_m();
		_initterm_m((delegate*<void*>*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref __xc_mp_a), (delegate*<void*>*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref __xc_mp_z));
		?InitializedPerProcess@CurrentDomain@<CrtImplementationDetails>@@$$Q2W4Progress@2@A = (Progress)2;
		?InitializedPerProcess@DefaultDomain@<CrtImplementationDetails>@@2_NA = true;
	}

	[DebuggerStepThrough]
	[SecurityCritical]
	internal unsafe static void <CrtImplementationDetails>.LanguageSupport.InitializePerAppDomain(LanguageSupport* P_0)
	{
		gcroot<System::String ^>.=((gcroot<System::String ^>*)P_0, "The C++ module failed to load during appdomain initialization.\n");
		?InitializedPerAppDomain@CurrentDomain@<CrtImplementationDetails>@@$$Q2W4Progress@2@A = (Progress)1;
		_initatexit_app_domain();
		_initterm_m((delegate*<void*>*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref __xc_ma_a), (delegate*<void*>*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref __xc_ma_z));
		?InitializedPerAppDomain@CurrentDomain@<CrtImplementationDetails>@@$$Q2W4Progress@2@A = (Progress)2;
	}

	[SecurityCritical]
	[DebuggerStepThrough]
	internal unsafe static void <CrtImplementationDetails>.LanguageSupport.InitializeUninitializer(LanguageSupport* P_0)
	{
		gcroot<System::String ^>.=((gcroot<System::String ^>*)P_0, "The C++ module failed to load during registration for the unload events.\n");
		<CrtImplementationDetails>.RegisterModuleUninitializer([PrePrepareMethod] [SecurityCritical] [ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)] (object A_0, EventArgs A_1) =>
		{
			if (?Initialized@CurrentDomain@<CrtImplementationDetails>@@$$Q2HA != 0 && Interlocked.Exchange(ref ?Uninitialized@CurrentDomain@<CrtImplementationDetails>@@$$Q2HA, 1) == 0)
			{
				bool num = Interlocked.Decrement(ref ?Count@AllDomains@<CrtImplementationDetails>@@2HA) == 0;
				<CrtImplementationDetails>.LanguageSupport.UninitializeAppDomain();
				if (num)
				{
					<CrtImplementationDetails>.LanguageSupport.UninitializeDefaultDomain();
				}
			}
		});
	}

	[SecurityCritical]
	[DebuggerStepThrough]
	[ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
	internal unsafe static void <CrtImplementationDetails>.LanguageSupport._Initialize(LanguageSupport* P_0)
	{
		//IL_0041: Expected I8, but got I
		//IL_0042: Expected I, but got I8
		?IsDefaultDomain@CurrentDomain@<CrtImplementationDetails>@@$$Q2_NA = AppDomain.CurrentDomain.IsDefaultAppDomain();
		if (?IsDefaultDomain@CurrentDomain@<CrtImplementationDetails>@@$$Q2_NA)
		{
			?Entered@DefaultDomain@<CrtImplementationDetails>@@2_NA = true;
		}
		void* ptr = _getFiberPtrId();
		int num = 0;
		int num2 = 0;
		int num3 = 0;
		RuntimeHelpers.PrepareConstrainedRegions();
		try
		{
			while (num2 == 0)
			{
				try
				{
				}
				finally
				{
					void* ptr2 = (void*)Interlocked.CompareExchange(ref System.Runtime.CompilerServices.Unsafe.As<void*, long>(ref __scrt_native_startup_lock), (nint)ptr, 0L);
					if (ptr2 == null)
					{
						num2 = 1;
					}
					else if (ptr2 == ptr)
					{
						num = 1;
						num2 = 1;
					}
				}
				if (num2 == 0)
				{
					Sleep(1000u);
				}
			}
			<CrtImplementationDetails>.LanguageSupport.InitializeVtables(P_0);
			if (?IsDefaultDomain@CurrentDomain@<CrtImplementationDetails>@@$$Q2_NA)
			{
				<CrtImplementationDetails>.LanguageSupport.InitializeNative(P_0);
				<CrtImplementationDetails>.LanguageSupport.InitializePerProcess(P_0);
			}
			else
			{
				num3 = (<CrtImplementationDetails>.DefaultDomain.NeedsInitialization() ? 1 : num3);
			}
		}
		finally
		{
			if (num == 0)
			{
				Interlocked.Exchange(ref System.Runtime.CompilerServices.Unsafe.As<void*, long>(ref __scrt_native_startup_lock), 0L);
			}
		}
		if (num3 != 0)
		{
			<CrtImplementationDetails>.LanguageSupport.InitializeDefaultAppDomain(P_0);
		}
		<CrtImplementationDetails>.LanguageSupport.InitializePerAppDomain(P_0);
		?Initialized@CurrentDomain@<CrtImplementationDetails>@@$$Q2HA = 1;
		<CrtImplementationDetails>.LanguageSupport.InitializeUninitializer(P_0);
	}

	[SecurityCritical]
	internal static void <CrtImplementationDetails>.LanguageSupport.UninitializeAppDomain()
	{
		_app_exit_callback();
	}

	[SecurityCritical]
	internal unsafe static int <CrtImplementationDetails>.LanguageSupport._UninitializeDefaultDomain(void* cookie)
	{
		_exit_callback();
		?InitializedPerProcess@DefaultDomain@<CrtImplementationDetails>@@2_NA = false;
		if (?InitializedNativeFromCCTOR@DefaultDomain@<CrtImplementationDetails>@@2_NA)
		{
			_cexit();
			__scrt_current_native_startup_state = (__scrt_native_startup_state)0;
			?InitializedNativeFromCCTOR@DefaultDomain@<CrtImplementationDetails>@@2_NA = false;
		}
		?InitializedNative@DefaultDomain@<CrtImplementationDetails>@@2_NA = false;
		return 0;
	}

	[SecurityCritical]
	internal unsafe static void <CrtImplementationDetails>.LanguageSupport.UninitializeDefaultDomain()
	{
		//IL_0029: Expected I, but got I8
		//IL_001a: Expected I, but got I8
		if (<CrtImplementationDetails>.DefaultDomain.NeedsUninitialization())
		{
			if (AppDomain.CurrentDomain.IsDefaultAppDomain())
			{
				<CrtImplementationDetails>.LanguageSupport._UninitializeDefaultDomain(null);
			}
			else
			{
				<CrtImplementationDetails>.DoCallBackInDefaultDomain((delegate* unmanaged[Cdecl, Cdecl]<void*, int>)__unep@?_UninitializeDefaultDomain@LanguageSupport@<CrtImplementationDetails>@@$$FCAJPEAX@Z, null);
			}
		}
	}

	[PrePrepareMethod]
	[SecurityCritical]
	[ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
	internal static void <CrtImplementationDetails>.LanguageSupport.DomainUnload(object A_0, EventArgs A_1)
	{
		if (?Initialized@CurrentDomain@<CrtImplementationDetails>@@$$Q2HA != 0 && Interlocked.Exchange(ref ?Uninitialized@CurrentDomain@<CrtImplementationDetails>@@$$Q2HA, 1) == 0)
		{
			bool num = Interlocked.Decrement(ref ?Count@AllDomains@<CrtImplementationDetails>@@2HA) == 0;
			<CrtImplementationDetails>.LanguageSupport.UninitializeAppDomain();
			if (num)
			{
				<CrtImplementationDetails>.LanguageSupport.UninitializeDefaultDomain();
			}
		}
	}

	[SecurityCritical]
	[DebuggerStepThrough]
	[ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
	internal unsafe static void <CrtImplementationDetails>.LanguageSupport.Cleanup(LanguageSupport* P_0, Exception innerException)
	{
		try
		{
			bool flag = Interlocked.Decrement(ref ?Count@AllDomains@<CrtImplementationDetails>@@2HA) == 0;
			<CrtImplementationDetails>.LanguageSupport.UninitializeAppDomain();
			if (flag)
			{
				<CrtImplementationDetails>.LanguageSupport.UninitializeDefaultDomain();
			}
		}
		catch (Exception nestedException)
		{
			<CrtImplementationDetails>.ThrowNestedModuleLoadException(innerException, nestedException);
		}
		catch
		{
			<CrtImplementationDetails>.ThrowNestedModuleLoadException(innerException, null);
		}
	}

	[SecurityCritical]
	internal unsafe static LanguageSupport* <CrtImplementationDetails>.LanguageSupport.{ctor}(LanguageSupport* P_0)
	{
		gcroot<System::String ^>.{ctor}((gcroot<System::String ^>*)P_0);
		return P_0;
	}

	[SecurityCritical]
	internal unsafe static void <CrtImplementationDetails>.LanguageSupport.{dtor}(LanguageSupport* P_0)
	{
		gcroot<System::String ^>.{dtor}((gcroot<System::String ^>*)P_0);
	}

	[DebuggerStepThrough]
	[ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
	[SecurityCritical]
	internal unsafe static void <CrtImplementationDetails>.LanguageSupport.Initialize(LanguageSupport* P_0)
	{
		bool flag = false;
		RuntimeHelpers.PrepareConstrainedRegions();
		try
		{
			gcroot<System::String ^>.=((gcroot<System::String ^>*)P_0, "The C++ module failed to load.\n");
			RuntimeHelpers.PrepareConstrainedRegions();
			try
			{
			}
			finally
			{
				Interlocked.Increment(ref ?Count@AllDomains@<CrtImplementationDetails>@@2HA);
				flag = true;
			}
			<CrtImplementationDetails>.LanguageSupport._Initialize(P_0);
		}
		catch (Exception innerException)
		{
			if (flag)
			{
				<CrtImplementationDetails>.LanguageSupport.Cleanup(P_0, innerException);
			}
			<CrtImplementationDetails>.ThrowModuleLoadException(gcroot<System::String ^>..PE$AAVString@System@@((gcroot<System::String ^>*)P_0), innerException);
		}
		catch
		{
			if (flag)
			{
				<CrtImplementationDetails>.LanguageSupport.Cleanup(P_0, null);
			}
			<CrtImplementationDetails>.ThrowModuleLoadException(gcroot<System::String ^>..PE$AAVString@System@@((gcroot<System::String ^>*)P_0), null);
		}
	}

	[SecurityCritical]
	[DebuggerStepThrough]
	static unsafe <Module>()
	{
		System.Runtime.CompilerServices.Unsafe.SkipInit(out LanguageSupport languageSupport);
		<CrtImplementationDetails>.LanguageSupport.{ctor}(&languageSupport);
		try
		{
			<CrtImplementationDetails>.LanguageSupport.Initialize(&languageSupport);
		}
		catch
		{
			//try-fault
			___CxxCallUnwindDtor((delegate*<void*, void>)(delegate*<LanguageSupport*, void>)(&<CrtImplementationDetails>.LanguageSupport.{dtor}), &languageSupport);
			throw;
		}
		<CrtImplementationDetails>.LanguageSupport.{dtor}(&languageSupport);
	}

	[SecuritySafeCritical]
	internal unsafe static string gcroot<System::String ^>..PE$AAVString@System@@(gcroot<System::String ^>* P_0)
	{
		//IL_0009: Expected I, but got I8
		nint num = new IntPtr((void*)(*(ulong*)P_0));
		return (string)((GCHandle)num).Target;
	}

	[DebuggerStepThrough]
	[SecurityCritical]
	internal unsafe static gcroot<System::String ^>* gcroot<System::String ^>.=(gcroot<System::String ^>* P_0, string t)
	{
		//IL_0009: Expected I, but got I8
		nint num = new IntPtr((void*)(*(ulong*)P_0));
		GCHandle gCHandle = (GCHandle)num;
		gCHandle.Target = t;
		return P_0;
	}

	[SecurityCritical]
	[DebuggerStepThrough]
	internal unsafe static void gcroot<System::String ^>.{dtor}(gcroot<System::String ^>* P_0)
	{
		//IL_0009: Expected I, but got I8
		nint num = new IntPtr((void*)(*(ulong*)P_0));
		((GCHandle)num).Free();
		*(long*)P_0 = 0L;
	}

	[SecuritySafeCritical]
	[DebuggerStepThrough]
	internal unsafe static gcroot<System::String ^>* gcroot<System::String ^>.{ctor}(gcroot<System::String ^>* P_0)
	{
		//IL_0015: Expected I8, but got I
		*(long*)P_0 = (nint)((IntPtr)(nint)GCHandle.Alloc(null)).ToPointer();
		return P_0;
	}

	[DebuggerStepThrough]
	[SecurityCritical]
	internal unsafe static ValueType <CrtImplementationDetails>.AtExitLock._handle()
	{
		if (?_lock@AtExitLock@<CrtImplementationDetails>@@$$Q0PEAXEA != null)
		{
			nint value = new IntPtr(?_lock@AtExitLock@<CrtImplementationDetails>@@$$Q0PEAXEA);
			return GCHandle.FromIntPtr(value);
		}
		return null;
	}

	[SecurityCritical]
	[DebuggerStepThrough]
	internal unsafe static void <CrtImplementationDetails>.AtExitLock._lock_Construct(object value)
	{
		//IL_0007: Expected I, but got I8
		?_lock@AtExitLock@<CrtImplementationDetails>@@$$Q0PEAXEA = null;
		<CrtImplementationDetails>.AtExitLock._lock_Set(value);
	}

	[SecurityCritical]
	[DebuggerStepThrough]
	internal unsafe static void <CrtImplementationDetails>.AtExitLock._lock_Set(object value)
	{
		ValueType valueType = <CrtImplementationDetails>.AtExitLock._handle();
		if (valueType == null)
		{
			valueType = GCHandle.Alloc(value);
			?_lock@AtExitLock@<CrtImplementationDetails>@@$$Q0PEAXEA = ((IntPtr)GCHandle.ToIntPtr((GCHandle)valueType)).ToPointer();
		}
		else
		{
			((GCHandle)valueType).Target = value;
		}
	}

	[DebuggerStepThrough]
	[SecurityCritical]
	internal static object <CrtImplementationDetails>.AtExitLock._lock_Get()
	{
		ValueType valueType = <CrtImplementationDetails>.AtExitLock._handle();
		if (valueType != null)
		{
			return ((GCHandle)valueType).Target;
		}
		return null;
	}

	[DebuggerStepThrough]
	[SecurityCritical]
	internal unsafe static void <CrtImplementationDetails>.AtExitLock._lock_Destruct()
	{
		//IL_001b: Expected I, but got I8
		ValueType valueType = <CrtImplementationDetails>.AtExitLock._handle();
		if (valueType != null)
		{
			((GCHandle)valueType).Free();
			?_lock@AtExitLock@<CrtImplementationDetails>@@$$Q0PEAXEA = null;
		}
	}

	[SecurityCritical]
	[DebuggerStepThrough]
	[return: MarshalAs(UnmanagedType.U1)]
	internal static bool <CrtImplementationDetails>.AtExitLock.IsInitialized()
	{
		return <CrtImplementationDetails>.AtExitLock._lock_Get() != null;
	}

	[SecurityCritical]
	[DebuggerStepThrough]
	internal static void <CrtImplementationDetails>.AtExitLock.AddRef()
	{
		if (!<CrtImplementationDetails>.AtExitLock.IsInitialized())
		{
			<CrtImplementationDetails>.AtExitLock._lock_Construct(new object());
			?_ref_count@AtExitLock@<CrtImplementationDetails>@@$$Q0HA = 0;
		}
		?_ref_count@AtExitLock@<CrtImplementationDetails>@@$$Q0HA++;
	}

	[DebuggerStepThrough]
	[SecurityCritical]
	internal static void <CrtImplementationDetails>.AtExitLock.RemoveRef()
	{
		?_ref_count@AtExitLock@<CrtImplementationDetails>@@$$Q0HA += -1;
		if (?_ref_count@AtExitLock@<CrtImplementationDetails>@@$$Q0HA == 0)
		{
			<CrtImplementationDetails>.AtExitLock._lock_Destruct();
		}
	}

	[SecurityCritical]
	[DebuggerStepThrough]
	[return: MarshalAs(UnmanagedType.U1)]
	internal static bool ?A0xdf32f105.__alloc_global_lock()
	{
		<CrtImplementationDetails>.AtExitLock.AddRef();
		return <CrtImplementationDetails>.AtExitLock.IsInitialized();
	}

	[SecurityCritical]
	[DebuggerStepThrough]
	internal static void ?A0xdf32f105.__dealloc_global_lock()
	{
		<CrtImplementationDetails>.AtExitLock.RemoveRef();
	}

	[SecurityCritical]
	internal unsafe static void _exit_callback()
	{
		//IL_003d: Expected I, but got I8
		//IL_004a: Expected I, but got I8
		//IL_0053: Expected I, but got I8
		//IL_005b: Expected I, but got I8
		//IL_005c: Expected I8, but got I
		if (?A0xdf32f105.__exit_list_size == 0L)
		{
			return;
		}
		delegate*<void>* ptr = (delegate*<void>*)DecodePointer(?A0xdf32f105.__onexitbegin_m);
		delegate*<void>* ptr2 = (delegate*<void>*)DecodePointer(?A0xdf32f105.__onexitend_m);
		if ((nint)ptr != -1L && ptr != null && ptr2 != null)
		{
			delegate*<void>* ptr3 = ptr;
			delegate*<void>* ptr4 = ptr2;
			while (true)
			{
				ptr2 = (delegate*<void>*)((ulong)(nint)ptr2 - 8uL);
				if (ptr2 < ptr)
				{
					break;
				}
				if (*(long*)ptr2 != (nint)EncodePointer(null))
				{
					void* intPtr = DecodePointer((void*)(*(ulong*)ptr2));
					*(long*)ptr2 = (nint)EncodePointer(null);
					((delegate*<void>)intPtr)();
					delegate*<void>* ptr5 = (delegate*<void>*)DecodePointer(?A0xdf32f105.__onexitbegin_m);
					delegate*<void>* ptr6 = (delegate*<void>*)DecodePointer(?A0xdf32f105.__onexitend_m);
					if (ptr3 != ptr5 || ptr4 != ptr6)
					{
						ptr3 = ptr5;
						ptr = ptr5;
						ptr4 = ptr6;
						ptr2 = ptr6;
					}
				}
			}
			nint hglobal = new IntPtr(ptr);
			Marshal.FreeHGlobal(hglobal);
		}
		?A0xdf32f105.__dealloc_global_lock();
	}

	[SecurityCritical]
	[DebuggerStepThrough]
	internal unsafe static int _initatexit_m()
	{
		int result = 0;
		if (?A0xdf32f105.__alloc_global_lock())
		{
			?A0xdf32f105.__onexitbegin_m = (delegate*<void>*)EncodePointer(((IntPtr)Marshal.AllocHGlobal(256)).ToPointer());
			?A0xdf32f105.__onexitend_m = ?A0xdf32f105.__onexitbegin_m;
			?A0xdf32f105.__exit_list_size = 32uL;
			result = 1;
		}
		return result;
	}

	[DebuggerStepThrough]
	[SecurityCritical]
	internal unsafe static int _initatexit_app_domain()
	{
		if (?A0xdf32f105.__alloc_global_lock())
		{
			__onexitbegin_app_domain = (delegate*<void>*)EncodePointer(((IntPtr)Marshal.AllocHGlobal(256)).ToPointer());
			__onexitend_app_domain = __onexitbegin_app_domain;
			__exit_list_size_app_domain = 32uL;
		}
		return 1;
	}

	[SecurityCritical]
	internal unsafe static void _app_exit_callback()
	{
		//IL_003c: Expected I, but got I8
		//IL_0046: Expected I, but got I8
		//IL_004a: Expected I, but got I8
		//IL_004f: Expected I, but got I8
		//IL_005c: Expected I, but got I8
		//IL_006b: Expected I, but got I8
		//IL_0075: Expected I, but got I8
		//IL_0076: Expected I8, but got I
		if (__exit_list_size_app_domain == 0L)
		{
			return;
		}
		delegate*<void>* ptr = (delegate*<void>*)DecodePointer(__onexitbegin_app_domain);
		delegate*<void>* ptr2 = (delegate*<void>*)DecodePointer(__onexitend_app_domain);
		try
		{
			if ((nint)ptr == -1L || ptr == null || ptr2 == null)
			{
				return;
			}
			delegate*<void> delegate* = null;
			delegate*<void>* ptr3 = ptr;
			delegate*<void>* ptr4 = ptr2;
			while (true)
			{
				delegate*<void>* ptr5 = null;
				delegate*<void>* ptr6 = null;
				do
				{
					ptr2 = (delegate*<void>*)((ulong)(nint)ptr2 - 8uL);
				}
				while (ptr2 >= ptr && *(long*)ptr2 == (nint)EncodePointer(null));
				if (ptr2 >= ptr)
				{
					delegate* = (delegate*<void>)DecodePointer((void*)(*(ulong*)ptr2));
					*(long*)ptr2 = (nint)EncodePointer(null);
					delegate*();
					delegate*<void>* ptr7 = (delegate*<void>*)DecodePointer(__onexitbegin_app_domain);
					delegate*<void>* ptr8 = (delegate*<void>*)DecodePointer(__onexitend_app_domain);
					if (ptr3 != ptr7 || ptr4 != ptr8)
					{
						ptr3 = ptr7;
						ptr = ptr7;
						ptr4 = ptr8;
						ptr2 = ptr8;
					}
					continue;
				}
				break;
			}
		}
		finally
		{
			nint hglobal = new IntPtr(ptr);
			Marshal.FreeHGlobal(hglobal);
			?A0xdf32f105.__dealloc_global_lock();
		}
	}

	[DllImport("KERNEL32.dll")]
	[SuppressUnmanagedCodeSecurity]
	[SecurityCritical]
	[ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
	public unsafe static extern void* DecodePointer(void* _Ptr);

	[DllImport("KERNEL32.dll")]
	[SuppressUnmanagedCodeSecurity]
	[SecurityCritical]
	[ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
	public unsafe static extern void* EncodePointer(void* _Ptr);

	[DebuggerStepThrough]
	[SecurityCritical]
	internal unsafe static int _initterm_e(delegate* unmanaged[Cdecl, Cdecl]<int>* pfbegin, delegate* unmanaged[Cdecl, Cdecl]<int>* pfend)
	{
		//IL_001c: Expected I, but got I8
		//IL_0015: Expected I, but got I8
		int num = 0;
		if (pfbegin < pfend)
		{
			while (num == 0)
			{
				ulong num2 = *(ulong*)pfbegin;
				if (num2 != 0L)
				{
					num = ((delegate* unmanaged[Cdecl, Cdecl]<int>)num2)();
				}
				pfbegin = (delegate* unmanaged[Cdecl, Cdecl]<int>*)((ulong)(nint)pfbegin + 8uL);
				if (pfbegin >= pfend)
				{
					break;
				}
			}
		}
		return num;
	}

	[SecurityCritical]
	[DebuggerStepThrough]
	internal unsafe static void _initterm(delegate* unmanaged[Cdecl, Cdecl]<void>* pfbegin, delegate* unmanaged[Cdecl, Cdecl]<void>* pfend)
	{
		//IL_0016: Expected I, but got I8
		//IL_0010: Expected I, but got I8
		if (pfbegin >= pfend)
		{
			return;
		}
		do
		{
			ulong num = *(ulong*)pfbegin;
			if (num != 0L)
			{
				((delegate* unmanaged[Cdecl, Cdecl]<void>)num)();
			}
			pfbegin = (delegate* unmanaged[Cdecl, Cdecl]<void>*)((ulong)(nint)pfbegin + 8uL);
		}
		while (pfbegin < pfend);
	}

	[DebuggerStepThrough]
	internal static ModuleHandle <CrtImplementationDetails>.ThisModule.Handle()
	{
		return typeof(ThisModule).Module.ModuleHandle;
	}

	[SecurityCritical]
	[SecurityPermission(SecurityAction.Assert, UnmanagedCode = true)]
	[DebuggerStepThrough]
	internal unsafe static void _initterm_m(delegate*<void*>* pfbegin, delegate*<void*>* pfend)
	{
		//IL_001c: Expected I, but got I8
		//IL_0010: Expected I, but got I8
		if (pfbegin >= pfend)
		{
			return;
		}
		do
		{
			ulong num = *(ulong*)pfbegin;
			if (num != 0L)
			{
				<CrtImplementationDetails>.ThisModule.ResolveMethod<void const * __clrcall(void)>((delegate*<void*>)num)();
			}
			pfbegin = (delegate*<void*>*)((ulong)(nint)pfbegin + 8uL);
		}
		while (pfbegin < pfend);
	}

	[DebuggerStepThrough]
	[SecurityCritical]
	internal unsafe static delegate*<void*> <CrtImplementationDetails>.ThisModule.ResolveMethod<void const * __clrcall(void)>(delegate*<void*> methodToken)
	{
		return (delegate*<void*>)((IntPtr)<CrtImplementationDetails>.ThisModule.Handle().ResolveMethodHandle((int)methodToken).GetFunctionPointer()).ToPointer();
	}

	[SecurityPermission(SecurityAction.Assert, UnmanagedCode = true)]
	[ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
	[SecurityCritical]
	internal unsafe static void ___CxxCallUnwindDtor(delegate*<void*, void> pDtor, void* pThis)
	{
		try
		{
			pDtor(pThis);
		}
		catch when (__FrameUnwindFilter((_EXCEPTION_POINTERS*)Marshal.GetExceptionPointers()) != 0)
		{
		}
	}

	[MethodImpl(MethodImplOptions.Unmanaged | MethodImplOptions.PreserveSig, MethodCodeType = MethodCodeType.Native)]
	[SuppressUnmanagedCodeSecurity]
	internal unsafe static extern void* _getFiberPtrId();

	[DllImport("", CallingConvention = CallingConvention.Cdecl, SetLastError = true)]
	[MethodImpl(MethodImplOptions.Unmanaged, MethodCodeType = MethodCodeType.Native)]
	[SuppressUnmanagedCodeSecurity]
	internal static extern void _cexit();

	[DllImport("", CallingConvention = CallingConvention.Cdecl, SetLastError = true)]
	[MethodImpl(MethodImplOptions.Unmanaged, MethodCodeType = MethodCodeType.Native)]
	[SuppressUnmanagedCodeSecurity]
	internal static extern void Sleep(uint P_0);

	[DllImport("", CallingConvention = CallingConvention.Cdecl, SetLastError = true)]
	[MethodImpl(MethodImplOptions.Unmanaged, MethodCodeType = MethodCodeType.Native)]
	[SuppressUnmanagedCodeSecurity]
	internal static extern void abort();

	[MethodImpl(MethodImplOptions.Unmanaged | MethodImplOptions.PreserveSig, MethodCodeType = MethodCodeType.Native)]
	[SuppressUnmanagedCodeSecurity]
	internal static extern void __security_init_cookie();

	[DllImport("", CallingConvention = CallingConvention.Cdecl, SetLastError = true)]
	[MethodImpl(MethodImplOptions.Unmanaged, MethodCodeType = MethodCodeType.Native)]
	[SuppressUnmanagedCodeSecurity]
	internal unsafe static extern int __FrameUnwindFilter(_EXCEPTION_POINTERS* P_0);
}
internal class Main : IDisposable
{
	public class Config
	{
		[JsonInclude]
		public bool OutlineActive = true;

		[JsonInclude]
		public float OutlineStrength = 5f;

		[JsonInclude]
		public bool KnitActive = true;

		[JsonInclude]
		public bool KnitOnCosmetics = false;

		[JsonInclude]
		public float KnitStrength = 1f;
	}

	public Config Conf;

	public Main()
	{
		Conf = global::<Module>.Jous.ToonOutline.ImodInterface.?A0x71d38344.ReadConfig<class Main::Config ^>();
		global::<Module>.Jous.ToonOutline.Logger.?A0x71d38344.Information("Hello World!");
		GC.KeepAlive(this);
	}

	private void ~Main()
	{
	}

	protected virtual void Dispose([MarshalAs(UnmanagedType.U1)] bool A_0)
	{
		if (!A_0)
		{
			base.Finalize();
		}
	}

	public virtual sealed void Dispose()
	{
		Dispose(A_0: true);
		GC.SuppressFinalize(this);
		GC.KeepAlive(this);
	}
}
namespace Jous.ToonOutline
{
	internal class Vars
	{
		public static Main Mod = null;

		public static object modInterface = null;

		public static object logger = null;

		public static Assembly GDWeave = null;

		public static Assembly Serilog = null;
	}
}
namespace <CrtImplementationDetails>
{
	[Serializable]
	internal class ModuleLoadException : Exception
	{
		public const string Nested = "A nested exception occurred after the primary exception that caused the C++ module to fail to load.\n";

		protected ModuleLoadException(SerializationInfo info, StreamingContext context)
			: base(info, context)
		{
		}

		public ModuleLoadException(string message, Exception innerException)
			: base(message, innerException)
		{
		}

		public ModuleLoadException(string message)
			: base(message)
		{
		}
	}
	[Serializable]
	internal class ModuleLoadExceptionHandlerException : ModuleLoadException
	{
		private const string formatString = "\n{0}: {1}\n--- Start of primary exception ---\n{2}\n--- End of primary exception ---\n\n--- Start of nested exception ---\n{3}\n--- End of nested exception ---\n";

		private Exception <backing_store>NestedException;

		public Exception NestedException
		{
			get
			{
				return <backing_store>NestedException;
			}
			set
			{
				<backing_store>NestedException = value;
			}
		}

		protected ModuleLoadExceptionHandlerException(SerializationInfo info, StreamingContext context)
			: base(info, context)
		{
			Type typeFromHandle = typeof(Exception);
			string name = "NestedException";
			NestedException = (Exception)info.GetValue(name, typeFromHandle);
			GC.KeepAlive(this);
		}

		public ModuleLoadExceptionHandlerException(string message, Exception innerException, Exception nestedException)
			: base(message, innerException)
		{
			NestedException = nestedException;
		}

		public override string ToString()
		{
			string text = ((base.InnerException == null) ? string.Empty : base.InnerException.ToString());
			string text2 = ((NestedException == null) ? string.Empty : NestedException.ToString());
			object[] array = new object[4];
			Type type = GetType();
			array[0] = type;
			string text3 = ((Message == null) ? string.Empty : Message);
			array[1] = text3;
			string text4 = ((text == null) ? string.Empty : text);
			array[2] = text4;
			string text5 = ((text2 == null) ? string.Empty : text2);
			array[3] = text5;
			string result = string.Format("\n{0}: {1}\n--- Start of primary exception ---\n{2}\n--- End of primary exception ---\n\n--- Start of nested exception ---\n{3}\n--- End of nested exception ---\n", array);
			GC.KeepAlive(this);
			return result;
		}

		[SecurityCritical]
		public override void GetObjectData(SerializationInfo info, StreamingContext context)
		{
			base.GetObjectData(info, context);
			Type typeFromHandle = typeof(Exception);
			Exception nestedException = NestedException;
			info.AddValue("NestedException", nestedException, typeFromHandle);
			GC.KeepAlive(this);
		}
	}
	internal class ModuleUninitializer : Stack
	{
		private static object @lock;

		internal static ModuleUninitializer _ModuleUninitializer;

		[SecuritySafeCritical]
		internal void AddHandler(EventHandler handler)
		{
			bool lockTaken = false;
			RuntimeHelpers.PrepareConstrainedRegions();
			try
			{
				RuntimeHelpers.PrepareConstrainedRegions();
				Monitor.Enter(@lock, ref lockTaken);
				RuntimeHelpers.PrepareDelegate(handler);
				Push(handler);
			}
			finally
			{
				if (lockTaken)
				{
					Monitor.Exit(@lock);
				}
			}
		}

		[SecurityCritical]
		static ModuleUninitializer()
		{
			@lock = new object();
			_ModuleUninitializer = new ModuleUninitializer();
		}

		[SecuritySafeCritical]
		private ModuleUninitializer()
		{
			EventHandler value = SingletonDomainUnload;
			AppDomain.CurrentDomain.DomainUnload += value;
			AppDomain.CurrentDomain.ProcessExit += value;
		}

		[SecurityCritical]
		[PrePrepareMethod]
		private void SingletonDomainUnload(object source, EventArgs arguments)
		{
			bool lockTaken = false;
			RuntimeHelpers.PrepareConstrainedRegions();
			try
			{
				RuntimeHelpers.PrepareConstrainedRegions();
				Monitor.Enter(@lock, ref lockTaken);
				IEnumerator enumerator = GetEnumerator();
				try
				{
					while (enumerator.MoveNext())
					{
						((EventHandler)enumerator.Current)(source, arguments);
					}
				}
				finally
				{
					IEnumerator enumerator2 = enumerator;
					if (enumerator is IDisposable disposable)
					{
						disposable.Dispose();
					}
				}
			}
			finally
			{
				if (lockTaken)
				{
					Monitor.Exit(@lock);
				}
			}
		}
	}
}
[NativeCppClass]
internal enum __scrt_native_startup_state
{

}
namespace <CrtImplementationDetails>
{
	[NativeCppClass]
	internal enum TriBool
	{

	}
	[NativeCppClass]
	internal enum Progress
	{

	}
}
[StructLayout(LayoutKind.Sequential, Size = 16)]
[UnsafeValueType]
[NativeCppClass]
internal struct _GUID
{
	private int <alignment member>;
}
[StructLayout(LayoutKind.Sequential, Size = 8)]
[NativeCppClass]
internal static struct IUnknown
{
	private long <alignment member>;
}
namespace <CrtImplementationDetails>
{
	[StructLayout(LayoutKind.Sequential, Size = 8)]
	[NativeCppClass]
	internal struct LanguageSupport
	{
		private long <alignment member>;
	}
}
[StructLayout(LayoutKind.Sequential, Size = 8)]
[NativeCppClass]
internal struct gcroot<System::String ^>
{
	private long <alignment member>;
}
[StructLayout(LayoutKind.Sequential, Size = 16)]
[NativeCppClass]
[UnsafeValueType]
internal struct __s_GUID
{
	private int <alignment member>;
}
namespace <CppImplementationDetails>
{
	[StructLayout(LayoutKind.Sequential, Size = 1)]
	[NativeCppClass]
	internal struct $ArrayType$$$BY0A@P6AHXZ
	{
	}
}
[StructLayout(LayoutKind.Sequential, Size = 8)]
[NativeCppClass]
internal static struct ICLRRuntimeHost
{
	private long <alignment member>;
}
namespace <CppImplementationDetails>
{
	[StructLayout(LayoutKind.Sequential, Size = 8)]
	[NativeCppClass]
	internal struct $ArrayType$$$BY00Q6MPEBXXZ
	{
	}
	[StructLayout(LayoutKind.Sequential, Size = 1)]
	[NativeCppClass]
	internal struct $ArrayType$$$BY0A@P6AXXZ
	{
	}
}
[StructLayout(LayoutKind.Sequential, Size = 8)]
[NativeCppClass]
internal static struct ICorRuntimeHost
{
	private long <alignment member>;
}
namespace <CrtImplementationDetails>
{
	[StructLayout(LayoutKind.Sequential, Size = 1)]
	[NativeCppClass]
	internal struct ThisModule
	{
	}
}
[StructLayout(LayoutKind.Sequential, Size = 16)]
[NativeCppClass]
internal struct _EXCEPTION_POINTERS
{
	private long <alignment member>;
}

GDWeave/mods/Jous.ToonOutline/Jous.ToonOutline.dll

Decompiled 2 months ago
using System;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using GDWeave;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(/*Could not decode attribute arguments.*/)]
[assembly: TargetFramework(".NETCoreApp,Version=v8.0", FrameworkDisplayName = ".NET 8.0")]
[assembly: AssemblyCompany("Jous.ToonOutline")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0+cf467f0bca97e2a19d04d7450f8a5622876e084c")]
[assembly: AssemblyProduct("Jous.ToonOutline")]
[assembly: AssemblyTitle("Jous.ToonOutline")]
[assembly: AssemblyVersion("1.0.0.0")]
[module: RefSafetyRules(11)]
namespace Jous.ToonOutline;

public class Mod : IMod, global::System.IDisposable
{
	[DllImport("Jous.ToonOutline.Data.dll", SetLastError = true)]
	public static extern void RunMod(long ptr);

	[DllImport("Jous.ToonOutline.Data.dll", SetLastError = true)]
	public static extern void StopMod();

	public Mod(IModInterface modInterface)
	{
		//IL_0008: Unknown result type (might be due to invalid IL or missing references)
		RunMod(((global::System.IntPtr)(nint)GCHandle.ToIntPtr(GCHandle.Alloc((object)modInterface, (GCHandleType)2))).ToInt64());
	}

	public void Dispose()
	{
		StopMod();
	}
}