292 lines
14 KiB
C#
292 lines
14 KiB
C#
using System;
|
|
using System.IO;
|
|
using System.Runtime.InteropServices;
|
|
using BestHTTP.Extensions;
|
|
using BestHTTP.Logger;
|
|
using Cpp2IlInjected;
|
|
|
|
namespace BestHTTP
|
|
{
|
|
// Token: 0x0200129B RID: 4763
|
|
[Token(Token = "0x200129B")]
|
|
[StructLayout(3)]
|
|
public sealed class StreamList : Stream
|
|
{
|
|
// Token: 0x06007687 RID: 30343 RVA: 0x00187800 File Offset: 0x00185A00
|
|
[Token(Token = "0x6007687")]
|
|
[Address(RVA = "0x6F4420", Offset = "0x6F2E20", VA = "0x1806F4420")]
|
|
public StreamList(params Stream[] streams)
|
|
{
|
|
this.Streams = streams;
|
|
this.CurrentIdx = (int)((ulong)0L);
|
|
}
|
|
|
|
// Token: 0x17001321 RID: 4897
|
|
// (get) Token: 0x06007688 RID: 30344 RVA: 0x00187824 File Offset: 0x00185A24
|
|
[Token(Token = "0x17001321")]
|
|
public override bool CanRead
|
|
{
|
|
[Token(Token = "0x6007688")]
|
|
[Address(RVA = "0x6F4490", Offset = "0x6F2E90", VA = "0x1806F4490", Slot = "7")]
|
|
get
|
|
{
|
|
Stream[] streams = this.Streams;
|
|
int currentIdx = this.CurrentIdx;
|
|
int length = streams.Length;
|
|
if (currentIdx < length)
|
|
{
|
|
return streams[currentIdx].CanRead;
|
|
}
|
|
throw new NullReferenceException();
|
|
}
|
|
}
|
|
|
|
// Token: 0x17001322 RID: 4898
|
|
// (get) Token: 0x06007689 RID: 30345 RVA: 0x00187860 File Offset: 0x00185A60
|
|
[Token(Token = "0x17001322")]
|
|
public override bool CanSeek
|
|
{
|
|
[Token(Token = "0x6007689")]
|
|
[Address(RVA = "0x413970", Offset = "0x412370", VA = "0x180413970", Slot = "8")]
|
|
get
|
|
{
|
|
}
|
|
}
|
|
|
|
// Token: 0x17001323 RID: 4899
|
|
// (get) Token: 0x0600768A RID: 30346 RVA: 0x00187870 File Offset: 0x00185A70
|
|
[Token(Token = "0x17001323")]
|
|
public override bool CanWrite
|
|
{
|
|
[Token(Token = "0x600768A")]
|
|
[Address(RVA = "0x6F44F0", Offset = "0x6F2EF0", VA = "0x1806F44F0", Slot = "9")]
|
|
get
|
|
{
|
|
Stream[] streams = this.Streams;
|
|
int currentIdx = this.CurrentIdx;
|
|
int length = streams.Length;
|
|
if (currentIdx < length)
|
|
{
|
|
return streams[currentIdx].CanRead;
|
|
}
|
|
throw new NullReferenceException();
|
|
}
|
|
}
|
|
|
|
// Token: 0x0600768B RID: 30347 RVA: 0x001878AC File Offset: 0x00185AAC
|
|
[Token(Token = "0x600768B")]
|
|
[Address(RVA = "0x6F4080", Offset = "0x6F2A80", VA = "0x1806F4080", Slot = "17")]
|
|
public override void Flush()
|
|
{
|
|
Stream[] streams = this.Streams;
|
|
if (this.CurrentIdx < streams.Length)
|
|
{
|
|
int i = 0;
|
|
Stream stream = this.Streams[i];
|
|
i++;
|
|
while (i <= this.CurrentIdx)
|
|
{
|
|
}
|
|
}
|
|
}
|
|
|
|
// Token: 0x17001324 RID: 4900
|
|
// (get) Token: 0x0600768C RID: 30348 RVA: 0x001878F0 File Offset: 0x00185AF0
|
|
[Token(Token = "0x17001324")]
|
|
public override long Length
|
|
{
|
|
[Token(Token = "0x600768C")]
|
|
[Address(RVA = "0x6F4550", Offset = "0x6F2F50", VA = "0x1806F4550", Slot = "10")]
|
|
get
|
|
{
|
|
Stream[] streams = this.Streams;
|
|
int length = streams.Length;
|
|
if (this.CurrentIdx < length)
|
|
{
|
|
int num = 0;
|
|
if (num < streams.Length)
|
|
{
|
|
bool canWrite = streams[num].CanWrite;
|
|
Stream[] streams2 = this.Streams;
|
|
num++;
|
|
num += (canWrite ? 1 : 0);
|
|
}
|
|
}
|
|
throw new NullReferenceException();
|
|
}
|
|
}
|
|
|
|
// Token: 0x0600768D RID: 30349 RVA: 0x00187944 File Offset: 0x00185B44
|
|
[Token(Token = "0x600768D")]
|
|
[Address(RVA = "0x6F4100", Offset = "0x6F2B00", VA = "0x1806F4100", Slot = "27")]
|
|
public override int Read(byte[] buffer, int offset, int count)
|
|
{
|
|
Stream[] streams = this.Streams;
|
|
int currentIdx = this.CurrentIdx;
|
|
int length = streams.Length;
|
|
if (currentIdx < length)
|
|
{
|
|
Stream stream = streams[currentIdx];
|
|
int currentIdx2 = this.CurrentIdx;
|
|
int num = currentIdx2 + 1;
|
|
this.CurrentIdx = num;
|
|
Stream[] streams2 = this.Streams;
|
|
int length2 = streams2.Length;
|
|
if (currentIdx2 < length2)
|
|
{
|
|
int num2 = currentIdx2 + 1;
|
|
Stream stream2 = streams2[num2];
|
|
}
|
|
}
|
|
throw new NullReferenceException();
|
|
}
|
|
|
|
// Token: 0x0600768E RID: 30350 RVA: 0x001879B8 File Offset: 0x00185BB8
|
|
[Token(Token = "0x600768E")]
|
|
[Address(RVA = "0x6F43B0", Offset = "0x6F2DB0", VA = "0x1806F43B0", Slot = "29")]
|
|
public override void Write(byte[] buffer, int offset, int count)
|
|
{
|
|
Stream[] streams = this.Streams;
|
|
int currentIdx = this.CurrentIdx;
|
|
int length = streams.Length;
|
|
if (currentIdx < length)
|
|
{
|
|
bool canRead = streams[currentIdx].CanRead;
|
|
return;
|
|
}
|
|
}
|
|
|
|
// Token: 0x0600768F RID: 30351 RVA: 0x001879F4 File Offset: 0x00185BF4
|
|
[Token(Token = "0x600768F")]
|
|
[Address(RVA = "0x6F42F0", Offset = "0x6F2CF0", VA = "0x1806F42F0")]
|
|
public void Write(string str)
|
|
{
|
|
byte[] asciibytes = str.GetASCIIBytes();
|
|
int num = this.ReadByte();
|
|
VariableSizedBufferPool.Release(asciibytes);
|
|
}
|
|
|
|
// Token: 0x06007690 RID: 30352 RVA: 0x00187A1C File Offset: 0x00185C1C
|
|
[Token(Token = "0x6007690")]
|
|
[Address(RVA = "0x6F3F40", Offset = "0x6F2940", VA = "0x1806F3F40", Slot = "16")]
|
|
protected override void Dispose(bool disposing)
|
|
{
|
|
int num = 0;
|
|
Stream[] streams = this.Streams;
|
|
if (num < streams.Length)
|
|
{
|
|
this.Streams[num].Dispose();
|
|
ILogger logger = HTTPManager.Logger;
|
|
num++;
|
|
}
|
|
}
|
|
|
|
// Token: 0x17001325 RID: 4901
|
|
// (get) Token: 0x06007691 RID: 30353 RVA: 0x00187A70 File Offset: 0x00185C70
|
|
// (set) Token: 0x06007692 RID: 30354 RVA: 0x00187A88 File Offset: 0x00185C88
|
|
[Token(Token = "0x17001325")]
|
|
public override long Position
|
|
{
|
|
[Token(Token = "0x6007691")]
|
|
[Address(RVA = "0x6F4600", Offset = "0x6F3000", VA = "0x1806F4600", Slot = "11")]
|
|
get
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (06007691)
|
|
|
|
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Int64 BestHTTP.StreamList::get_Position()
|
|
|
|
---> System.Exception: Basic block has to end with unconditional control flow.
|
|
{
|
|
Block_0:
|
|
stloc:NotImplementedException(var_0_0A, newobj:NotImplementedException(NotImplementedException::.ctor, ldstr:string("Position get")))
|
|
}
|
|
|
|
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 1663
|
|
*/;
|
|
}
|
|
[Token(Token = "0x6007692")]
|
|
[Address(RVA = "0x6F4660", Offset = "0x6F3060", VA = "0x1806F4660", Slot = "12")]
|
|
set
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (06007692)
|
|
|
|
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.StreamList::set_Position(System.Int64)
|
|
|
|
---> System.Exception: Basic block has to end with unconditional control flow.
|
|
{
|
|
Block_0:
|
|
stloc:NotImplementedException(var_0_0A, newobj:NotImplementedException(NotImplementedException::.ctor, ldstr:string("Position set")))
|
|
}
|
|
|
|
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 1663
|
|
*/;
|
|
}
|
|
}
|
|
|
|
// Token: 0x06007693 RID: 30355 RVA: 0x00187AA0 File Offset: 0x00185CA0
|
|
[Token(Token = "0x6007693")]
|
|
[Address(RVA = "0x6F4230", Offset = "0x6F2C30", VA = "0x1806F4230", Slot = "25")]
|
|
public override long Seek(long offset, SeekOrigin origin)
|
|
{
|
|
Stream[] streams = this.Streams;
|
|
int currentIdx = this.CurrentIdx;
|
|
int length = streams.Length;
|
|
if (currentIdx < length)
|
|
{
|
|
bool canRead = streams[currentIdx].CanRead;
|
|
}
|
|
throw new NullReferenceException();
|
|
}
|
|
|
|
// Token: 0x06007694 RID: 30356 RVA: 0x00187ADC File Offset: 0x00185CDC
|
|
[Token(Token = "0x6007694")]
|
|
[Address(RVA = "0x6F4290", Offset = "0x6F2C90", VA = "0x1806F4290", Slot = "26")]
|
|
public override void SetLength(long value)
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (06007694)
|
|
|
|
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.StreamList::SetLength(System.Int64)
|
|
|
|
---> System.Exception: Basic block has to end with unconditional control flow.
|
|
{
|
|
Block_0:
|
|
stloc:NotImplementedException(var_0_0A, newobj:NotImplementedException(NotImplementedException::.ctor, ldstr:string("SetLength")))
|
|
}
|
|
|
|
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 1663
|
|
*/;
|
|
}
|
|
|
|
// Token: 0x040055DE RID: 21982
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x28")]
|
|
[Token(Token = "0x40055DE")]
|
|
private Stream[] Streams;
|
|
|
|
// Token: 0x040055DF RID: 21983
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x30")]
|
|
[Token(Token = "0x40055DF")]
|
|
private int CurrentIdx;
|
|
}
|
|
}
|