146 lines
8.6 KiB
C#
146 lines
8.6 KiB
C#
using System;
|
|
using System.IO;
|
|
using System.Runtime.InteropServices;
|
|
using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities.Zlib;
|
|
using Cpp2IlInjected;
|
|
|
|
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Tls
|
|
{
|
|
// Token: 0x02001592 RID: 5522
|
|
[Token(Token = "0x2001592")]
|
|
[StructLayout(3)]
|
|
public class TlsDeflateCompression : TlsCompression
|
|
{
|
|
// Token: 0x060092AD RID: 37549 RVA: 0x00208404 File Offset: 0x00206604
|
|
[Token(Token = "0x60092AD")]
|
|
[Address(RVA = "0x1E955B0", Offset = "0x1E93FB0", VA = "0x181E955B0")]
|
|
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: 0x060092AE RID: 37550 RVA: 0x00208448 File Offset: 0x00206648
|
|
[Token(Token = "0x60092AE")]
|
|
[Address(RVA = "0x1E95650", Offset = "0x1E94050", VA = "0x181E95650")]
|
|
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: 0x060092AF RID: 37551 RVA: 0x0020848C File Offset: 0x0020668C
|
|
[Token(Token = "0x60092AF")]
|
|
[Address(RVA = "0x1E95490", Offset = "0x1E93E90", VA = "0x181E95490", Slot = "6")]
|
|
public virtual Stream Compress(Stream output)
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (060092AF)
|
|
|
|
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: 0x060092B0 RID: 37552 RVA: 0x002084B0 File Offset: 0x002066B0
|
|
[Token(Token = "0x60092B0")]
|
|
[Address(RVA = "0x1E95520", Offset = "0x1E93F20", VA = "0x181E95520", Slot = "7")]
|
|
public virtual Stream Decompress(Stream output)
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (060092B0)
|
|
|
|
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: 0x040061C7 RID: 25031
|
|
[Token(Token = "0x40061C7")]
|
|
public const int LEVEL_NONE = 0;
|
|
|
|
// Token: 0x040061C8 RID: 25032
|
|
[Token(Token = "0x40061C8")]
|
|
public const int LEVEL_FASTEST = 1;
|
|
|
|
// Token: 0x040061C9 RID: 25033
|
|
[Token(Token = "0x40061C9")]
|
|
public const int LEVEL_SMALLEST = 9;
|
|
|
|
// Token: 0x040061CA RID: 25034
|
|
[Token(Token = "0x40061CA")]
|
|
public const int LEVEL_DEFAULT = -1;
|
|
|
|
// Token: 0x040061CB RID: 25035
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x10")]
|
|
[Token(Token = "0x40061CB")]
|
|
protected readonly ZStream zIn;
|
|
|
|
// Token: 0x040061CC RID: 25036
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x18")]
|
|
[Token(Token = "0x40061CC")]
|
|
protected readonly ZStream zOut;
|
|
|
|
// Token: 0x02001593 RID: 5523
|
|
[Token(Token = "0x2001593")]
|
|
protected class DeflateOutputStream : ZOutputStream
|
|
{
|
|
// Token: 0x060092B1 RID: 37553 RVA: 0x002084D4 File Offset: 0x002066D4
|
|
[Token(Token = "0x60092B1")]
|
|
[Address(RVA = "0x1E877A0", Offset = "0x1E861A0", VA = "0x181E877A0")]
|
|
public DeflateOutputStream(Stream output, ZStream z, bool compress)
|
|
: base(output, z)
|
|
{
|
|
this.compress = compress;
|
|
((IDisposable)this).Dispose();
|
|
}
|
|
|
|
// Token: 0x060092B2 RID: 37554 RVA: 0x0000220F File Offset: 0x0000040F
|
|
[Token(Token = "0x60092B2")]
|
|
[Address(RVA = "0x3C9F60", Offset = "0x3C8960", VA = "0x1803C9F60", Slot = "17")]
|
|
public override void Flush()
|
|
{
|
|
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
|
}
|
|
}
|
|
}
|
|
}
|