using System; using System.Collections.Generic; using System.Runtime.InteropServices; using System.Threading; using Cpp2IlInjected; using UnityEngine; namespace Steamworks { // Token: 0x020016A8 RID: 5800 [Token(Token = "0x20016A8")] public static class CallbackDispatcher { // Token: 0x060086B1 RID: 34481 RVA: 0x001CB8B8 File Offset: 0x001C9AB8 [Token(Token = "0x60086B1")] [Address(RVA = "0x164D030", Offset = "0x164BE30", VA = "0x18164D030")] public static void ExceptionHandler(Exception e) { Debug.LogException(e); } // Token: 0x170016C6 RID: 5830 // (get) Token: 0x060086B2 RID: 34482 RVA: 0x001CB8CC File Offset: 0x001C9ACC [Token(Token = "0x170016C6")] public static bool IsInitialized { [Token(Token = "0x60086B2")] [Address(RVA = "0x164EE10", Offset = "0x164DC10", VA = "0x18164EE10")] get { return "{il2cpp field on {'constant10' (constant value of type Cpp2IL.Core.Analysis.ResultModels.StaticFieldsPtr)}, offset 0x28}" > (ulong)0L; } } // Token: 0x060086B3 RID: 34483 RVA: 0x001CB8E4 File Offset: 0x001C9AE4 [Token(Token = "0x60086B3")] [Address(RVA = "0x164D090", Offset = "0x164BE90", VA = "0x18164D090")] internal static void Initialize() { int num; do { num = 0; object sync = CallbackDispatcher.m_sync; NativeMethods.SteamAPI_ManualDispatch_Init(); CallbackDispatcher.m_pCallbackMsg = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(CallbackMsg_t))); Monitor.Exit(sync); } while (num != 0); } // Token: 0x060086B4 RID: 34484 RVA: 0x001CB924 File Offset: 0x001C9B24 [Token(Token = "0x60086B4")] [Address(RVA = "0x164E070", Offset = "0x164CE70", VA = "0x18164E070")] internal static void Shutdown() { int num; do { num = 0; object sync = CallbackDispatcher.m_sync; CallbackDispatcher.UnregisterAll(); Marshal.FreeHGlobal(CallbackDispatcher.m_pCallbackMsg); CallbackDispatcher.m_pCallbackMsg = (IntPtr)num; Monitor.Exit(sync); } while (num != 0); } // Token: 0x060086B5 RID: 34485 RVA: 0x001CB95C File Offset: 0x001C9B5C [Token(Token = "0x60086B5")] [Address(RVA = "0x164D260", Offset = "0x164C060", VA = "0x18164D260")] internal static void Register(Callback cb) { int num; do { num = 0; bool isGameServer = cb.IsGameServer; if (cb.ToString() != 0) { } Dictionary> registeredCallbacks = CallbackDispatcher.m_registeredCallbacks; object sync = CallbackDispatcher.m_sync; int num2 = 0; int num3; if (!registeredCallbacks.TryGetValue(num3, num2)) { List list = new List(); registeredCallbacks.Add(num3, list); } Monitor.Exit(sync); } while (num != 0); } // Token: 0x060086B6 RID: 34486 RVA: 0x001CB9C0 File Offset: 0x001C9BC0 [Token(Token = "0x60086B6")] [Address(RVA = "0x164D460", Offset = "0x164C260", VA = "0x18164D460")] internal static void Register(SteamAPICall_t asyncCall, CallResult cr) { int num; do { num = 0; object sync = CallbackDispatcher.m_sync; Dictionary> registeredCallResults = CallbackDispatcher.m_registeredCallResults; bool flag; if (!flag) { List list = new List(); Dictionary> registeredCallResults2 = CallbackDispatcher.m_registeredCallResults; } Monitor.Exit(sync); } while (num != 0); } // Token: 0x060086B7 RID: 34487 RVA: 0x001CBA0C File Offset: 0x001C9C0C [Token(Token = "0x60086B7")] [Address(RVA = "0x164EB40", Offset = "0x164D940", VA = "0x18164EB40")] internal static void Unregister(Callback cb) { int num; do { num = 0; bool isGameServer = cb.IsGameServer; if (cb.ToString() != 0) { } Dictionary> registeredCallbacks = CallbackDispatcher.m_registeredCallbacks; object sync = CallbackDispatcher.m_sync; int num2 = 0; int num3; if (registeredCallbacks.TryGetValue(num3, num2)) { bool flag = registeredCallbacks.Remove(num3); } Monitor.Exit(sync); } while (num != 0); } // Token: 0x060086B8 RID: 34488 RVA: 0x001CBA70 File Offset: 0x001C9C70 [Token(Token = "0x60086B8")] [Address(RVA = "0x164E930", Offset = "0x164D730", VA = "0x18164E930")] internal static void Unregister(SteamAPICall_t asyncCall, CallResult cr) { int num; do { num = 0; object sync = CallbackDispatcher.m_sync; Dictionary> registeredCallResults = CallbackDispatcher.m_registeredCallResults; bool flag; if (flag) { Dictionary> registeredCallResults2 = CallbackDispatcher.m_registeredCallResults; } Monitor.Exit(sync); } while (num != 0); } // Token: 0x060086B9 RID: 34489 RVA: 0x001CBAB8 File Offset: 0x001C9CB8 [Token(Token = "0x60086B9")] [Address(RVA = "0x164E1F0", Offset = "0x164CFF0", VA = "0x18164E1F0")] private static void UnregisterAll() { int num; do { num = 0; List list = new List(); List list2 = new List(); object sync = CallbackDispatcher.m_sync; Dictionary> registeredCallbacks = CallbackDispatcher.m_registeredCallbacks; bool flag; if (flag) { } if (num != 0) { goto IL_C0; } if (num != -1) { } CallbackDispatcher.m_registeredCallbacks.Clear(); Dictionary> registeredGameServerCallbacks = CallbackDispatcher.m_registeredGameServerCallbacks; bool flag2; if (flag2) { } num++; if (num != 0) { goto IL_C6; } if (num != -1) { } CallbackDispatcher.m_registeredGameServerCallbacks.Clear(); Dictionary> registeredCallResults = CallbackDispatcher.m_registeredCallResults; bool flag3; if (flag3) { } num++; if (num != 0) { goto IL_CC; } if (num != -1) { } Dictionary> registeredCallResults2 = CallbackDispatcher.m_registeredCallResults; registeredCallResults2.Clear(); bool flag4; if (flag4) { ICollection collection = registeredCallResults2.System.Collections.Generic.IDictionary.get_Keys(); } num++; if (num != 0) { goto IL_D2; } if (num != -1) { } bool flag5; if (flag5) { } num++; if (num != 0) { goto IL_D8; } if (num != -1) { } Monitor.Exit(registeredCallResults2); } while (num != 0); return; IL_C0: throw new NullReferenceException(); IL_C6: throw new NullReferenceException(); IL_CC: throw new NullReferenceException(); IL_D2: throw new NullReferenceException(); IL_D8: throw new NullReferenceException(); } // Token: 0x060086BA RID: 34490 RVA: 0x001CBBCC File Offset: 0x001C9DCC [Token(Token = "0x60086BA")] [Address(RVA = "0x164D680", Offset = "0x164C480", VA = "0x18164D680")] internal static void RunFrame(bool isGameServer) { int num; uint num4; do { num = 0; if (isGameServer) { int num2 = NativeMethods.SteamGameServer_GetHSteamPipe(); } int num3 = NativeMethods.SteamAPI_GetHSteamPipe(); if (isGameServer) { } bool flag; if (!flag) { return; } IntPtr pCallbackMsg = CallbackDispatcher.m_pCallbackMsg; Type typeFromHandle = typeof(CallbackMsg_t); object obj = Marshal.PtrToStructure(pCallbackMsg, typeFromHandle); bool flag2; if (flag2) { object sync = CallbackDispatcher.m_sync; num4 += (uint)1; Monitor.Exit(sync); if (num != 0) { goto IL_101; } if (num4 != (uint)(-1)) { } bool flag3; if (flag3) { } num4 += (uint)1; if (num != 0) { goto IL_107; } if (num4 != (uint)(-1)) { Type typeFromHandle2 = typeof(SteamAPICallCompleted_t); object obj2 = Marshal.PtrToStructure(typeof(Marshal).TypeHandle, typeFromHandle2); bool flag4; if (flag4) { object sync2 = CallbackDispatcher.m_sync; Dictionary> registeredCallResults = CallbackDispatcher.m_registeredCallResults; bool flag5; if (flag5) { Dictionary> registeredCallResults2 = CallbackDispatcher.m_registeredCallResults; bool flag6; if (flag6) { } num4 += (uint)1; if (num != 0) { goto IL_119; } if (num4 != (uint)(-1)) { } } num4 += (uint)1; Monitor.Exit(sync2); if (num != 0) { goto IL_12B; } if (num4 != (uint)(-1)) { } } IntPtr intPtr; Marshal.FreeHGlobal(intPtr); } } num4 += (uint)1; num4 += (uint)1; } while (num != 0); if (num4 != (uint)(-1)) { } return; IL_101: throw new NullReferenceException(); IL_107: throw new NullReferenceException(); IL_119: throw new NullReferenceException(); IL_12B: throw new NullReferenceException(); } // Token: 0x04005945 RID: 22853 [Token(Token = "0x4005945")] private static Dictionary> m_registeredCallbacks = new Dictionary(); // Token: 0x04005946 RID: 22854 [Token(Token = "0x4005946")] private static Dictionary> m_registeredGameServerCallbacks = new Dictionary(); // Token: 0x04005947 RID: 22855 [Token(Token = "0x4005947")] private static Dictionary> m_registeredCallResults = new Dictionary(); // Token: 0x04005948 RID: 22856 [Token(Token = "0x4005948")] private static object m_sync = new object(); // Token: 0x04005949 RID: 22857 [Token(Token = "0x4005949")] private static IntPtr m_pCallbackMsg; // Token: 0x0400594A RID: 22858 [Token(Token = "0x400594A")] private static int m_initCount; } }