161 lines
9.2 KiB
C#
161 lines
9.2 KiB
C#
using System;
|
|
using System.Runtime.InteropServices;
|
|
using Cpp2IlInjected;
|
|
|
|
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509
|
|
{
|
|
// Token: 0x02001823 RID: 6179
|
|
[Token(Token = "0x2001823")]
|
|
[StructLayout(3)]
|
|
public class DisplayText : Asn1Encodable, IAsn1Choice
|
|
{
|
|
// Token: 0x0600A675 RID: 42613 RVA: 0x0026B19C File Offset: 0x0026939C
|
|
[Token(Token = "0x600A675")]
|
|
[Address(RVA = "0x2B02890", Offset = "0x2B01290", VA = "0x182B02890")]
|
|
public DisplayText(int type, string text)
|
|
{
|
|
if (text.m_stringLength > 200)
|
|
{
|
|
int num = 0;
|
|
uint num2;
|
|
string text2 = text.Substring(num, (int)num2);
|
|
}
|
|
this.contentType = type;
|
|
if (type != 0)
|
|
{
|
|
if (type != 0)
|
|
{
|
|
if (type != 0 && type == 1)
|
|
{
|
|
DerVisibleString derVisibleString = new DerVisibleString(text);
|
|
this.contents = derVisibleString;
|
|
return;
|
|
}
|
|
DerUtf8String derUtf8String = new DerUtf8String(text);
|
|
}
|
|
DerBmpString derBmpString = new DerBmpString(text);
|
|
}
|
|
DerIA5String derIA5String = new DerIA5String(text);
|
|
throw new NullReferenceException();
|
|
}
|
|
|
|
// Token: 0x0600A676 RID: 42614 RVA: 0x0026B20C File Offset: 0x0026940C
|
|
[Token(Token = "0x600A676")]
|
|
[Address(RVA = "0x2B029A0", Offset = "0x2B013A0", VA = "0x182B029A0")]
|
|
public DisplayText(string text)
|
|
{
|
|
if (text.m_stringLength > 200)
|
|
{
|
|
int num = 0;
|
|
string text2 = text.Substring(num, 200);
|
|
}
|
|
this.contentType = (int)((ulong)2L);
|
|
DerUtf8String derUtf8String = new DerUtf8String(text);
|
|
this.contents = derUtf8String;
|
|
}
|
|
|
|
// Token: 0x0600A677 RID: 42615 RVA: 0x0026B258 File Offset: 0x00269458
|
|
[Token(Token = "0x600A677")]
|
|
[Address(RVA = "0x9BBBE0", Offset = "0x9BA5E0", VA = "0x1809BBBE0")]
|
|
public DisplayText(IAsn1String contents)
|
|
{
|
|
this.contents = contents;
|
|
}
|
|
|
|
// Token: 0x0600A678 RID: 42616 RVA: 0x0026B274 File Offset: 0x00269474
|
|
[Token(Token = "0x600A678")]
|
|
[Address(RVA = "0x2B02600", Offset = "0x2B01000", VA = "0x182B02600")]
|
|
public static DisplayText GetInstance(object obj)
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (0600A678)
|
|
|
|
ICSharpCode.Decompiler.DecompilerException: Error decompiling BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509.DisplayText BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509.DisplayText::GetInstance(System.Object)
|
|
|
|
---> System.Exception: Basic block has to end with unconditional control flow.
|
|
{
|
|
IL_21:
|
|
stloc:string(var_3_27, call:string(Platform::GetTypeName, ldloc:object(obj)))
|
|
stloc:ArgumentException(var_4_3D, newobj:ArgumentException(ArgumentException::.ctor, call:string(string::Concat, ldstr:string("unknown object in factory: "), ldloc:string(var_3_27)), ldstr:string("obj")))
|
|
}
|
|
|
|
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: 0x0600A679 RID: 42617 RVA: 0x0026B2C0 File Offset: 0x002694C0
|
|
[Token(Token = "0x600A679")]
|
|
[Address(RVA = "0x2B02810", Offset = "0x2B01210", VA = "0x182B02810", Slot = "5")]
|
|
public override Asn1Object ToAsn1Object()
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (0600A679)
|
|
|
|
ICSharpCode.Decompiler.DecompilerException: Error decompiling BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Asn1Object BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509.DisplayText::ToAsn1Object()
|
|
|
|
---> System.Exception: Basic block has to end with unconditional control flow.
|
|
{
|
|
IL_0F:
|
|
brtrue(IL_0F, cne:bool(ldloc:IAsn1String(var_0_06), ldc.i4:int32[exp:IAsn1String](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.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: 0x0600A67A RID: 42618 RVA: 0x0026B2E0 File Offset: 0x002694E0
|
|
[Token(Token = "0x600A67A")]
|
|
[Address(RVA = "0x2B027C0", Offset = "0x2B011C0", VA = "0x182B027C0")]
|
|
public string GetString()
|
|
{
|
|
IAsn1String asn1String = this.contents;
|
|
throw new NullReferenceException();
|
|
}
|
|
|
|
// Token: 0x04006C44 RID: 27716
|
|
[Token(Token = "0x4006C44")]
|
|
public const int ContentTypeIA5String = 0;
|
|
|
|
// Token: 0x04006C45 RID: 27717
|
|
[Token(Token = "0x4006C45")]
|
|
public const int ContentTypeBmpString = 1;
|
|
|
|
// Token: 0x04006C46 RID: 27718
|
|
[Token(Token = "0x4006C46")]
|
|
public const int ContentTypeUtf8String = 2;
|
|
|
|
// Token: 0x04006C47 RID: 27719
|
|
[Token(Token = "0x4006C47")]
|
|
public const int ContentTypeVisibleString = 3;
|
|
|
|
// Token: 0x04006C48 RID: 27720
|
|
[Token(Token = "0x4006C48")]
|
|
public const int DisplayTextMaximumSize = 200;
|
|
|
|
// Token: 0x04006C49 RID: 27721
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x10")]
|
|
[Token(Token = "0x4006C49")]
|
|
internal readonly int contentType;
|
|
|
|
// Token: 0x04006C4A RID: 27722
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x18")]
|
|
[Token(Token = "0x4006C4A")]
|
|
internal readonly IAsn1String contents;
|
|
}
|
|
}
|