using System; using Cpp2IlInjected; namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes { // Token: 0x02001D15 RID: 7445 [Token(Token = "0x2001D15")] public class CtsBlockCipher : BufferedBlockCipher { // Token: 0x0600B813 RID: 47123 RVA: 0x0027CFA8 File Offset: 0x0027B1A8 [Token(Token = "0x600B813")] [Address(RVA = "0x25B6760", Offset = "0x25B5760", VA = "0x1825B6760")] public CtsBlockCipher(IBlockCipher cipher) { /* An exception occurred when decompiling this method (0600B813) ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes.CtsBlockCipher::.ctor(BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.IBlockCipher) ---> System.Exception: Basic block has to end with unconditional control flow. { IL_3B: stloc:ArgumentException(var_3_45, newobj:ArgumentException(ArgumentException::.ctor, ldstr:string("CtsBlockCipher can only accept ECB, or CBC ciphers"))) } 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: 0x0600B814 RID: 47124 RVA: 0x0027CFFC File Offset: 0x0027B1FC [Token(Token = "0x600B814")] [Address(RVA = "0x22E28C0", Offset = "0x22E18C0", VA = "0x1822E28C0", Slot = "26")] public override int GetUpdateOutputSize(int length) { byte[] buf = this.buf; int num = this.bufOff; int length2 = buf.Length; num += length; if (length != 0) { return num - length; } return num - length2; } // Token: 0x0600B815 RID: 47125 RVA: 0x0027D038 File Offset: 0x0027B238 [Token(Token = "0x600B815")] [Address(RVA = "0x22DB6C0", Offset = "0x22DA6C0", VA = "0x1822DB6C0", Slot = "25")] public override int GetOutputSize(int length) { int bufOff = this.bufOff; return bufOff + length; } // Token: 0x0600B816 RID: 47126 RVA: 0x0027D054 File Offset: 0x0027B254 [Token(Token = "0x600B816")] [Address(RVA = "0x25B6370", Offset = "0x25B5370", VA = "0x1825B6370", Slot = "28")] public override int ProcessByte(byte input, byte[] output, int outOff) { byte[] buf = this.buf; int num = 0; int bufOff = this.bufOff; if (bufOff == buf.Length) { IBlockCipher cipher = this.cipher; byte[] buf2 = this.buf; int num2 = 0; int num3 = this.blockSize; Array.Copy(buf2, num3, buf2, num2, num3); } int num4 = bufOff + 1; this.bufOff = num4; return num; } // Token: 0x0600B817 RID: 47127 RVA: 0x0027D0BC File Offset: 0x0027B2BC [Token(Token = "0x600B817")] [Address(RVA = "0x25B6470", Offset = "0x25B5470", VA = "0x1825B6470", Slot = "32")] public override int ProcessBytes(byte[] input, int inOff, int length, byte[] output, int outOff) { /* An exception occurred when decompiling this method (0600B817) ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Int32 BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes.CtsBlockCipher::ProcessBytes(System.Byte[],System.Int32,System.Int32,System.Byte[],System.Int32) ---> System.Exception: Basic block has to end with unconditional control flow. { IL_8C: stloc:uint8[](var_15_95, ldfld:uint8[](BufferedBlockCipher::buf, ldloc:CtsBlockCipher[exp:BufferedBlockCipher](this))) call:void(Array::Copy, ldloc:uint8[][exp:Array](input), ldloc:int32(inOff), ldloc:uint8[][exp:Array](var_15_95), ldloc:int32(var_13), ldloc:int32(length)) stloc:ArgumentException(var_16_AD, newobj:ArgumentException(ArgumentException::.ctor, ldstr:string("Can't have a negative input outLength!"))) } 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: 0x0600B818 RID: 47128 RVA: 0x0027D178 File Offset: 0x0027B378 [Token(Token = "0x600B818")] [Address(RVA = "0x25B5EE0", Offset = "0x25B4EE0", VA = "0x1825B5EE0", Slot = "36")] public override int DoFinal(byte[] output, int outOff) { for (;;) { int num = this.bufOff; num += outOff; IBlockCipher cipher = this.cipher; int bufOff = this.bufOff; byte[] array = new byte[0]; byte[] array2 = new byte[0]; IBlockCipher cipher2 = this.cipher; if (cipher2 == 0 || cipher2 != 0) { byte[] buf = this.buf; byte[] buf2 = this.buf; IBlockCipher cipher3 = this.cipher; IBlockCipher cipher4 = this.cipher; int num2 = this.bufOff; byte[] buf3 = this.buf; if (num2 != buf3.Length) { num2++; num2++; byte[] buf4 = this.buf; } byte[] buf5 = this.buf; num2 += buf5; num2++; IBlockCipher cipher5 = this.cipher; if (cipher5 == 0 || cipher5 != 0) { break; } } } int num3; return num3; } // Token: 0x0400741D RID: 29725 [FieldOffset(Offset = "0x28")] [Token(Token = "0x400741D")] private readonly int blockSize; } }