using System; using Cpp2IlInjected; namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Engines { // Token: 0x02001D7E RID: 7550 [Token(Token = "0x2001D7E")] public class RC532Engine : IBlockCipher { // Token: 0x0600BBF7 RID: 48119 RVA: 0x002979A0 File Offset: 0x00295BA0 [Token(Token = "0x600BBF7")] [Address(RVA = "0x272F6F0", Offset = "0x272E6F0", VA = "0x18272F6F0")] public RC532Engine() { this.Reset(); this._noRounds = (int)((ulong)12L); } // Token: 0x17001D7C RID: 7548 // (get) Token: 0x0600BBF8 RID: 48120 RVA: 0x002979C0 File Offset: 0x00295BC0 [Token(Token = "0x17001D7C")] public virtual string AlgorithmName { [Token(Token = "0x600BBF8")] [Address(RVA = "0x272F710", Offset = "0x272E710", VA = "0x18272F710", Slot = "10")] get { return "RC5-32"; } } // Token: 0x17001D7D RID: 7549 // (get) Token: 0x0600BBF9 RID: 48121 RVA: 0x002979D4 File Offset: 0x00295BD4 [Token(Token = "0x17001D7D")] public virtual bool IsPartialBlockOkay { [Token(Token = "0x600BBF9")] [Address(RVA = "0x424690", Offset = "0x423690", VA = "0x180424690", Slot = "11")] get { } } // Token: 0x0600BBFA RID: 48122 RVA: 0x002979E4 File Offset: 0x00295BE4 [Token(Token = "0x600BBFA")] [Address(RVA = "0x681E00", Offset = "0x680E00", VA = "0x180681E00", Slot = "12")] public virtual int GetBlockSize() { return 8; } // Token: 0x0600BBFB RID: 48123 RVA: 0x002979F4 File Offset: 0x00295BF4 [Token(Token = "0x600BBFB")] [Address(RVA = "0x272F0D0", Offset = "0x272E0D0", VA = "0x18272F0D0", Slot = "13")] public virtual void Init(bool forEncryption, ICipherParameters parameters) { /* An exception occurred when decompiling this method (0600BBFB) ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Engines.RC532Engine::Init(System.Boolean,BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.ICipherParameters) ---> System.Exception: Basic block has to end with unconditional control flow. { IL_4A: stloc:ArgumentException(var_8_5B, newobj:ArgumentException(ArgumentException::.ctor, call:string(string::Concat, ldstr:string("invalid parameter passed to RC532 init - "), ldloc:string(var_7)))) } 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: 0x0600BBFC RID: 48124 RVA: 0x00297A60 File Offset: 0x00295C60 [Token(Token = "0x600BBFC")] [Address(RVA = "0x272F300", Offset = "0x272E300", VA = "0x18272F300", Slot = "14")] public virtual int ProcessBlock(byte[] input, int inOff, byte[] output, int outOff) { if (this.forEncryption) { int num; return num; } int num2; return num2; } // Token: 0x0600BBFD RID: 48125 RVA: 0x0000220F File Offset: 0x0000040F [Token(Token = "0x600BBFD")] [Address(RVA = "0x4242D0", Offset = "0x4232D0", VA = "0x1804242D0", Slot = "15")] public virtual void Reset() { throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method."); } // Token: 0x0600BBFE RID: 48126 RVA: 0x00297A7C File Offset: 0x00295C7C [Token(Token = "0x600BBFE")] [Address(RVA = "0x272F370", Offset = "0x272E370", VA = "0x18272F370")] private void SetKey(byte[] key) { int num = key.Length; num += 3; int[] array = new int[key]; int num2 = 0; int length = key.Length; if (num2 != length) { num2 += key; num2 -= key; num2++; } int[] array2 = new int[this._noRounds]; this._S = array2; int p = RC532Engine.P32; array2[0] = p; int[] s = this._S; uint num3; int[] s2; if (num3 < (uint)s.Length) { int length2 = s.Length; uint num4 = num3 - 1U; int num5 = s[(int)num4]; int length3 = s.Length; num3 += (uint)1; int num6 = RC532Engine.Q32; num6 += num5; s[0] = num6; s2 = this._S; } int length4 = s2.Length; if (array.Length > length4) { } if (num3 > (uint)0) { s2[0] = 0; int num7 = array[num2]; num7 += 0; num7 += num2; array[0] = num7; int[] s3 = this._S; num2++; } } // Token: 0x0600BBFF RID: 48127 RVA: 0x00297B8C File Offset: 0x00295D8C [Token(Token = "0x600BBFF")] [Address(RVA = "0x272ED60", Offset = "0x272DD60", VA = "0x18272ED60")] private int EncryptBlock(byte[] input, int inOff, byte[] outBytes, int outOff) { int num = this.BytesToWord(input, inOff); int[] s = this._S; int length = s.Length; int num2 = s[0]; num2 += num; int length2 = input.Length; byte b = input[input]; num = inOff + 7; int noRounds = this._noRounds; uint num4; uint num3 = num4 + 1U; byte b2; b = b2; int num5 = s[(int)num3]; num5 += (int)b; uint num6 = num3 + 1U; num4 += (uint)1; num3 += (uint)2; while (num4 <= (uint)noRounds) { } throw new NullReferenceException(); } // Token: 0x0600BC00 RID: 48128 RVA: 0x00297C18 File Offset: 0x00295E18 [Token(Token = "0x600BC00")] [Address(RVA = "0x272EA00", Offset = "0x272DA00", VA = "0x18272EA00")] private int DecryptBlock(byte[] input, int inOff, byte[] outBytes, int outOff) { int num = this.BytesToWord(input, inOff); int length = input.Length; num = inOff + 7; int i = this._noRounds; int length2 = this._S.Length; byte b2; byte b = b2 + 1; while (i >= 1) { } int[] s = this._S; byte b3; this._S[0] = (int)b3; throw new NullReferenceException(); } // Token: 0x0600BC01 RID: 48129 RVA: 0x00297C78 File Offset: 0x00295E78 [Token(Token = "0x600BC01")] [Address(RVA = "0x272F330", Offset = "0x272E330", VA = "0x18272F330")] private int RotateLeft(int x, int y) { return x; } // Token: 0x0600BC02 RID: 48130 RVA: 0x00297C88 File Offset: 0x00295E88 [Token(Token = "0x600BC02")] [Address(RVA = "0x272F350", Offset = "0x272E350", VA = "0x18272F350")] private int RotateRight(int x, int y) { return x; } // Token: 0x0600BC03 RID: 48131 RVA: 0x00297C98 File Offset: 0x00295E98 [Token(Token = "0x600BC03")] [Address(RVA = "0x25911A0", Offset = "0x25901A0", VA = "0x1825911A0")] private int BytesToWord(byte[] src, int srcOff) { int length = src.Length; int num = srcOff + 1; throw new NullReferenceException(); } // Token: 0x0600BC04 RID: 48132 RVA: 0x00297CB8 File Offset: 0x00295EB8 [Token(Token = "0x600BC04")] [Address(RVA = "0x2591100", Offset = "0x2590100", VA = "0x182591100")] private void WordToBytes(int word, byte[] dst, int dstOff) { int num = dstOff + 1; } // Token: 0x04007683 RID: 30339 [FieldOffset(Offset = "0x10")] [Token(Token = "0x4007683")] private int _noRounds; // Token: 0x04007684 RID: 30340 [FieldOffset(Offset = "0x18")] [Token(Token = "0x4007684")] private int[] _S; // Token: 0x04007685 RID: 30341 [Token(Token = "0x4007685")] private static readonly int P32; // Token: 0x04007686 RID: 30342 [Token(Token = "0x4007686")] private static readonly int Q32; // Token: 0x04007687 RID: 30343 [FieldOffset(Offset = "0x20")] [Token(Token = "0x4007687")] private bool forEncryption; } }