using System; using System.Diagnostics; using System.IO; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Bootstrap; using BepInEx.Logging; using HarmonyLib; using Microsoft.CodeAnalysis; using Peak.UI; using Photon.Pun; using Photon.Realtime; using Steamworks; using TMPro; using UnityEngine; using UnityEngine.EventSystems; using UnityEngine.Events; using UnityEngine.UI; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: IgnoresAccessChecksTo("Assembly-CSharp")] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("com.atomic.profileviewer")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyFileVersion("0.1.5.0")] [assembly: AssemblyInformationalVersion("0.1.5+dfa11f73922e8c83be18c3b374289d94cc51879e")] [assembly: AssemblyProduct("com.atomic.profileviewer")] [assembly: AssemblyTitle("ProfileViewer")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("0.1.5.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [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] [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] [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 BepInEx { [AttributeUsage(AttributeTargets.Class, Inherited = false, AllowMultiple = false)] [Conditional("CodeGeneration")] internal sealed class BepInAutoPluginAttribute : Attribute { public BepInAutoPluginAttribute(string? id = null, string? name = null, string? version = null) { } } } namespace BepInEx.Preloader.Core.Patching { [AttributeUsage(AttributeTargets.Class, Inherited = false, AllowMultiple = false)] [Conditional("CodeGeneration")] internal sealed class PatcherAutoPluginAttribute : Attribute { public PatcherAutoPluginAttribute(string? id = null, string? name = null, string? version = null) { } } } namespace ProfileViewer { [BepInPlugin("com.atomic.profileviewer", "ProfileViewer", "0.1.5")] public class Plugin : BaseUnityPlugin { public static Harmony harmony; public const string Id = "com.atomic.profileviewer"; internal static ManualLogSource Log { get; private set; } public static string Name => "ProfileViewer"; public static string Version => "0.1.5"; private void Awake() { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Expected O, but got Unknown Log = ((BaseUnityPlugin)this).Logger; harmony = new Harmony("com.atomic.profileviewer"); harmony.PatchAll(); Log.LogInfo((object)("Plugin " + Name + " is loaded!")); } public static CSteamID GetSteamId(Player player) { //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) if (player != null && !string.IsNullOrEmpty(player.UserId) && ulong.TryParse(player.UserId, out var result)) { return new CSteamID(result); } return CSteamID.Nil; } public static Texture2D GetSteamAvatar(CSteamID steamID) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Expected O, but got Unknown int mediumFriendAvatar = SteamFriends.GetMediumFriendAvatar(steamID); if (mediumFriendAvatar == -1) { return null; } uint num = default(uint); uint num2 = default(uint); SteamUtils.GetImageSize(mediumFriendAvatar, ref num, ref num2); byte[] array = new byte[num * num2 * 4]; if (SteamUtils.GetImageRGBA(mediumFriendAvatar, array, (int)(num * num2 * 4))) { Texture2D val = new Texture2D((int)num, (int)num2, (TextureFormat)4, false); val.LoadRawTextureData(array); val.Apply(); return val; } return null; } public static Texture2D IconFromEmbeddedResource(string resourceName) { //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Expected O, but got Unknown Assembly assembly = typeof(Plugin).Assembly; using Stream stream = assembly.GetManifestResourceStream(resourceName); if (stream == null) { return null; } byte[] array = new byte[stream.Length]; stream.Read(array, 0, array.Length); Texture2D val = new Texture2D(2, 2); ImageConversion.LoadImage(val, array); return val; } public static void CreateUI(AudioLevelSlider __instance) { //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Unknown result type (might be due to invalid IL or missing references) //IL_0122: Unknown result type (might be due to invalid IL or missing references) //IL_0138: Unknown result type (might be due to invalid IL or missing references) //IL_014c: Unknown result type (might be due to invalid IL or missing references) //IL_0151: Unknown result type (might be due to invalid IL or missing references) //IL_0167: Unknown result type (might be due to invalid IL or missing references) //IL_017b: Unknown result type (might be due to invalid IL or missing references) //IL_0180: Unknown result type (might be due to invalid IL or missing references) //IL_018d: Unknown result type (might be due to invalid IL or missing references) //IL_01a1: Unknown result type (might be due to invalid IL or missing references) //IL_01a6: Unknown result type (might be due to invalid IL or missing references) //IL_0250: Unknown result type (might be due to invalid IL or missing references) //IL_0257: Expected O, but got Unknown //IL_0280: Unknown result type (might be due to invalid IL or missing references) //IL_029c: Unknown result type (might be due to invalid IL or missing references) //IL_02b2: Unknown result type (might be due to invalid IL or missing references) //IL_02d1: Unknown result type (might be due to invalid IL or missing references) //IL_02e7: Unknown result type (might be due to invalid IL or missing references) //IL_02fd: Unknown result type (might be due to invalid IL or missing references) //IL_0318: Unknown result type (might be due to invalid IL or missing references) //IL_0347: Unknown result type (might be due to invalid IL or missing references) //IL_034e: Expected O, but got Unknown //IL_036d: Unknown result type (might be due to invalid IL or missing references) //IL_0379: Unknown result type (might be due to invalid IL or missing references) //IL_0385: Unknown result type (might be due to invalid IL or missing references) //IL_03a5: Unknown result type (might be due to invalid IL or missing references) Transform val = ((Component)__instance).transform.Find("IsNotLocal"); ((HorizontalOrVerticalLayoutGroup)((Component)__instance).GetComponentInParent()).spacing = 30f; if (!((Object)(object)val == (Object)null)) { ((Component)val).gameObject.SetActive(true); if (isModInstalled("lammas123.PEAKER")) { Transform parent = ((Component)__instance).transform.parent.parent; ((Behaviour)((Component)parent).GetComponent()).enabled = false; ((Behaviour)((Component)parent).GetComponent()).enabled = false; } Transform val2 = val.Find("KickButton"); Transform val3 = val.Find("Slider"); if ((Object)(object)val2 != (Object)null) { ((Component)val2).gameObject.SetActive(true); } if ((Object)(object)val3 != (Object)null) { ((Component)val3).gameObject.SetActive(true); } ProfileController profileController = ((Component)__instance).GetComponent(); if ((Object)(object)profileController == (Object)null) { profileController = ((Component)__instance).gameObject.AddComponent(); } if ((Object)(object)((Component)__instance).transform.Find("IsNotLocal/ProfileButton") != (Object)null) { HandleVisibility(__instance, val, val2, val3); profileController.Refresh(); return; } Transform val4 = ((Component)__instance).transform.Find("NameLayout"); val2.localPosition += new Vector3(-60f, 15f, 0f); Transform obj = val.Find("Percent"); obj.localPosition += new Vector3(40f, 5f, 0f); Transform obj2 = val.Find("Icon"); obj2.localPosition += new Vector3(40f, 5f, 0f); val4.localPosition += new Vector3(0f, 40f, 0f); GameObject val5 = Object.Instantiate(((Component)val2).gameObject, val); ((Object)val5).name = "ProfileButton"; val5.SetActive(true); GameObject val6 = Object.Instantiate(val5, val); ((Object)val6).name = "AddFriendButton"; val6.SetActive(true); HandleVisibility(__instance, val, val2, val3); CleanButton(val5, "ProfileViewer.Assets.Open-Profile.png"); CleanButton(val6, "ProfileViewer.Assets.Add-Friend.png"); GameObject val7 = new GameObject("ProfileFrame", new Type[4] { typeof(RectTransform), typeof(Image), typeof(Mask), typeof(Outline) }); val7.transform.SetParent(((Component)__instance).transform, false); val7.transform.localScale = new Vector3(0.8f, 0.8f, 0.8f); Outline component = val7.GetComponent(); ((Shadow)component).effectColor = ((Graphic)((Component)val4).GetComponentInChildren()).color; ((Shadow)component).effectDistance = new Vector2(4f, 3f); RectTransform component2 = val7.GetComponent(); component2.anchorMin = new Vector2(0f, 0.5f); component2.anchorMax = new Vector2(0f, 0.5f); component2.sizeDelta = new Vector2(100f, 100f); ((Transform)component2).localPosition = new Vector3(-232f, 19f, 0f); GameObject val8 = new GameObject("ProfileAvatar", new Type[2] { typeof(RectTransform), typeof(RawImage) }); val8.transform.SetParent(val7.transform, false); RectTransform component3 = val8.GetComponent(); component3.anchorMin = Vector2.zero; component3.anchorMax = Vector2.one; component3.sizeDelta = Vector2.zero; val8.transform.localRotation = Quaternion.Euler(180f, 0f, 0f); profileController.profileButton = val5.GetComponent