144 lines
8.5 KiB
C#
144 lines
8.5 KiB
C#
using System;
|
|
using System.IO;
|
|
using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities.Zlib;
|
|
using Cpp2IlInjected;
|
|
|
|
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Tls
|
|
{
|
|
// Token: 0x02001C4F RID: 7247
|
|
[Token(Token = "0x2001C4F")]
|
|
public class TlsDeflateCompression : TlsCompression
|
|
{
|
|
// Token: 0x0600B255 RID: 45653 RVA: 0x00268C54 File Offset: 0x00266E54
|
|
[Token(Token = "0x600B255")]
|
|
[Address(RVA = "0x4A1F90", Offset = "0x4A0F90", VA = "0x1804A1F90")]
|
|
public TlsDeflateCompression()
|
|
{
|
|
ZStream zstream = new ZStream();
|
|
this.zIn = zstream;
|
|
int num = zstream.inflateInit();
|
|
ZStream zstream2 = new ZStream();
|
|
this.zOut = zstream2;
|
|
int num2 = zstream2.deflateInit(-1);
|
|
}
|
|
|
|
// Token: 0x0600B256 RID: 45654 RVA: 0x00268C98 File Offset: 0x00266E98
|
|
[Token(Token = "0x600B256")]
|
|
[Address(RVA = "0x4A2030", Offset = "0x4A1030", VA = "0x1804A2030")]
|
|
public TlsDeflateCompression(int level)
|
|
{
|
|
ZStream zstream = new ZStream();
|
|
this.zIn = zstream;
|
|
int num = zstream.inflateInit();
|
|
ZStream zstream2 = new ZStream();
|
|
this.zOut = zstream2;
|
|
int num2 = zstream2.deflateInit(level);
|
|
}
|
|
|
|
// Token: 0x0600B257 RID: 45655 RVA: 0x00268CDC File Offset: 0x00266EDC
|
|
[Token(Token = "0x600B257")]
|
|
[Address(RVA = "0x4A1E70", Offset = "0x4A0E70", VA = "0x1804A1E70", Slot = "6")]
|
|
public virtual Stream Compress(Stream output)
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (0600B257)
|
|
|
|
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.IO.Stream BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Tls.TlsDeflateCompression::Compress(System.IO.Stream)
|
|
|
|
---> System.Exception: Basic block has to end with unconditional control flow.
|
|
{
|
|
Block_0:
|
|
stloc:ZStream(var_0_06, ldfld:ZStream(TlsDeflateCompression::zOut, ldloc:TlsDeflateCompression(this)))
|
|
stfld:bool(ZOutputStream::compress, ldloc:DeflateOutputStream[exp:ZOutputStream](var_1), ldc.i4:bool(1))
|
|
stloc:int32(var_2_14, callvirtgetter:int32(ZOutputStream::get_FlushMode, ldloc:DeflateOutputStream[exp:ZOutputStream](var_1)))
|
|
}
|
|
|
|
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: 0x0600B258 RID: 45656 RVA: 0x00268D00 File Offset: 0x00266F00
|
|
[Token(Token = "0x600B258")]
|
|
[Address(RVA = "0x4A1F00", Offset = "0x4A0F00", VA = "0x1804A1F00", Slot = "7")]
|
|
public virtual Stream Decompress(Stream output)
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (0600B258)
|
|
|
|
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.IO.Stream BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Tls.TlsDeflateCompression::Decompress(System.IO.Stream)
|
|
|
|
---> System.Exception: Basic block has to end with unconditional control flow.
|
|
{
|
|
Block_0:
|
|
stloc:ZStream(var_0_06, ldfld:ZStream(TlsDeflateCompression::zIn, ldloc:TlsDeflateCompression(this)))
|
|
stfld:bool(ZOutputStream::compress, ldloc:DeflateOutputStream[exp:ZOutputStream](var_1), ldc.i4:bool(0))
|
|
stloc:int32(var_2_14, callvirtgetter:int32(ZOutputStream::get_FlushMode, ldloc:DeflateOutputStream[exp:ZOutputStream](var_1)))
|
|
}
|
|
|
|
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: 0x040071C3 RID: 29123
|
|
[Token(Token = "0x40071C3")]
|
|
public const int LEVEL_NONE = 0;
|
|
|
|
// Token: 0x040071C4 RID: 29124
|
|
[Token(Token = "0x40071C4")]
|
|
public const int LEVEL_FASTEST = 1;
|
|
|
|
// Token: 0x040071C5 RID: 29125
|
|
[Token(Token = "0x40071C5")]
|
|
public const int LEVEL_SMALLEST = 9;
|
|
|
|
// Token: 0x040071C6 RID: 29126
|
|
[Token(Token = "0x40071C6")]
|
|
public const int LEVEL_DEFAULT = -1;
|
|
|
|
// Token: 0x040071C7 RID: 29127
|
|
[FieldOffset(Offset = "0x10")]
|
|
[Token(Token = "0x40071C7")]
|
|
protected readonly ZStream zIn;
|
|
|
|
// Token: 0x040071C8 RID: 29128
|
|
[FieldOffset(Offset = "0x18")]
|
|
[Token(Token = "0x40071C8")]
|
|
protected readonly ZStream zOut;
|
|
|
|
// Token: 0x02001C50 RID: 7248
|
|
[Token(Token = "0x2001C50")]
|
|
protected class DeflateOutputStream : ZOutputStream
|
|
{
|
|
// Token: 0x0600B259 RID: 45657 RVA: 0x00268D24 File Offset: 0x00266F24
|
|
[Token(Token = "0x600B259")]
|
|
[Address(RVA = "0x4939D0", Offset = "0x4929D0", VA = "0x1804939D0")]
|
|
public DeflateOutputStream(Stream output, ZStream z, bool compress)
|
|
: base(output, z)
|
|
{
|
|
this.compress = compress;
|
|
((IDisposable)this).Dispose();
|
|
}
|
|
|
|
// Token: 0x0600B25A RID: 45658 RVA: 0x0000220F File Offset: 0x0000040F
|
|
[Token(Token = "0x600B25A")]
|
|
[Address(RVA = "0x4242D0", Offset = "0x4232D0", VA = "0x1804242D0", Slot = "17")]
|
|
public override void Flush()
|
|
{
|
|
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
|
}
|
|
}
|
|
}
|
|
}
|