using System; using System.IO; using Cpp2IlInjected; namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1 { // Token: 0x02001E9F RID: 7839 [Token(Token = "0x2001E9F")] internal class IndefiniteLengthInputStream : LimitedInputStream { // Token: 0x0600C4B5 RID: 50357 RVA: 0x002C6E68 File Offset: 0x002C5068 [Token(Token = "0x600C4B5")] [Address(RVA = "0x2EAEEC0", Offset = "0x2EADEC0", VA = "0x182EAEEC0")] internal IndefiniteLengthInputStream(Stream inStream, int limit) : base(inStream, limit) { int num = this.RequireByte(); this._lookAhead = num; bool flag = this.CheckForEof(); } // Token: 0x0600C4B6 RID: 50358 RVA: 0x002C6E9C File Offset: 0x002C509C [Token(Token = "0x600C4B6")] [Address(RVA = "0x2EAEEB0", Offset = "0x2EADEB0", VA = "0x182EAEEB0")] internal void SetEofOn00(bool eofOn00) { this._eofOn00 = eofOn00; if (eofOn00) { bool flag = this.CheckForEof(); return; } } // Token: 0x0600C4B7 RID: 50359 RVA: 0x002C6EBC File Offset: 0x002C50BC [Token(Token = "0x600C4B7")] [Address(RVA = "0x2EAEC20", Offset = "0x2EADC20", VA = "0x182EAEC20")] private bool CheckForEof() { /* An exception occurred when decompiling this method (0600C4B7) 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: 0x0600C4B8 RID: 50360 RVA: 0x002C6EF8 File Offset: 0x002C50F8 [Token(Token = "0x600C4B8")] [Address(RVA = "0x2EAED10", Offset = "0x2EADD10", VA = "0x182EAED10", 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: 0x0600C4B9 RID: 50361 RVA: 0x002C6F40 File Offset: 0x002C5140 [Token(Token = "0x600C4B9")] [Address(RVA = "0x2EAECC0", Offset = "0x2EADCC0", VA = "0x182EAECC0", Slot = "28")] public override int ReadByte() { if (this._eofOn00 && this.CheckForEof()) { return -1; } int num = this.RequireByte(); this._lookAhead = num; return num; } // Token: 0x0600C4BA RID: 50362 RVA: 0x002C6F70 File Offset: 0x002C5170 [Token(Token = "0x600C4BA")] [Address(RVA = "0x2EAEE30", Offset = "0x2EADE30", VA = "0x182EAEE30")] private int RequireByte() { Stream @in = this._in; int num; return num; } // Token: 0x04007B88 RID: 31624 [FieldOffset(Offset = "0x40")] [Token(Token = "0x4007B88")] private int _lookAhead; // Token: 0x04007B89 RID: 31625 [FieldOffset(Offset = "0x44")] [Token(Token = "0x4007B89")] private bool _eofOn00 = true; } }