oh dear
This commit is contained in:
@@ -0,0 +1,224 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using BestHTTP.Logger;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.Extensions
|
||||
{
|
||||
// Token: 0x02001F9F RID: 8095
|
||||
[Token(Token = "0x2001F9F")]
|
||||
public sealed class WriteOnlyBufferedStream : Stream
|
||||
{
|
||||
// Token: 0x1700209B RID: 8347
|
||||
// (get) Token: 0x0600CD18 RID: 52504 RVA: 0x002EECD0 File Offset: 0x002ECED0
|
||||
[Token(Token = "0x1700209B")]
|
||||
public override bool CanRead
|
||||
{
|
||||
[Token(Token = "0x600CD18")]
|
||||
[Address(RVA = "0x403930", Offset = "0x402730", VA = "0x180403930", Slot = "7")]
|
||||
get
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700209C RID: 8348
|
||||
// (get) Token: 0x0600CD19 RID: 52505 RVA: 0x002EECE0 File Offset: 0x002ECEE0
|
||||
[Token(Token = "0x1700209C")]
|
||||
public override bool CanSeek
|
||||
{
|
||||
[Token(Token = "0x600CD19")]
|
||||
[Address(RVA = "0x403930", Offset = "0x402730", VA = "0x180403930", Slot = "8")]
|
||||
get
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700209D RID: 8349
|
||||
// (get) Token: 0x0600CD1A RID: 52506 RVA: 0x002EECF0 File Offset: 0x002ECEF0
|
||||
[Token(Token = "0x1700209D")]
|
||||
public override bool CanWrite
|
||||
{
|
||||
[Token(Token = "0x600CD1A")]
|
||||
[Address(RVA = "0x460D40", Offset = "0x45FB40", VA = "0x180460D40", Slot = "9")]
|
||||
get
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700209E RID: 8350
|
||||
// (get) Token: 0x0600CD1B RID: 52507 RVA: 0x002EED00 File Offset: 0x002ECF00
|
||||
[Token(Token = "0x1700209E")]
|
||||
public override long Length
|
||||
{
|
||||
[Token(Token = "0x600CD1B")]
|
||||
[Address(RVA = "0x172C300", Offset = "0x172B100", VA = "0x18172C300", Slot = "10")]
|
||||
get
|
||||
{
|
||||
int length = this.buffer.Length;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700209F RID: 8351
|
||||
// (get) Token: 0x0600CD1C RID: 52508 RVA: 0x002EED20 File Offset: 0x002ECF20
|
||||
// (set) Token: 0x0600CD1D RID: 52509 RVA: 0x002EED34 File Offset: 0x002ECF34
|
||||
[Token(Token = "0x1700209F")]
|
||||
public override long Position
|
||||
{
|
||||
[Token(Token = "0x600CD1C")]
|
||||
[Address(RVA = "0x172C320", Offset = "0x172B120", VA = "0x18172C320", Slot = "11")]
|
||||
get
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (0600CD1C)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Int64 BestHTTP.Extensions.WriteOnlyBufferedStream::get_Position()
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
Block_0:
|
||||
stloc:int32(var_0_06, ldfld:int32(WriteOnlyBufferedStream::_position, ldloc:WriteOnlyBufferedStream(this)))
|
||||
}
|
||||
|
||||
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 = "0x600CD1D")]
|
||||
[Address(RVA = "0x172C330", Offset = "0x172B130", VA = "0x18172C330", Slot = "12")]
|
||||
set
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (0600CD1D)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.Extensions.WriteOnlyBufferedStream::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: 0x0600CD1E RID: 52510 RVA: 0x002EED4C File Offset: 0x002ECF4C
|
||||
[Token(Token = "0x600CD1E")]
|
||||
[Address(RVA = "0x172C250", Offset = "0x172B050", VA = "0x18172C250")]
|
||||
public WriteOnlyBufferedStream(Stream stream, int bufferSize)
|
||||
{
|
||||
this.stream = stream;
|
||||
byte[] array = VariableSizedBufferPool.Get((long)bufferSize, true);
|
||||
this.buffer = array;
|
||||
this._position = (int)((ulong)0L);
|
||||
}
|
||||
|
||||
// Token: 0x0600CD1F RID: 52511 RVA: 0x002EED80 File Offset: 0x002ECF80
|
||||
[Token(Token = "0x600CD1F")]
|
||||
[Address(RVA = "0x172C000", Offset = "0x172AE00", VA = "0x18172C000", Slot = "17")]
|
||||
public override void Flush()
|
||||
{
|
||||
if (this._position > 0)
|
||||
{
|
||||
if (HTTPManager.Logger == 0)
|
||||
{
|
||||
ILogger logger = HTTPManager.Logger;
|
||||
int position = this._position;
|
||||
}
|
||||
int num = this.stream.ReadByte();
|
||||
this._position = (int)((ulong)0L);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600CD20 RID: 52512 RVA: 0x002EEDCC File Offset: 0x002ECFCC
|
||||
[Token(Token = "0x600CD20")]
|
||||
[Address(RVA = "0x172C140", Offset = "0x172AF40", VA = "0x18172C140", Slot = "29")]
|
||||
public override void Write(byte[] bufferFrom, int offset, int count)
|
||||
{
|
||||
if (count > 0)
|
||||
{
|
||||
byte[] array = this.buffer;
|
||||
int position = this._position;
|
||||
int num = array.Length;
|
||||
num -= position;
|
||||
int num2 = Math.Min(count, num);
|
||||
int position2 = this._position;
|
||||
byte[] array2 = this.buffer;
|
||||
Array.Copy(bufferFrom, offset, array2, position2, num2);
|
||||
int num3 = this._position;
|
||||
byte[] array3 = this.buffer;
|
||||
num3 += num2;
|
||||
this._position = num3;
|
||||
if (num3 == array3.Length)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600CD21 RID: 52513 RVA: 0x002EEE50 File Offset: 0x002ED050
|
||||
[Token(Token = "0x600CD21")]
|
||||
[Address(RVA = "0x43E630", Offset = "0x43D430", VA = "0x18043E630", Slot = "27")]
|
||||
public override int Read(byte[] buffer, int offset, int count)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Token: 0x0600CD22 RID: 52514 RVA: 0x002EEE60 File Offset: 0x002ED060
|
||||
[Token(Token = "0x600CD22")]
|
||||
[Address(RVA = "0x43E630", Offset = "0x43D430", VA = "0x18043E630", Slot = "25")]
|
||||
public override long Seek(long offset, SeekOrigin origin)
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x0600CD23 RID: 52515 RVA: 0x0000220F File Offset: 0x0000040F
|
||||
[Token(Token = "0x600CD23")]
|
||||
[Address(RVA = "0x402080", Offset = "0x400E80", VA = "0x180402080", Slot = "26")]
|
||||
public override void SetLength(long value)
|
||||
{
|
||||
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
||||
}
|
||||
|
||||
// Token: 0x0600CD24 RID: 52516 RVA: 0x002EEE70 File Offset: 0x002ED070
|
||||
[Token(Token = "0x600CD24")]
|
||||
[Address(RVA = "0x172BF80", Offset = "0x172AD80", VA = "0x18172BF80", Slot = "16")]
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
this.SetLength(disposing ? 1L : 0L);
|
||||
byte[] array = this.buffer;
|
||||
if (array != 0)
|
||||
{
|
||||
VariableSizedBufferPool.Release(array);
|
||||
}
|
||||
this.buffer = (ulong)0L;
|
||||
}
|
||||
|
||||
// Token: 0x0400828A RID: 33418
|
||||
[FieldOffset(Offset = "0x28")]
|
||||
[Token(Token = "0x400828A")]
|
||||
private int _position;
|
||||
|
||||
// Token: 0x0400828B RID: 33419
|
||||
[FieldOffset(Offset = "0x30")]
|
||||
[Token(Token = "0x400828B")]
|
||||
private byte[] buffer;
|
||||
|
||||
// Token: 0x0400828C RID: 33420
|
||||
[FieldOffset(Offset = "0x38")]
|
||||
[Token(Token = "0x400828C")]
|
||||
private Stream stream;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user