m
This commit is contained in:
@@ -0,0 +1,286 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.IO;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1
|
||||
{
|
||||
// Token: 0x02001E53 RID: 7763
|
||||
[Token(Token = "0x2001E53")]
|
||||
public class Asn1StreamParser
|
||||
{
|
||||
// Token: 0x0600C2A8 RID: 49832 RVA: 0x002C044C File Offset: 0x002BE64C
|
||||
[Token(Token = "0x600C2A8")]
|
||||
[Address(RVA = "0x22932A0", Offset = "0x22922A0", VA = "0x1822932A0")]
|
||||
public Asn1StreamParser(Stream inStream)
|
||||
{
|
||||
int num = Asn1InputStream.FindLimit(inStream);
|
||||
}
|
||||
|
||||
// Token: 0x0600C2A9 RID: 49833 RVA: 0x002C0460 File Offset: 0x002BE660
|
||||
[Token(Token = "0x600C2A9")]
|
||||
[Address(RVA = "0x2293150", Offset = "0x2292150", VA = "0x182293150")]
|
||||
public Asn1StreamParser(Stream inStream, int limit)
|
||||
{
|
||||
inStream.Dispose();
|
||||
this._in = inStream;
|
||||
this._limit = limit;
|
||||
byte[][] array = new byte[16][];
|
||||
this.tmpBuffers = array;
|
||||
}
|
||||
|
||||
// Token: 0x0600C2AA RID: 49834 RVA: 0x002C04AC File Offset: 0x002BE6AC
|
||||
[Token(Token = "0x600C2AA")]
|
||||
[Address(RVA = "0x2293220", Offset = "0x2292220", VA = "0x182293220")]
|
||||
public Asn1StreamParser(byte[] encoding)
|
||||
{
|
||||
int num;
|
||||
MemoryStream memoryStream = new MemoryStream(encoding, num != 0);
|
||||
num = 0;
|
||||
int length = encoding.Length;
|
||||
}
|
||||
|
||||
// Token: 0x0600C2AB RID: 49835 RVA: 0x002C04D0 File Offset: 0x002BE6D0
|
||||
[Token(Token = "0x600C2AB")]
|
||||
[Address(RVA = "0x22923E0", Offset = "0x22913E0", VA = "0x1822923E0")]
|
||||
internal IAsn1Convertible ReadIndef(int tagValue)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (0600C2AB)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.IAsn1Convertible BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Asn1StreamParser::ReadIndef(System.Int32)
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
Block_0:
|
||||
stfld:Asn1StreamParser(BerOctetStringParser::_parser, ldloc:BerOctetStringParser(var_0), ldloc:Asn1StreamParser(this))
|
||||
stloc:DerExternalParser(var_1_0D, newobj:DerExternalParser(DerExternalParser::.ctor, ldloc:Asn1StreamParser(this)))
|
||||
stloc:Asn1Exception(var_3_1E, newobj:Asn1Exception(Asn1Exception::.ctor, call:string(string::Concat, ldstr:string("unknown BER object encountered: 0x"), ldloc:string(var_2))))
|
||||
}
|
||||
|
||||
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: 0x0600C2AC RID: 49836 RVA: 0x002C04FC File Offset: 0x002BE6FC
|
||||
[Token(Token = "0x600C2AC")]
|
||||
[Address(RVA = "0x22921A0", Offset = "0x22911A0", VA = "0x1822921A0")]
|
||||
internal IAsn1Convertible ReadImplicit(bool constructed, int tag)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (0600C2AC)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.IAsn1Convertible BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Asn1StreamParser::ReadImplicit(System.Boolean,System.Int32)
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
IL_79:
|
||||
stloc:Asn1Exception(var_10_83, newobj:Asn1Exception(Asn1Exception::.ctor, ldstr:string("implicit tagging not implemented")))
|
||||
}
|
||||
|
||||
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: 0x0600C2AD RID: 49837 RVA: 0x002C0590 File Offset: 0x002BE790
|
||||
[Token(Token = "0x600C2AD")]
|
||||
[Address(RVA = "0x2292AC0", Offset = "0x2291AC0", VA = "0x182292AC0")]
|
||||
internal Asn1Object ReadTaggedObject(bool constructed, int tag)
|
||||
{
|
||||
Stream in2;
|
||||
do
|
||||
{
|
||||
if (constructed)
|
||||
{
|
||||
Asn1EncodableVector asn1EncodableVector = this.ReadVector();
|
||||
Stream @in = this._in;
|
||||
if (@in != 0 && @in != 0)
|
||||
{
|
||||
IList v = asn1EncodableVector.v;
|
||||
if (@in == (ulong)1L)
|
||||
{
|
||||
int num = 0;
|
||||
Asn1Encodable asn1Encodable = asn1EncodableVector[num];
|
||||
BerTaggedObject berTaggedObject = new BerTaggedObject(true, tag, asn1Encodable);
|
||||
}
|
||||
IList v2 = asn1EncodableVector.v;
|
||||
if (@in < (ulong)1L)
|
||||
{
|
||||
}
|
||||
BerSequence berSequence = new BerSequence(asn1EncodableVector);
|
||||
}
|
||||
IList v3 = asn1EncodableVector.v;
|
||||
if (asn1EncodableVector == (ulong)1L)
|
||||
{
|
||||
int num2 = 0;
|
||||
Asn1Encodable asn1Encodable2 = asn1EncodableVector[num2];
|
||||
}
|
||||
DerSequence derSequence = DerSequence.FromVector(asn1EncodableVector);
|
||||
}
|
||||
in2 = this._in;
|
||||
}
|
||||
while (in2 == 0);
|
||||
byte[] array;
|
||||
DerOctetString derOctetString = new DerOctetString(array);
|
||||
int num3;
|
||||
DerTaggedObject derTaggedObject = new DerTaggedObject(num3 != 0, tag, derOctetString);
|
||||
num3 = 0;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x0600C2AE RID: 49838 RVA: 0x002C0654 File Offset: 0x002BE854
|
||||
[Token(Token = "0x600C2AE")]
|
||||
[Address(RVA = "0x22924F0", Offset = "0x22914F0", VA = "0x1822924F0", Slot = "4")]
|
||||
public virtual IAsn1Convertible ReadObject()
|
||||
{
|
||||
int num;
|
||||
int num2;
|
||||
int num8;
|
||||
for (;;)
|
||||
{
|
||||
Stream @in = this._in;
|
||||
if (num == -1)
|
||||
{
|
||||
goto IL_164;
|
||||
}
|
||||
Stream in2 = this._in;
|
||||
if (in2 == 0 || in2 == 0 || (in2 != 0 && in2 != 0))
|
||||
{
|
||||
num2 = Asn1InputStream.ReadTagNumber(in2, num);
|
||||
int num3 = 0;
|
||||
int limit = this._limit;
|
||||
int num4 = Asn1InputStream.ReadLength(this._in, limit);
|
||||
DefiniteLengthInputStream definiteLengthInputStream = new DefiniteLengthInputStream(this._in, num3);
|
||||
if (num == 64)
|
||||
{
|
||||
if (num == 0)
|
||||
{
|
||||
if (num2 != 4)
|
||||
{
|
||||
byte[][] array = this.tmpBuffers;
|
||||
Asn1Object asn1Object = Asn1InputStream.CreatePrimitiveDerObject(num2, definiteLengthInputStream, array);
|
||||
}
|
||||
DerOctetStringParser derOctetStringParser = new DerOctetStringParser(definiteLengthInputStream);
|
||||
}
|
||||
if (num2 > 8)
|
||||
{
|
||||
if (num2 == 16)
|
||||
{
|
||||
int num5 = Asn1InputStream.FindLimit(definiteLengthInputStream);
|
||||
Asn1StreamParser asn1StreamParser;
|
||||
DerSequenceParser derSequenceParser = new DerSequenceParser(asn1StreamParser);
|
||||
}
|
||||
if (num2 != 17)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
int num6 = Asn1InputStream.FindLimit(definiteLengthInputStream);
|
||||
Asn1StreamParser asn1StreamParser2;
|
||||
DerSetParser derSetParser = new DerSetParser(asn1StreamParser2);
|
||||
}
|
||||
int num7;
|
||||
if (num2 == 4)
|
||||
{
|
||||
num7 = Asn1InputStream.FindLimit(definiteLengthInputStream);
|
||||
BerOctetStringParser berOctetStringParser;
|
||||
Asn1StreamParser asn1StreamParser3;
|
||||
berOctetStringParser._parser = asn1StreamParser3;
|
||||
}
|
||||
if (num2 != 8)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
num7 = Asn1InputStream.FindLimit(definiteLengthInputStream);
|
||||
Asn1StreamParser asn1StreamParser4;
|
||||
DerExternalParser derExternalParser = new DerExternalParser(asn1StreamParser4);
|
||||
num8 = Asn1InputStream.FindLimit(definiteLengthInputStream);
|
||||
num8 = num2;
|
||||
}
|
||||
int num9 = 0;
|
||||
byte[] array2 = definiteLengthInputStream.ToArray();
|
||||
DerApplicationSpecific derApplicationSpecific = new DerApplicationSpecific(num9 != 0, num8, array2);
|
||||
num8 = num2;
|
||||
if (derApplicationSpecific != 0)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
Asn1StreamParser asn1StreamParser5 = new Asn1StreamParser(new IndefiniteLengthInputStream(this._in, num8), num8);
|
||||
if (num == 64)
|
||||
{
|
||||
IAsn1Convertible asn1Convertible = asn1StreamParser5.ReadIndef(num2);
|
||||
}
|
||||
BerApplicationSpecificParser berApplicationSpecificParser;
|
||||
berApplicationSpecificParser.tag = num2;
|
||||
berApplicationSpecificParser.parser = asn1StreamParser5;
|
||||
IL_164:
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x0600C2AF RID: 49839 RVA: 0x002C07CC File Offset: 0x002BE9CC
|
||||
[Token(Token = "0x600C2AF")]
|
||||
[Address(RVA = "0x2293030", Offset = "0x2292030", VA = "0x182293030")]
|
||||
private void Set00Check(bool enabled)
|
||||
{
|
||||
Stream @in;
|
||||
do
|
||||
{
|
||||
@in = this._in;
|
||||
}
|
||||
while (@in != 0 && @in != 0 && (@in == 0 || @in == 0));
|
||||
}
|
||||
|
||||
// Token: 0x0600C2B0 RID: 49840 RVA: 0x002C07FC File Offset: 0x002BE9FC
|
||||
[Token(Token = "0x600C2B0")]
|
||||
[Address(RVA = "0x2292E60", Offset = "0x2291E60", VA = "0x182292E60")]
|
||||
internal Asn1EncodableVector ReadVector()
|
||||
{
|
||||
Asn1EncodableVector asn1EncodableVector;
|
||||
while (asn1EncodableVector != 0)
|
||||
{
|
||||
int num = 0;
|
||||
Asn1Encodable[] array = new Asn1Encodable[1];
|
||||
num += num;
|
||||
num++;
|
||||
if (array != 0)
|
||||
{
|
||||
}
|
||||
array[0] = array;
|
||||
asn1EncodableVector.Add(array);
|
||||
if (this.ToString() == 0)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
return asn1EncodableVector;
|
||||
}
|
||||
|
||||
// Token: 0x04007B0D RID: 31501
|
||||
[FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x4007B0D")]
|
||||
private readonly Stream _in;
|
||||
|
||||
// Token: 0x04007B0E RID: 31502
|
||||
[FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x4007B0E")]
|
||||
private readonly int _limit;
|
||||
|
||||
// Token: 0x04007B0F RID: 31503
|
||||
[FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x4007B0F")]
|
||||
private readonly byte[][] tmpBuffers;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user