using System; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using Cpp2IlInjected; namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Engines { // Token: 0x020016D2 RID: 5842 [Token(Token = "0x20016D2")] [StructLayout(3)] public class SkipjackEngine : IBlockCipher { // Token: 0x06009D24 RID: 40228 RVA: 0x0023D3FC File Offset: 0x0023B5FC [Token(Token = "0x6009D24")] [Address(RVA = "0x210B490", Offset = "0x2109E90", VA = "0x18210B490", Slot = "10")] public virtual void Init(bool forEncryption, ICipherParameters parameters) { /* An exception occurred when decompiling this method (06009D24) ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Engines.SkipjackEngine::Init(System.Boolean,BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.ICipherParameters) ---> System.Exception: Basic block has to end with unconditional control flow. { IL_10A: stloc:ArgumentException(var_26_11B, newobj:ArgumentException(ArgumentException::.ctor, call:string(string::Concat, ldstr:string("invalid parameter passed to SKIPJACK init - "), ldloc:string(var_25)))) } 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: 0x170018F3 RID: 6387 // (get) Token: 0x06009D25 RID: 40229 RVA: 0x0023D528 File Offset: 0x0023B728 [Token(Token = "0x170018F3")] public virtual string AlgorithmName { [Token(Token = "0x6009D25")] [Address(RVA = "0x210B9D0", Offset = "0x210A3D0", VA = "0x18210B9D0", Slot = "11")] get { return "SKIPJACK"; } } // Token: 0x170018F4 RID: 6388 // (get) Token: 0x06009D26 RID: 40230 RVA: 0x0023D53C File Offset: 0x0023B73C [Token(Token = "0x170018F4")] public virtual bool IsPartialBlockOkay { [Token(Token = "0x6009D26")] [Address(RVA = "0x413970", Offset = "0x412370", VA = "0x180413970", Slot = "12")] get { } } // Token: 0x06009D27 RID: 40231 RVA: 0x0023D54C File Offset: 0x0023B74C [Token(Token = "0x6009D27")] [Address(RVA = "0x56E570", Offset = "0x56CF70", VA = "0x18056E570", Slot = "13")] public virtual int GetBlockSize() { return 8; } // Token: 0x06009D28 RID: 40232 RVA: 0x0023D55C File Offset: 0x0023B75C [Token(Token = "0x6009D28")] [Address(RVA = "0x210B840", Offset = "0x210A240", VA = "0x18210B840", Slot = "14")] public virtual int ProcessBlock(byte[] input, int inOff, byte[] output, int outOff) { /* An exception occurred when decompiling this method (06009D28) ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Int32 BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Engines.SkipjackEngine::ProcessBlock(System.Byte[],System.Int32,System.Byte[],System.Int32) ---> System.Exception: Basic block has to end with unconditional control flow. { IL_2B: stloc:InvalidOperationException(var_2_35, newobj:InvalidOperationException(InvalidOperationException::.ctor, ldstr:string("SKIPJACK engine not initialised"))) } 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: 0x06009D29 RID: 40233 RVA: 0x0000220F File Offset: 0x0000040F [Token(Token = "0x6009D29")] [Address(RVA = "0x3C9F60", Offset = "0x3C8960", VA = "0x1803C9F60", Slot = "15")] public virtual void Reset() { throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method."); } // Token: 0x06009D2A RID: 40234 RVA: 0x0023D5A0 File Offset: 0x0023B7A0 [Token(Token = "0x6009D2A")] [Address(RVA = "0x210B080", Offset = "0x2109A80", VA = "0x18210B080")] private int G(int k, int w) { short[] array = SkipjackEngine.ftable; int num = this.key0[k]; int length = array.Length; int num2 = this.key1[k]; int num3 = this.key2[k]; int num4 = this.key3[k]; return num3 + num3; } // Token: 0x06009D2B RID: 40235 RVA: 0x0023D600 File Offset: 0x0023B800 [Token(Token = "0x6009D2B")] [Address(RVA = "0x210AD30", Offset = "0x2109730", VA = "0x18210AD30", Slot = "16")] public virtual int EncryptBlock(byte[] input, int inOff, byte[] outBytes, int outOff) { int length = input.Length; int num = inOff + 1; byte b; byte b2; b += b2; byte b3; b3 += b2; byte b4; b4 += b2; byte b5; b5 += b2; int num2 = 0; b5 = b4; b4 = b3; int num3 = this.G(num2, (int)b); num2++; while (inOff != length) { } b5 = b4; int num4 = this.G(num2, num2); num2++; while (inOff != length) { } while (inOff != length) { } throw new NullReferenceException(); } // Token: 0x06009D2C RID: 40236 RVA: 0x0023D674 File Offset: 0x0023B874 [Token(Token = "0x6009D2C")] [Address(RVA = "0x210B280", Offset = "0x2109C80", VA = "0x18210B280")] private int H(int k, int w) { short[] array = SkipjackEngine.ftable; int num = this.key3[k]; int length = array.Length; int num2 = this.key2[k]; int num3 = this.key1[k]; int num4 = this.key0[k]; return w; } // Token: 0x06009D2D RID: 40237 RVA: 0x0023D6CC File Offset: 0x0023B8CC [Token(Token = "0x6009D2D")] [Address(RVA = "0x210A9D0", Offset = "0x21093D0", VA = "0x18210A9D0", Slot = "17")] public virtual int DecryptBlock(byte[] input, int inOff, byte[] outBytes, int outOff) { int length = input.Length; int num = inOff + 1; byte b; byte b2; b += b2; byte b3; b3 += b2; byte b4; b4 += b2; byte b5; b5 += b2; b4 = b5; b5 = b; uint num3; int num2 = this.H((int)num3, (int)b3); uint num4 = num3 + 1U; while (inOff != length) { } uint num5 = num3 + 1U; b4 = b5; int num6 = this.H((int)num3, (int)num4); while (inOff != length) { } while (inOff != length) { } throw new NullReferenceException(); } // Token: 0x06009D2E RID: 40238 RVA: 0x0023D73C File Offset: 0x0023B93C [Token(Token = "0x6009D2E")] [Address(RVA = "0x3C1670", Offset = "0x3C0070", VA = "0x1803C1670")] public SkipjackEngine() { this.Reset(); } // Token: 0x06009D2F RID: 40239 RVA: 0x0023D750 File Offset: 0x0023B950 // Note: this type is marked as 'beforefieldinit'. [Token(Token = "0x6009D2F")] [Address(RVA = "0x210B970", Offset = "0x210A370", VA = "0x18210B970")] static SkipjackEngine() { short[] array = new short[256]; RuntimeHelpers.InitializeArray(array, fieldof(.21A3E0CD2847E2F12EEE37749A9E206494A55100).FieldHandle); SkipjackEngine.ftable = array; } // Token: 0x040066ED RID: 26349 [Token(Token = "0x40066ED")] private const int BLOCK_SIZE = 8; // Token: 0x040066EE RID: 26350 [Token(Token = "0x40066EE")] private static readonly short[] ftable; // Token: 0x040066EF RID: 26351 [global::Cpp2IlInjected.FieldOffset(Offset = "0x10")] [Token(Token = "0x40066EF")] private int[] key0; // Token: 0x040066F0 RID: 26352 [global::Cpp2IlInjected.FieldOffset(Offset = "0x18")] [Token(Token = "0x40066F0")] private int[] key1; // Token: 0x040066F1 RID: 26353 [global::Cpp2IlInjected.FieldOffset(Offset = "0x20")] [Token(Token = "0x40066F1")] private int[] key2; // Token: 0x040066F2 RID: 26354 [global::Cpp2IlInjected.FieldOffset(Offset = "0x28")] [Token(Token = "0x40066F2")] private int[] key3; // Token: 0x040066F3 RID: 26355 [global::Cpp2IlInjected.FieldOffset(Offset = "0x30")] [Token(Token = "0x40066F3")] private bool encrypting; } }