Files
2026-04-10 22:50:51 +02:00

246 lines
12 KiB
C#

using System;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using System.Text;
using Cpp2IlInjected;
using Microsoft.Win32.SafeHandles;
namespace Steamworks
{
// Token: 0x020016CF RID: 5839
[Token(Token = "0x20016CF")]
public class InteropHelp
{
// Token: 0x0600875F RID: 34655 RVA: 0x0000220F File Offset: 0x0000040F
[Token(Token = "0x600875F")]
[Address(RVA = "0x402080", Offset = "0x400E80", VA = "0x180402080")]
public static void TestIfPlatformSupported()
{
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
}
// Token: 0x06008760 RID: 34656 RVA: 0x001CD678 File Offset: 0x001CB878
[Token(Token = "0x6008760")]
[Address(RVA = "0x23E1BD0", Offset = "0x23E09D0", VA = "0x1823E1BD0")]
public static void TestIfAvailableClient()
{
/*
An exception occurred when decompiling this method (06008760)
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: 0x06008761 RID: 34657 RVA: 0x001CD6AC File Offset: 0x001CB8AC
[Token(Token = "0x6008761")]
[Address(RVA = "0x23E1C80", Offset = "0x23E0A80", VA = "0x1823E1C80")]
public static void TestIfAvailableGameServer()
{
/*
An exception occurred when decompiling this method (06008761)
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: 0x06008762 RID: 34658 RVA: 0x001CD6E0 File Offset: 0x001CB8E0
[Token(Token = "0x6008762")]
[Address(RVA = "0x23E1AA0", Offset = "0x23E08A0", VA = "0x1823E1AA0")]
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: 0x06008763 RID: 34659 RVA: 0x001CD740 File Offset: 0x001CB940
[Token(Token = "0x6008763")]
[Address(RVA = "0x3F5100", Offset = "0x3F3F00", VA = "0x1803F5100")]
public InteropHelp()
{
}
// Token: 0x020016D0 RID: 5840
[Token(Token = "0x20016D0")]
public class UTF8StringHandle : SafeHandleZeroOrMinusOneIsInvalid
{
// Token: 0x06008764 RID: 34660 RVA: 0x001CD754 File Offset: 0x001CB954
[Token(Token = "0x6008764")]
[Address(RVA = "0x2406050", Offset = "0x2404E50", VA = "0x182406050")]
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: 0x06008765 RID: 34661 RVA: 0x001CD7CC File Offset: 0x001CB9CC
[Token(Token = "0x6008765")]
[Address(RVA = "0x2405FE0", Offset = "0x2404DE0", VA = "0x182405FE0", Slot = "7")]
protected override bool ReleaseHandle()
{
this.Dispose();
Marshal.FreeHGlobal(this.handle);
return true;
}
}
// Token: 0x020016D1 RID: 5841
[Token(Token = "0x20016D1")]
public class SteamParamStringArray
{
// Token: 0x06008766 RID: 34662 RVA: 0x001CD7EC File Offset: 0x001CB9EC
[Token(Token = "0x6008766")]
[Address(RVA = "0x2405C70", Offset = "0x2404A70", VA = "0x182405C70")]
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: 0x06008767 RID: 34663 RVA: 0x001CD908 File Offset: 0x001CBB08
[Token(Token = "0x6008767")]
[Address(RVA = "0x2405AF0", Offset = "0x24048F0", VA = "0x182405AF0", 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();
}
while (num != 0);
}
// Token: 0x06008768 RID: 34664 RVA: 0x001CD988 File Offset: 0x001CBB88
[Token(Token = "0x6008768")]
[Address(RVA = "0x2405FC0", Offset = "0x2404DC0", VA = "0x182405FC0")]
public static implicit operator IntPtr(InteropHelp.SteamParamStringArray that)
{
return that.m_pSteamParamStringArray;
}
// Token: 0x04005975 RID: 22901
[global::Cpp2IlInjected.FieldOffset(Offset = "0x10")]
[Token(Token = "0x4005975")]
private IntPtr[] m_Strings;
// Token: 0x04005976 RID: 22902
[global::Cpp2IlInjected.FieldOffset(Offset = "0x18")]
[Token(Token = "0x4005976")]
private IntPtr m_ptrStrings;
// Token: 0x04005977 RID: 22903
[global::Cpp2IlInjected.FieldOffset(Offset = "0x20")]
[Token(Token = "0x4005977")]
private IntPtr m_pSteamParamStringArray;
}
}
}