176 lines
12 KiB
C#
176 lines
12 KiB
C#
using System;
|
|
using System.IO;
|
|
using System.Runtime.InteropServices;
|
|
using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities.Encoders;
|
|
using Cpp2IlInjected;
|
|
|
|
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1
|
|
{
|
|
// Token: 0x0200179E RID: 6046
|
|
[Token(Token = "0x200179E")]
|
|
[StructLayout(3)]
|
|
public abstract class Asn1OctetString : Asn1Object, Asn1OctetStringParser, IAsn1Convertible
|
|
{
|
|
// Token: 0x0600A337 RID: 41783 RVA: 0x0026040C File Offset: 0x0025E60C
|
|
[Token(Token = "0x600A337")]
|
|
[Address(RVA = "0x2676FD0", Offset = "0x26759D0", VA = "0x182676FD0")]
|
|
public static Asn1OctetString GetInstance(Asn1TaggedObject obj, bool isExplicit)
|
|
{
|
|
Asn1Encodable obj2 = obj.obj;
|
|
if (obj2 == 0)
|
|
{
|
|
}
|
|
Asn1Object asn1Object = obj2.ToAsn1Object();
|
|
if (!isExplicit && (asn1Object == 0 || asn1Object == 0))
|
|
{
|
|
BerOctetString berOctetString = BerOctetString.FromSequence(Asn1Sequence.GetInstance(asn1Object));
|
|
}
|
|
return Asn1OctetString.GetInstance(asn1Object);
|
|
}
|
|
|
|
// Token: 0x0600A338 RID: 41784 RVA: 0x00260454 File Offset: 0x0025E654
|
|
[Token(Token = "0x600A338")]
|
|
[Address(RVA = "0x2676DE0", Offset = "0x26757E0", VA = "0x182676DE0")]
|
|
public static Asn1OctetString GetInstance(object obj)
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (0600A338)
|
|
|
|
ICSharpCode.Decompiler.DecompilerException: Error decompiling BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Asn1OctetString BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Asn1OctetString::GetInstance(System.Object)
|
|
|
|
---> System.Exception: Basic block has to end with unconditional control flow.
|
|
{
|
|
IL_25:
|
|
stloc:ArgumentException(var_8_36, newobj:ArgumentException(ArgumentException::.ctor, call:string(string::Concat, ldstr:string("illegal object in GetInstance: "), ldloc:string(var_7))))
|
|
}
|
|
|
|
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: 0x0600A339 RID: 41785 RVA: 0x00260498 File Offset: 0x0025E698
|
|
[Token(Token = "0x600A339")]
|
|
[Address(RVA = "0x2677180", Offset = "0x2675B80", VA = "0x182677180")]
|
|
internal Asn1OctetString(byte[] str)
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (0600A339)
|
|
|
|
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Asn1OctetString::.ctor(System.Byte[])
|
|
|
|
---> System.Exception: Basic block has to end with unconditional control flow.
|
|
{
|
|
IL_12:
|
|
stloc:ArgumentNullException(var_0_1C, newobj:ArgumentNullException(ArgumentNullException::.ctor, ldstr:string("str")))
|
|
}
|
|
|
|
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.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
|
|
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
|
|
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1846
|
|
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: 0x0600A33A RID: 41786 RVA: 0x002604C4 File Offset: 0x0025E6C4
|
|
[Token(Token = "0x600A33A")]
|
|
[Address(RVA = "0x2677200", Offset = "0x2675C00", VA = "0x182677200")]
|
|
internal Asn1OctetString(Asn1Encodable obj)
|
|
{
|
|
byte[] encoded = obj.GetEncoded("DER");
|
|
this.str = encoded;
|
|
}
|
|
|
|
// Token: 0x0600A33B RID: 41787 RVA: 0x00260500 File Offset: 0x0025E700
|
|
[Token(Token = "0x600A33B")]
|
|
[Address(RVA = "0x26770B0", Offset = "0x2675AB0", VA = "0x1826770B0", Slot = "9")]
|
|
public Stream GetOctetStream()
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (0600A33B)
|
|
|
|
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.IO.Stream BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Asn1OctetString::GetOctetStream()
|
|
|
|
---> System.Exception: Basic block has to end with unconditional control flow.
|
|
{
|
|
Block_0:
|
|
stloc:MemoryStream(var_0_0C, newobj:MemoryStream(MemoryStream::.ctor, ldfld:uint8[](Asn1OctetString::str, ldloc:Asn1OctetString(this)), ldloc:int32[exp:bool](var_1)))
|
|
stloc:int32(var_1, ldc.i4:int32(0))
|
|
}
|
|
|
|
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: 0x17001998 RID: 6552
|
|
// (get) Token: 0x0600A33C RID: 41788 RVA: 0x0000220F File Offset: 0x0000040F
|
|
[Token(Token = "0x17001998")]
|
|
public Asn1OctetStringParser Parser
|
|
{
|
|
[Token(Token = "0x600A33C")]
|
|
[Address(RVA = "0x518E70", Offset = "0x517870", VA = "0x180518E70")]
|
|
get
|
|
{
|
|
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
|
}
|
|
}
|
|
|
|
// Token: 0x0600A33D RID: 41789 RVA: 0x0026051C File Offset: 0x0025E71C
|
|
[Token(Token = "0x600A33D")]
|
|
[Address(RVA = "0x3C39A0", Offset = "0x3C23A0", VA = "0x1803C39A0", Slot = "10")]
|
|
public virtual byte[] GetOctets()
|
|
{
|
|
return this.str;
|
|
}
|
|
|
|
// Token: 0x0600A33E RID: 41790 RVA: 0x00260530 File Offset: 0x0025E730
|
|
[Token(Token = "0x600A33E")]
|
|
[Address(RVA = "0x2676D70", Offset = "0x2675770", VA = "0x182676D70", Slot = "8")]
|
|
protected override int Asn1GetHashCode()
|
|
{
|
|
Stream octetStream = this.GetOctetStream();
|
|
int num;
|
|
return num;
|
|
}
|
|
|
|
// Token: 0x0600A33F RID: 41791 RVA: 0x0000220F File Offset: 0x0000040F
|
|
[Token(Token = "0x600A33F")]
|
|
[Address(RVA = "0x2676C80", Offset = "0x2675680", VA = "0x182676C80", Slot = "7")]
|
|
protected override bool Asn1Equals(Asn1Object asn1Object)
|
|
{
|
|
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
|
}
|
|
|
|
// Token: 0x0600A340 RID: 41792 RVA: 0x00260548 File Offset: 0x0025E748
|
|
[Token(Token = "0x600A340")]
|
|
[Address(RVA = "0x2677110", Offset = "0x2675B10", VA = "0x182677110", Slot = "3")]
|
|
public override string ToString()
|
|
{
|
|
string text = Hex.ToHexString(this.str);
|
|
return "#" + text;
|
|
}
|
|
|
|
// Token: 0x04006B19 RID: 27417
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x10")]
|
|
[Token(Token = "0x4006B19")]
|
|
internal byte[] str;
|
|
}
|
|
}
|