This commit is contained in:
niko
2026-04-11 22:19:20 +02:00
parent 45b857ff11
commit 8fc35183db
17034 changed files with 2863552 additions and 0 deletions
@@ -0,0 +1,266 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Runtime.CompilerServices;
using System.Text;
using BestHTTP.Extensions;
using BestHTTP.WebSocket.Extensions;
using Cpp2IlInjected;
namespace BestHTTP.WebSocket.Frames
{
// Token: 0x020018CE RID: 6350
[Token(Token = "0x20018CE")]
public struct WebSocketFrameReader
{
// Token: 0x170017BF RID: 6079
// (get) Token: 0x06009557 RID: 38231 RVA: 0x0000220F File Offset: 0x0000040F
// (set) Token: 0x06009558 RID: 38232 RVA: 0x001EBC7C File Offset: 0x001E9E7C
[Token(Token = "0x170017BF")]
public byte Header
{
[Token(Token = "0x6009557")]
[Address(RVA = "0x60EA40", Offset = "0x60D840", VA = "0x18060EA40")]
[CompilerGenerated]
get
{
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
}
[Token(Token = "0x6009558")]
[Address(RVA = "0x737850", Offset = "0x736650", VA = "0x180737850")]
[CompilerGenerated]
private set
{
this.<Header>k__BackingField = value;
}
}
// Token: 0x170017C0 RID: 6080
// (get) Token: 0x06009559 RID: 38233 RVA: 0x001EBC90 File Offset: 0x001E9E90
// (set) Token: 0x0600955A RID: 38234 RVA: 0x001EBCA4 File Offset: 0x001E9EA4
[Token(Token = "0x170017C0")]
public bool IsFinal
{
[Token(Token = "0x6009559")]
[Address(RVA = "0x60EA30", Offset = "0x60D830", VA = "0x18060EA30")]
get;
[Token(Token = "0x600955A")]
[Address(RVA = "0x16AC720", Offset = "0x16AB520", VA = "0x1816AC720")]
private set;
}
// Token: 0x170017C1 RID: 6081
// (get) Token: 0x0600955B RID: 38235 RVA: 0x001EBCB8 File Offset: 0x001E9EB8
// (set) Token: 0x0600955C RID: 38236 RVA: 0x001EBCCC File Offset: 0x001E9ECC
[Token(Token = "0x170017C1")]
public WebSocketFrameTypes Type
{
[Token(Token = "0x600955B")]
[Address(RVA = "0x16AC6A0", Offset = "0x16AB4A0", VA = "0x1816AC6A0")]
get;
[Token(Token = "0x600955C")]
[Address(RVA = "0x16AC6C0", Offset = "0x16AB4C0", VA = "0x1816AC6C0")]
private set;
}
// Token: 0x170017C2 RID: 6082
// (get) Token: 0x0600955D RID: 38237 RVA: 0x001EBCE0 File Offset: 0x001E9EE0
// (set) Token: 0x0600955E RID: 38238 RVA: 0x001EBCF4 File Offset: 0x001E9EF4
[Token(Token = "0x170017C2")]
public bool HasMask
{
[Token(Token = "0x600955D")]
[Address(RVA = "0x164B1F0", Offset = "0x1649FF0", VA = "0x18164B1F0")]
get;
[Token(Token = "0x600955E")]
[Address(RVA = "0x16AC6B0", Offset = "0x16AB4B0", VA = "0x1816AC6B0")]
private set;
}
// Token: 0x170017C3 RID: 6083
// (get) Token: 0x0600955F RID: 38239 RVA: 0x001EBD08 File Offset: 0x001E9F08
// (set) Token: 0x06009560 RID: 38240 RVA: 0x001EBD1C File Offset: 0x001E9F1C
[Token(Token = "0x170017C3")]
public ulong Length
{
[Token(Token = "0x600955F")]
[Address(RVA = "0x57C630", Offset = "0x57B430", VA = "0x18057C630")]
get;
[Token(Token = "0x6009560")]
[Address(RVA = "0x737860", Offset = "0x736660", VA = "0x180737860")]
private set;
}
// Token: 0x170017C4 RID: 6084
// (get) Token: 0x06009561 RID: 38241 RVA: 0x001EBD30 File Offset: 0x001E9F30
// (set) Token: 0x06009562 RID: 38242 RVA: 0x001EBD44 File Offset: 0x001E9F44
[Token(Token = "0x170017C4")]
public byte[] Data
{
[Token(Token = "0x6009561")]
[Address(RVA = "0x3F6E20", Offset = "0x3F5C20", VA = "0x1803F6E20")]
get;
[Token(Token = "0x6009562")]
[Address(RVA = "0x3F7200", Offset = "0x3F6000", VA = "0x1803F7200")]
private set;
}
// Token: 0x170017C5 RID: 6085
// (get) Token: 0x06009563 RID: 38243 RVA: 0x001EBD58 File Offset: 0x001E9F58
// (set) Token: 0x06009564 RID: 38244 RVA: 0x001EBD6C File Offset: 0x001E9F6C
[Token(Token = "0x170017C5")]
public string DataAsText
{
[Token(Token = "0x6009563")]
[Address(RVA = "0x3F5F40", Offset = "0x3F4D40", VA = "0x1803F5F40")]
get;
[Token(Token = "0x6009564")]
[Address(RVA = "0x3F7210", Offset = "0x3F6010", VA = "0x1803F7210")]
private set;
}
// Token: 0x06009565 RID: 38245 RVA: 0x001EBD80 File Offset: 0x001E9F80
[Token(Token = "0x6009565")]
[Address(RVA = "0x1C40BC0", Offset = "0x1C3F9C0", VA = "0x181C40BC0")]
internal void Read(Stream stream)
{
int num;
this.<Header>k__BackingField = (byte)num;
this.<IsFinal>k__BackingField = stream != null;
this.<Type>k__BackingField = (WebSocketFrameTypes)num;
this.<HasMask>k__BackingField = stream != null;
int num2;
this.<Length>k__BackingField = (ulong)num2;
if (num2 != 126)
{
if (num2 != 127)
{
goto IL_81;
}
byte[] array;
stream.ReadBuffer(array, 8);
int num3 = 0;
Array.Reverse(array, num3, 8);
int num4 = 0;
ulong num5 = BitConverter.ToUInt64(array, num4);
}
byte[] array2;
stream.ReadBuffer(array2, 2);
int num6 = 0;
Array.Reverse(array2, num6, 2);
int num7 = 0;
ushort num8 = BitConverter.ToUInt16(array2, num7);
this.<Length>k__BackingField = (ulong)num8;
VariableSizedBufferPool.Release(array2);
IL_81:
int num9 = 0;
if ((this.<HasMask>k__BackingField ? 1 : 0) != num9)
{
}
ulong num10 = this.<Length>k__BackingField;
if (num10 != (ulong)0L)
{
ulong num11;
if (num10 > num11)
{
throw new OverflowException();
}
byte[] array3 = new byte[num10];
}
ulong num12;
byte[] array4 = VariableSizedBufferPool.Get((long)this.<Length>k__BackingField, num12 != 0UL);
this.<Data>k__BackingField = array4;
ulong num13 = this.<Length>k__BackingField;
if (num13 != (ulong)0L)
{
num13 -= (ulong)num9;
ulong num14 = this.<Length>k__BackingField;
if ((this.<HasMask>k__BackingField ? 1 : 0) != num9)
{
if (num14 != (ulong)0L)
{
byte[] array5 = this.<Data>k__BackingField;
num9++;
}
byte[] array6;
VariableSizedBufferPool.Release(array6);
}
}
}
// Token: 0x06009566 RID: 38246 RVA: 0x001EBEA0 File Offset: 0x001EA0A0
[Token(Token = "0x6009566")]
[Address(RVA = "0x1C40B50", Offset = "0x1C3F950", VA = "0x181C40B50")]
private byte ReadByte(Stream stream)
{
/*
An exception occurred when decompiling this method (06009566)
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Byte BestHTTP.WebSocket.Frames.WebSocketFrameReader::ReadByte(System.IO.Stream)
---> System.Exception: Basic block has to end with unconditional control flow.
{
Block_0:
stloc:Exception(var_2_07, call:Exception(ExceptionHelper::ServerClosedTCPStream))
}
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.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 1660
*/;
}
// Token: 0x06009567 RID: 38247 RVA: 0x0000220F File Offset: 0x0000040F
[Token(Token = "0x6009567")]
[Address(RVA = "0x1C406E0", Offset = "0x1C3F4E0", VA = "0x181C406E0")]
public void Assemble(List<WebSocketFrameReader> fragments)
{
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
}
// Token: 0x06009568 RID: 38248 RVA: 0x001EBEB4 File Offset: 0x001EA0B4
[Token(Token = "0x6009568")]
[Address(RVA = "0x1C409A0", Offset = "0x1C3F7A0", VA = "0x181C409A0")]
public void DecodeWithExtensions(WebSocket webSocket)
{
if (webSocket.<Extensions>k__BackingField != (ulong)0L)
{
int num = 0;
int num2 = 0;
IExtension[] <Extensions>k__BackingField = webSocket.<Extensions>k__BackingField;
int length = <Extensions>k__BackingField.Length;
if (num2 < length)
{
if (<Extensions>k__BackingField[num] != 0)
{
ulong num3 = this.<Length>k__BackingField;
byte[] array = this.<Data>k__BackingField;
byte[] array2 = this.<Data>k__BackingField;
if (array2 != array)
{
VariableSizedBufferPool.Release(array2);
this.<Data>k__BackingField = array;
int length2 = array.Length;
this.<Length>k__BackingField = (ulong)length2;
}
}
num++;
}
}
if (this.<Data>k__BackingField != (ulong)0L)
{
Encoding utf = Encoding.UTF8;
byte[] array3 = this.<Data>k__BackingField;
string @string = utf.GetString(array3);
byte[] array4 = this.<Data>k__BackingField;
this.<DataAsText>k__BackingField = @string;
VariableSizedBufferPool.Release(array4);
this.<Data>k__BackingField = (ulong)0L;
}
}
}
}