Files
Aug2021-Cpp2IL-Dump/Assembly-CSharp/BestHTTP/SecureProtocol/Org/BouncyCastle/Asn1/IndefiniteLengthInputStream.cs
T
2026-04-10 22:50:51 +02:00

112 lines
5.0 KiB
C#

using System;
using System.IO;
using Cpp2IlInjected;
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1
{
// Token: 0x02001DBF RID: 7615
[Token(Token = "0x2001DBF")]
internal class IndefiniteLengthInputStream : LimitedInputStream
{
// Token: 0x0600C0E7 RID: 49383 RVA: 0x002BE5F4 File Offset: 0x002BC7F4
[Token(Token = "0x600C0E7")]
[Address(RVA = "0x283B320", Offset = "0x283A120", VA = "0x18283B320")]
internal IndefiniteLengthInputStream(Stream inStream, int limit)
{
this._in = inStream;
this._limit = limit;
int num = this.RequireByte();
this._lookAhead = num;
bool flag = this.CheckForEof();
}
// Token: 0x0600C0E8 RID: 49384 RVA: 0x002BE634 File Offset: 0x002BC834
[Token(Token = "0x600C0E8")]
[Address(RVA = "0x283B310", Offset = "0x283A110", VA = "0x18283B310")]
internal void SetEofOn00(bool eofOn00)
{
this._eofOn00 = eofOn00;
if (eofOn00)
{
bool flag = this.CheckForEof();
return;
}
}
// Token: 0x0600C0E9 RID: 49385 RVA: 0x002BE654 File Offset: 0x002BC854
[Token(Token = "0x600C0E9")]
[Address(RVA = "0x283B080", Offset = "0x2839E80", VA = "0x18283B080")]
private bool CheckForEof()
{
/*
An exception occurred when decompiling this method (0600C0E9)
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Boolean BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.IndefiniteLengthInputStream::CheckForEof()
---> System.Exception: Basic block has to end with unconditional control flow.
{
IL_22:
stloc:IOException(var_1_2C, newobj:IOException(IOException::.ctor, ldstr:string("malformed end-of-contents marker")))
}
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: 0x0600C0EA RID: 49386 RVA: 0x002BE690 File Offset: 0x002BC890
[Token(Token = "0x600C0EA")]
[Address(RVA = "0x283B170", Offset = "0x2839F70", VA = "0x18283B170", Slot = "27")]
public override int Read(byte[] buffer, int offset, int count)
{
if (!this._eofOn00 && count > 1)
{
Stream @in = this._in;
int lookAhead = this._lookAhead;
int num = this.RequireByte();
this._lookAhead = num;
}
return base.Read(buffer, offset, count);
}
// Token: 0x0600C0EB RID: 49387 RVA: 0x002BE6D8 File Offset: 0x002BC8D8
[Token(Token = "0x600C0EB")]
[Address(RVA = "0x283B120", Offset = "0x2839F20", VA = "0x18283B120", Slot = "28")]
public override int ReadByte()
{
if (this._eofOn00 && this.CheckForEof())
{
return -1;
}
int num = this.RequireByte();
this._lookAhead = num;
return num;
}
// Token: 0x0600C0EC RID: 49388 RVA: 0x002BE708 File Offset: 0x002BC908
[Token(Token = "0x600C0EC")]
[Address(RVA = "0x283B290", Offset = "0x283A090", VA = "0x18283B290")]
private int RequireByte()
{
Stream @in = this._in;
int num;
return num;
}
// Token: 0x040079CF RID: 31183
[FieldOffset(Offset = "0x40")]
[Token(Token = "0x40079CF")]
private int _lookAhead;
// Token: 0x040079D0 RID: 31184
[FieldOffset(Offset = "0x44")]
[Token(Token = "0x40079D0")]
private bool _eofOn00 = true;
}
}