scripts
This commit is contained in:
@@ -0,0 +1,249 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using Cpp2IlInjected;
|
||||
using Microsoft.Win32.SafeHandles;
|
||||
|
||||
namespace Steamworks
|
||||
{
|
||||
// Token: 0x020010B0 RID: 4272
|
||||
[Token(Token = "0x20010B0")]
|
||||
[StructLayout(3)]
|
||||
public class InteropHelp
|
||||
{
|
||||
// Token: 0x060067E6 RID: 26598 RVA: 0x0000220F File Offset: 0x0000040F
|
||||
[Token(Token = "0x60067E6")]
|
||||
[Address(RVA = "0x3C9F60", Offset = "0x3C8960", VA = "0x1803C9F60")]
|
||||
public static void TestIfPlatformSupported()
|
||||
{
|
||||
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
||||
}
|
||||
|
||||
// Token: 0x060067E7 RID: 26599 RVA: 0x0016BD8C File Offset: 0x00169F8C
|
||||
[Token(Token = "0x60067E7")]
|
||||
[Address(RVA = "0x248CCB0", Offset = "0x248B6B0", VA = "0x18248CCB0")]
|
||||
public static void TestIfAvailableClient()
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (060067E7)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void Steamworks.InteropHelp::TestIfAvailableClient()
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
IL_1B:
|
||||
stloc:InvalidOperationException(var_2_25, newobj:InvalidOperationException(InvalidOperationException::.ctor, ldstr:string("Steamworks is not initialized.")))
|
||||
}
|
||||
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1852
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1846
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.Optimize(DecompilerContext context, ILBlock method, AutoPropertyProvider autoPropertyProvider, StateMachineKind& stateMachineKind, MethodDef& inlinedMethod, AsyncMethodDebugInfo& asyncInfo, ILAstOptimizationStep abortBeforeStep) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 355
|
||||
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 123
|
||||
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88
|
||||
--- End of inner exception stack trace ---
|
||||
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
|
||||
at ICSharpCode.Decompiler.Ast.AstBuilder.AddMethodBody(EntityDeclaration methodNode, EntityDeclaration& updatedNode, MethodDef method, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, MethodKind methodKind) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1663
|
||||
*/;
|
||||
}
|
||||
|
||||
// Token: 0x060067E8 RID: 26600 RVA: 0x0016BDC0 File Offset: 0x00169FC0
|
||||
[Token(Token = "0x60067E8")]
|
||||
[Address(RVA = "0x248CD60", Offset = "0x248B760", VA = "0x18248CD60")]
|
||||
public static void TestIfAvailableGameServer()
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (060067E8)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void Steamworks.InteropHelp::TestIfAvailableGameServer()
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
IL_1B:
|
||||
stloc:InvalidOperationException(var_2_25, newobj:InvalidOperationException(InvalidOperationException::.ctor, ldstr:string("Steamworks GameServer is not initialized.")))
|
||||
}
|
||||
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1852
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1846
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.Optimize(DecompilerContext context, ILBlock method, AutoPropertyProvider autoPropertyProvider, StateMachineKind& stateMachineKind, MethodDef& inlinedMethod, AsyncMethodDebugInfo& asyncInfo, ILAstOptimizationStep abortBeforeStep) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 355
|
||||
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 123
|
||||
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88
|
||||
--- End of inner exception stack trace ---
|
||||
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
|
||||
at ICSharpCode.Decompiler.Ast.AstBuilder.AddMethodBody(EntityDeclaration methodNode, EntityDeclaration& updatedNode, MethodDef method, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, MethodKind methodKind) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1663
|
||||
*/;
|
||||
}
|
||||
|
||||
// Token: 0x060067E9 RID: 26601 RVA: 0x0016BDF4 File Offset: 0x00169FF4
|
||||
[Token(Token = "0x60067E9")]
|
||||
[Address(RVA = "0x248CB80", Offset = "0x248B580", VA = "0x18248CB80")]
|
||||
public static string PtrToStringUTF8(IntPtr nativeUtf8)
|
||||
{
|
||||
int num = 0;
|
||||
if (!nativeUtf8.Equals(num))
|
||||
{
|
||||
int num2 = 0;
|
||||
byte b = Marshal.ReadByte(nativeUtf8, num2);
|
||||
num2++;
|
||||
if (num2 != 0)
|
||||
{
|
||||
byte[] array = new byte[num2];
|
||||
int length = array.Length;
|
||||
int num3 = 0;
|
||||
Marshal.Copy(nativeUtf8, array, num3, length);
|
||||
Encoding utf = Encoding.UTF8;
|
||||
}
|
||||
return string.Empty;
|
||||
}
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x060067EA RID: 26602 RVA: 0x0016BE54 File Offset: 0x0016A054
|
||||
[Token(Token = "0x60067EA")]
|
||||
[Address(RVA = "0x3C1670", Offset = "0x3C0070", VA = "0x1803C1670")]
|
||||
public InteropHelp()
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x020010B1 RID: 4273
|
||||
[Token(Token = "0x20010B1")]
|
||||
public class UTF8StringHandle : SafeHandleZeroOrMinusOneIsInvalid
|
||||
{
|
||||
// Token: 0x060067EB RID: 26603 RVA: 0x0016BE68 File Offset: 0x0016A068
|
||||
[Token(Token = "0x60067EB")]
|
||||
[Address(RVA = "0x24B10B0", Offset = "0x24AFAB0", VA = "0x1824B10B0")]
|
||||
public UTF8StringHandle(string str)
|
||||
: base(true)
|
||||
{
|
||||
if (str != 0)
|
||||
{
|
||||
object obj = Encoding.UTF8.Clone();
|
||||
byte[] array = new byte[str];
|
||||
byte[] bytes = Encoding.UTF8.GetBytes(str);
|
||||
IntPtr intPtr = Marshal.AllocHGlobal(array.Length);
|
||||
int length = array.Length;
|
||||
int num = 0;
|
||||
Marshal.Copy(array, num, intPtr, length);
|
||||
this.handle = intPtr;
|
||||
return;
|
||||
}
|
||||
this.handle = (IntPtr)((ulong)0L);
|
||||
}
|
||||
|
||||
// Token: 0x060067EC RID: 26604 RVA: 0x0016BEE0 File Offset: 0x0016A0E0
|
||||
[Token(Token = "0x60067EC")]
|
||||
[Address(RVA = "0x24B1040", Offset = "0x24AFA40", VA = "0x1824B1040", Slot = "7")]
|
||||
protected override bool ReleaseHandle()
|
||||
{
|
||||
this.Dispose();
|
||||
Marshal.FreeHGlobal(this.handle);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x020010B2 RID: 4274
|
||||
[Token(Token = "0x20010B2")]
|
||||
public class SteamParamStringArray
|
||||
{
|
||||
// Token: 0x060067ED RID: 26605 RVA: 0x0016BF00 File Offset: 0x0016A100
|
||||
[Token(Token = "0x60067ED")]
|
||||
[Address(RVA = "0x24B0CD0", Offset = "0x24AF6D0", VA = "0x1824B0CD0")]
|
||||
public SteamParamStringArray(IList<string> strings)
|
||||
{
|
||||
if (strings != 0)
|
||||
{
|
||||
IntPtr[] array = new IntPtr[0];
|
||||
int num = 0;
|
||||
this.m_Strings = array;
|
||||
if (num < array)
|
||||
{
|
||||
Encoding utf = Encoding.UTF8;
|
||||
object obj = utf.Clone();
|
||||
byte[] array2 = new byte[utf];
|
||||
Encoding utf2 = Encoding.UTF8;
|
||||
IntPtr[] strings2 = this.m_Strings;
|
||||
IntPtr intPtr = Marshal.AllocHGlobal(array2.Length);
|
||||
strings2[0] = intPtr;
|
||||
IntPtr intPtr2 = this.m_Strings[num];
|
||||
int num2 = 0;
|
||||
int length = array2.Length;
|
||||
Marshal.Copy(array2, num2, intPtr2, length);
|
||||
num++;
|
||||
}
|
||||
int num3 = Marshal.SizeOf(typeof(IntPtr));
|
||||
IntPtr intPtr3 = Marshal.AllocHGlobal(this.m_Strings.Length * num3);
|
||||
IntPtr[] strings3 = this.m_Strings;
|
||||
this.m_ptrStrings = intPtr3;
|
||||
int length2 = strings3.Length;
|
||||
int num4 = 0;
|
||||
Marshal.Copy(strings3, num4, intPtr3, length2);
|
||||
IntPtr intPtr4 = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(SteamParamStringArray_t)));
|
||||
this.m_pSteamParamStringArray = intPtr4;
|
||||
return;
|
||||
}
|
||||
int num5 = 0;
|
||||
this.m_pSteamParamStringArray = (IntPtr)num5;
|
||||
}
|
||||
|
||||
// Token: 0x060067EE RID: 26606 RVA: 0x0016C01C File Offset: 0x0016A21C
|
||||
[Token(Token = "0x60067EE")]
|
||||
[Address(RVA = "0x24B0B30", Offset = "0x24AF530", VA = "0x1824B0B30", Slot = "1")]
|
||||
protected override void Finalize()
|
||||
{
|
||||
int num;
|
||||
do
|
||||
{
|
||||
num = 0;
|
||||
IntPtr[] strings = this.m_Strings;
|
||||
if (num < strings.Length)
|
||||
{
|
||||
Marshal.FreeHGlobal(strings[num]);
|
||||
num++;
|
||||
}
|
||||
int num2 = 0;
|
||||
if (this.m_ptrStrings != (IntPtr)num2)
|
||||
{
|
||||
Marshal.FreeHGlobal(this.m_ptrStrings);
|
||||
}
|
||||
int num3 = 0;
|
||||
if (this.m_pSteamParamStringArray != (IntPtr)num3)
|
||||
{
|
||||
Marshal.FreeHGlobal(this.m_pSteamParamStringArray);
|
||||
}
|
||||
base..ctor();
|
||||
if (num != -1)
|
||||
{
|
||||
}
|
||||
}
|
||||
while (num != 0);
|
||||
}
|
||||
|
||||
// Token: 0x060067EF RID: 26607 RVA: 0x0016C0A0 File Offset: 0x0016A2A0
|
||||
[Token(Token = "0x60067EF")]
|
||||
[Address(RVA = "0x24B1020", Offset = "0x24AFA20", VA = "0x1824B1020")]
|
||||
public static implicit operator IntPtr(InteropHelp.SteamParamStringArray that)
|
||||
{
|
||||
return that.m_pSteamParamStringArray;
|
||||
}
|
||||
|
||||
// Token: 0x0400499A RID: 18842
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x400499A")]
|
||||
private IntPtr[] m_Strings;
|
||||
|
||||
// Token: 0x0400499B RID: 18843
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x400499B")]
|
||||
private IntPtr m_ptrStrings;
|
||||
|
||||
// Token: 0x0400499C RID: 18844
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x400499C")]
|
||||
private IntPtr m_pSteamParamStringArray;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user