Files
Jan2021-Cpp2Il-Dump/Assembly-CSharp/BestHTTP/SecureProtocol/Org/BouncyCastle/Asn1/IndefiniteLengthInputStream.cs
T
2026-04-08 23:40:05 +02:00

113 lines
5.1 KiB
C#

using System;
using System.IO;
using System.Runtime.InteropServices;
using Cpp2IlInjected;
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1
{
// Token: 0x020017E2 RID: 6114
[Token(Token = "0x20017E2")]
[StructLayout(3)]
internal class IndefiniteLengthInputStream : LimitedInputStream
{
// Token: 0x0600A50D RID: 42253 RVA: 0x00266014 File Offset: 0x00264214
[Token(Token = "0x600A50D")]
[Address(RVA = "0x1DF0B20", Offset = "0x1DEF520", VA = "0x181DF0B20")]
internal IndefiniteLengthInputStream(Stream inStream, int limit)
: base(inStream, limit)
{
int num = this.RequireByte();
this._lookAhead = num;
bool flag = this.CheckForEof();
}
// Token: 0x0600A50E RID: 42254 RVA: 0x00266048 File Offset: 0x00264248
[Token(Token = "0x600A50E")]
[Address(RVA = "0x1DF0B10", Offset = "0x1DEF510", VA = "0x181DF0B10")]
internal void SetEofOn00(bool eofOn00)
{
this._eofOn00 = eofOn00;
if (eofOn00)
{
bool flag = this.CheckForEof();
return;
}
}
// Token: 0x0600A50F RID: 42255 RVA: 0x00266068 File Offset: 0x00264268
[Token(Token = "0x600A50F")]
[Address(RVA = "0x1DF0880", Offset = "0x1DEF280", VA = "0x181DF0880")]
private bool CheckForEof()
{
/*
An exception occurred when decompiling this method (0600A50F)
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: 0x0600A510 RID: 42256 RVA: 0x002660A4 File Offset: 0x002642A4
[Token(Token = "0x600A510")]
[Address(RVA = "0x1DF0970", Offset = "0x1DEF370", VA = "0x181DF0970", 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: 0x0600A511 RID: 42257 RVA: 0x002660EC File Offset: 0x002642EC
[Token(Token = "0x600A511")]
[Address(RVA = "0x1DF0920", Offset = "0x1DEF320", VA = "0x181DF0920", Slot = "28")]
public override int ReadByte()
{
if (this._eofOn00 && this.CheckForEof())
{
return -1;
}
int num = this.RequireByte();
this._lookAhead = num;
return num;
}
// Token: 0x0600A512 RID: 42258 RVA: 0x0026611C File Offset: 0x0026431C
[Token(Token = "0x600A512")]
[Address(RVA = "0x1DF0A90", Offset = "0x1DEF490", VA = "0x181DF0A90")]
private int RequireByte()
{
Stream @in = this._in;
int num;
return num;
}
// Token: 0x04006B8C RID: 27532
[global::Cpp2IlInjected.FieldOffset(Offset = "0x40")]
[Token(Token = "0x4006B8C")]
private int _lookAhead;
// Token: 0x04006B8D RID: 27533
[global::Cpp2IlInjected.FieldOffset(Offset = "0x44")]
[Token(Token = "0x4006B8D")]
private bool _eofOn00 = true;
}
}