scripts
This commit is contained in:
@@ -0,0 +1,428 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Threading;
|
||||
using Cpp2IlInjected;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Steamworks
|
||||
{
|
||||
// Token: 0x02001089 RID: 4233
|
||||
[Token(Token = "0x2001089")]
|
||||
[StructLayout(3)]
|
||||
public static class CallbackDispatcher
|
||||
{
|
||||
// Token: 0x06006738 RID: 26424 RVA: 0x0016A030 File Offset: 0x00168230
|
||||
[Token(Token = "0x6006738")]
|
||||
[Address(RVA = "0x1D5DBE0", Offset = "0x1D5C5E0", VA = "0x181D5DBE0")]
|
||||
public static void ExceptionHandler(Exception e)
|
||||
{
|
||||
Debug.LogException(e);
|
||||
}
|
||||
|
||||
// Token: 0x17001283 RID: 4739
|
||||
// (get) Token: 0x06006739 RID: 26425 RVA: 0x0016A044 File Offset: 0x00168244
|
||||
[Token(Token = "0x17001283")]
|
||||
public static bool IsInitialized
|
||||
{
|
||||
[Token(Token = "0x6006739")]
|
||||
[Address(RVA = "0x1D5FB40", Offset = "0x1D5E540", VA = "0x181D5FB40")]
|
||||
get
|
||||
{
|
||||
return "{il2cpp field on {'constant10' (constant value of type Cpp2IL.Core.Analysis.ResultModels.StaticFieldsPtr)}, offset 0x28}" > (ulong)0L;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600673A RID: 26426 RVA: 0x0016A05C File Offset: 0x0016825C
|
||||
[Token(Token = "0x600673A")]
|
||||
[Address(RVA = "0x1D5DC40", Offset = "0x1D5C640", VA = "0x181D5DC40")]
|
||||
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);
|
||||
if (num != -1)
|
||||
{
|
||||
}
|
||||
}
|
||||
while (num != 0);
|
||||
}
|
||||
|
||||
// Token: 0x0600673B RID: 26427 RVA: 0x0016A0A0 File Offset: 0x001682A0
|
||||
[Token(Token = "0x600673B")]
|
||||
[Address(RVA = "0x1D5ECC0", Offset = "0x1D5D6C0", VA = "0x181D5ECC0")]
|
||||
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);
|
||||
if (num != -1)
|
||||
{
|
||||
}
|
||||
}
|
||||
while (num != 0);
|
||||
}
|
||||
|
||||
// Token: 0x0600673C RID: 26428 RVA: 0x0016A0DC File Offset: 0x001682DC
|
||||
[Token(Token = "0x600673C")]
|
||||
[Address(RVA = "0x1D5DE40", Offset = "0x1D5C840", VA = "0x181D5DE40")]
|
||||
internal static void Register(Callback cb)
|
||||
{
|
||||
int num;
|
||||
do
|
||||
{
|
||||
num = 0;
|
||||
bool isGameServer = cb.IsGameServer;
|
||||
if (cb.ToString() != 0)
|
||||
{
|
||||
}
|
||||
Dictionary<int, List<Callback>> registeredCallbacks = CallbackDispatcher.m_registeredCallbacks;
|
||||
object sync = CallbackDispatcher.m_sync;
|
||||
int num2 = 0;
|
||||
int num3;
|
||||
if (!registeredCallbacks.TryGetValue(num3, num2))
|
||||
{
|
||||
List<Callback> list = new List();
|
||||
registeredCallbacks.Add(num3, list);
|
||||
}
|
||||
Monitor.Exit(sync);
|
||||
if (num != -1)
|
||||
{
|
||||
}
|
||||
}
|
||||
while (num != 0);
|
||||
}
|
||||
|
||||
// Token: 0x0600673D RID: 26429 RVA: 0x0016A144 File Offset: 0x00168344
|
||||
[Token(Token = "0x600673D")]
|
||||
[Address(RVA = "0x1D5E070", Offset = "0x1D5CA70", VA = "0x181D5E070")]
|
||||
internal static void Register(SteamAPICall_t asyncCall, CallResult cr)
|
||||
{
|
||||
int num;
|
||||
do
|
||||
{
|
||||
num = 0;
|
||||
object sync = CallbackDispatcher.m_sync;
|
||||
Dictionary<ulong, List<CallResult>> registeredCallResults = CallbackDispatcher.m_registeredCallResults;
|
||||
bool flag;
|
||||
if (!flag)
|
||||
{
|
||||
List<CallResult> list = new List();
|
||||
Dictionary<ulong, List<CallResult>> registeredCallResults2 = CallbackDispatcher.m_registeredCallResults;
|
||||
}
|
||||
Monitor.Exit(sync);
|
||||
if (num != -1)
|
||||
{
|
||||
}
|
||||
}
|
||||
while (num != 0);
|
||||
}
|
||||
|
||||
// Token: 0x0600673E RID: 26430 RVA: 0x0016A194 File Offset: 0x00168394
|
||||
[Token(Token = "0x600673E")]
|
||||
[Address(RVA = "0x1D5F830", Offset = "0x1D5E230", VA = "0x181D5F830")]
|
||||
internal static void Unregister(Callback cb)
|
||||
{
|
||||
int num;
|
||||
do
|
||||
{
|
||||
num = 0;
|
||||
bool isGameServer = cb.IsGameServer;
|
||||
if (cb.ToString() != 0)
|
||||
{
|
||||
}
|
||||
Dictionary<int, List<Callback>> 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);
|
||||
if (num != -1)
|
||||
{
|
||||
}
|
||||
}
|
||||
while (num != 0);
|
||||
}
|
||||
|
||||
// Token: 0x0600673F RID: 26431 RVA: 0x0016A1FC File Offset: 0x001683FC
|
||||
[Token(Token = "0x600673F")]
|
||||
[Address(RVA = "0x1D5F5F0", Offset = "0x1D5DFF0", VA = "0x181D5F5F0")]
|
||||
internal static void Unregister(SteamAPICall_t asyncCall, CallResult cr)
|
||||
{
|
||||
int num;
|
||||
do
|
||||
{
|
||||
num = 0;
|
||||
object sync = CallbackDispatcher.m_sync;
|
||||
Dictionary<ulong, List<CallResult>> registeredCallResults = CallbackDispatcher.m_registeredCallResults;
|
||||
bool flag;
|
||||
if (flag)
|
||||
{
|
||||
Dictionary<ulong, List<CallResult>> registeredCallResults2 = CallbackDispatcher.m_registeredCallResults;
|
||||
}
|
||||
Monitor.Exit(sync);
|
||||
if (num != -1)
|
||||
{
|
||||
}
|
||||
}
|
||||
while (num != 0);
|
||||
}
|
||||
|
||||
// Token: 0x06006740 RID: 26432 RVA: 0x0016A248 File Offset: 0x00168448
|
||||
[Token(Token = "0x6006740")]
|
||||
[Address(RVA = "0x1D5EE60", Offset = "0x1D5D860", VA = "0x181D5EE60")]
|
||||
private static void UnregisterAll()
|
||||
{
|
||||
for (;;)
|
||||
{
|
||||
int num = 0;
|
||||
List<Callback> list = new List();
|
||||
List<CallResult> list2 = new List();
|
||||
object sync = CallbackDispatcher.m_sync;
|
||||
Dictionary<int, List<Callback>> registeredCallbacks = CallbackDispatcher.m_registeredCallbacks;
|
||||
Dictionary.Enumerator enumerator;
|
||||
if (enumerator != 0)
|
||||
{
|
||||
}
|
||||
if (num == -1)
|
||||
{
|
||||
goto IL_3A;
|
||||
}
|
||||
CallbackDispatcher.m_registeredCallbacks.Clear();
|
||||
Dictionary<int, List<Callback>> registeredGameServerCallbacks = CallbackDispatcher.m_registeredGameServerCallbacks;
|
||||
Dictionary.Enumerator enumerator2;
|
||||
if (enumerator2 != 0)
|
||||
{
|
||||
goto IL_3A;
|
||||
}
|
||||
IL_41:
|
||||
num++;
|
||||
if (num == -1)
|
||||
{
|
||||
goto IL_5F;
|
||||
}
|
||||
CallbackDispatcher.m_registeredGameServerCallbacks.Clear();
|
||||
Dictionary<ulong, List<CallResult>> registeredCallResults = CallbackDispatcher.m_registeredCallResults;
|
||||
Dictionary.Enumerator enumerator3;
|
||||
if (enumerator3 != 0)
|
||||
{
|
||||
goto IL_5F;
|
||||
}
|
||||
IL_63:
|
||||
num++;
|
||||
if (num == -1)
|
||||
{
|
||||
goto IL_87;
|
||||
}
|
||||
Dictionary<ulong, List<CallResult>> registeredCallResults2 = CallbackDispatcher.m_registeredCallResults;
|
||||
registeredCallResults2.Clear();
|
||||
List.Enumerator enumerator4;
|
||||
if (enumerator4 != 0)
|
||||
{
|
||||
ICollection<ulong> collection = registeredCallResults2.System.Collections.Generic.IDictionary<TKey,TValue>.get_Keys();
|
||||
goto IL_87;
|
||||
}
|
||||
IL_8B:
|
||||
num++;
|
||||
List.Enumerator enumerator5;
|
||||
if ((num == -1 || enumerator5 != 0) && num != 0)
|
||||
{
|
||||
goto IL_D3;
|
||||
}
|
||||
num++;
|
||||
if (num != -1)
|
||||
{
|
||||
}
|
||||
if (num != 0)
|
||||
{
|
||||
goto IL_D9;
|
||||
}
|
||||
Monitor.Exit(registeredCallResults2);
|
||||
if (num != -1)
|
||||
{
|
||||
}
|
||||
if (num == 0)
|
||||
{
|
||||
break;
|
||||
}
|
||||
continue;
|
||||
IL_87:
|
||||
if (num == 0)
|
||||
{
|
||||
goto IL_8B;
|
||||
}
|
||||
goto IL_CD;
|
||||
IL_5F:
|
||||
if (num == 0)
|
||||
{
|
||||
goto IL_63;
|
||||
}
|
||||
goto IL_C7;
|
||||
IL_3A:
|
||||
if (num == 0)
|
||||
{
|
||||
goto IL_41;
|
||||
}
|
||||
goto IL_C1;
|
||||
}
|
||||
return;
|
||||
IL_C1:
|
||||
throw new NullReferenceException();
|
||||
IL_C7:
|
||||
throw new NullReferenceException();
|
||||
IL_CD:
|
||||
throw new NullReferenceException();
|
||||
IL_D3:
|
||||
throw new NullReferenceException();
|
||||
IL_D9:
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x06006741 RID: 26433 RVA: 0x0016A360 File Offset: 0x00168560
|
||||
[Token(Token = "0x6006741")]
|
||||
[Address(RVA = "0x1D5E2C0", Offset = "0x1D5CCC0", VA = "0x181D5E2C0")]
|
||||
internal static void RunFrame(bool isGameServer)
|
||||
{
|
||||
for (;;)
|
||||
{
|
||||
int num = 0;
|
||||
if (isGameServer)
|
||||
{
|
||||
int num2 = NativeMethods.SteamGameServer_GetHSteamPipe();
|
||||
}
|
||||
int num3 = NativeMethods.SteamAPI_GetHSteamPipe();
|
||||
if (isGameServer)
|
||||
{
|
||||
}
|
||||
bool flag;
|
||||
if (flag)
|
||||
{
|
||||
IntPtr pCallbackMsg = CallbackDispatcher.m_pCallbackMsg;
|
||||
Type typeFromHandle = typeof(CallbackMsg_t);
|
||||
object obj = Marshal.PtrToStructure(pCallbackMsg, typeFromHandle);
|
||||
bool flag2;
|
||||
if (!flag2)
|
||||
{
|
||||
goto IL_E3;
|
||||
}
|
||||
object sync = CallbackDispatcher.m_sync;
|
||||
uint num4;
|
||||
num4 += (uint)1;
|
||||
Monitor.Exit(sync);
|
||||
List.Enumerator enumerator;
|
||||
if ((num4 == (uint)(-1) || enumerator != 0) && num != 0)
|
||||
{
|
||||
goto IL_FE;
|
||||
}
|
||||
num4 += (uint)1;
|
||||
if (num4 != (uint)(-1))
|
||||
{
|
||||
}
|
||||
if (num == 0)
|
||||
{
|
||||
Type typeFromHandle2 = typeof(SteamAPICallCompleted_t);
|
||||
object obj2 = Marshal.PtrToStructure(typeof(Marshal).TypeHandle, typeFromHandle2);
|
||||
bool flag3;
|
||||
if (flag3)
|
||||
{
|
||||
object sync2 = CallbackDispatcher.m_sync;
|
||||
Dictionary<ulong, List<CallResult>> registeredCallResults = CallbackDispatcher.m_registeredCallResults;
|
||||
bool flag4;
|
||||
if (flag4)
|
||||
{
|
||||
Dictionary<ulong, List<CallResult>> registeredCallResults2 = CallbackDispatcher.m_registeredCallResults;
|
||||
List.Enumerator enumerator2;
|
||||
if (enumerator2 != 0)
|
||||
{
|
||||
}
|
||||
num4 += (uint)1;
|
||||
if (num4 != (uint)(-1))
|
||||
{
|
||||
}
|
||||
if (num != 0)
|
||||
{
|
||||
goto IL_116;
|
||||
}
|
||||
}
|
||||
num4 += (uint)1;
|
||||
Monitor.Exit(sync2);
|
||||
if (num4 == (uint)(-1))
|
||||
{
|
||||
goto IL_E8;
|
||||
}
|
||||
}
|
||||
IntPtr intPtr;
|
||||
Marshal.FreeHGlobal(intPtr);
|
||||
goto IL_E3;
|
||||
}
|
||||
goto IL_104;
|
||||
IL_E8:
|
||||
if (num != 0)
|
||||
{
|
||||
goto IL_128;
|
||||
}
|
||||
num4 += (uint)1;
|
||||
if (num4 != (uint)(-1))
|
||||
{
|
||||
}
|
||||
if (num == 0)
|
||||
{
|
||||
break;
|
||||
}
|
||||
continue;
|
||||
IL_E3:
|
||||
num4 += (uint)1;
|
||||
goto IL_E8;
|
||||
}
|
||||
break;
|
||||
}
|
||||
return;
|
||||
IL_FE:
|
||||
throw new NullReferenceException();
|
||||
IL_104:
|
||||
throw new NullReferenceException();
|
||||
IL_116:
|
||||
throw new NullReferenceException();
|
||||
IL_128:
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x0400496A RID: 18794
|
||||
[Token(Token = "0x400496A")]
|
||||
private static Dictionary<int, List<Callback>> m_registeredCallbacks = new Dictionary();
|
||||
|
||||
// Token: 0x0400496B RID: 18795
|
||||
[Token(Token = "0x400496B")]
|
||||
private static Dictionary<int, List<Callback>> m_registeredGameServerCallbacks = new Dictionary();
|
||||
|
||||
// Token: 0x0400496C RID: 18796
|
||||
[Token(Token = "0x400496C")]
|
||||
private static Dictionary<ulong, List<CallResult>> m_registeredCallResults = new Dictionary();
|
||||
|
||||
// Token: 0x0400496D RID: 18797
|
||||
[Token(Token = "0x400496D")]
|
||||
private static object m_sync = new object();
|
||||
|
||||
// Token: 0x0400496E RID: 18798
|
||||
[Token(Token = "0x400496E")]
|
||||
private static IntPtr m_pCallbackMsg;
|
||||
|
||||
// Token: 0x0400496F RID: 18799
|
||||
[Token(Token = "0x400496F")]
|
||||
private static int m_initCount;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user