scripts
This commit is contained in:
+645
@@ -0,0 +1,645 @@
|
||||
using System;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Engines
|
||||
{
|
||||
// Token: 0x020016A9 RID: 5801
|
||||
[Token(Token = "0x20016A9")]
|
||||
[StructLayout(3)]
|
||||
public class CamelliaLightEngine : IBlockCipher
|
||||
{
|
||||
// Token: 0x06009B3A RID: 39738 RVA: 0x0022E094 File Offset: 0x0022C294
|
||||
[Token(Token = "0x6009B3A")]
|
||||
[Address(RVA = "0x22DFAE0", Offset = "0x22DE4E0", VA = "0x1822DFAE0")]
|
||||
private static uint rightRotate(uint x, int s)
|
||||
{
|
||||
return x;
|
||||
}
|
||||
|
||||
// Token: 0x06009B3B RID: 39739 RVA: 0x0022E0A4 File Offset: 0x0022C2A4
|
||||
[Token(Token = "0x6009B3B")]
|
||||
[Address(RVA = "0x22DEF90", Offset = "0x22DD990", VA = "0x1822DEF90")]
|
||||
private static uint leftRotate(uint x, int s)
|
||||
{
|
||||
return x;
|
||||
}
|
||||
|
||||
// Token: 0x06009B3C RID: 39740 RVA: 0x0022E0B4 File Offset: 0x0022C2B4
|
||||
[Token(Token = "0x6009B3C")]
|
||||
[Address(RVA = "0x22DFB00", Offset = "0x22DE500", VA = "0x1822DFB00")]
|
||||
private static void roldq(int rot, uint[] ki, int ioff, uint[] ko, int ooff)
|
||||
{
|
||||
int length = ki.Length;
|
||||
uint num = ki[ioff];
|
||||
int num2 = ioff + 1;
|
||||
uint num3 = ki[num2];
|
||||
ko[0] = num3;
|
||||
int length2 = ki.Length;
|
||||
uint num4 = ki[(int)num];
|
||||
ko[0] = num4;
|
||||
int length3 = ki.Length;
|
||||
uint num5 = ki[(int)num4];
|
||||
ko[0] = num5;
|
||||
int length4 = ki.Length;
|
||||
ko[0] = num5;
|
||||
uint num6;
|
||||
ki[0] = num6;
|
||||
uint num7;
|
||||
ki[0] = num7;
|
||||
ki[0] = num7;
|
||||
}
|
||||
|
||||
// Token: 0x06009B3D RID: 39741 RVA: 0x0022E154 File Offset: 0x0022C354
|
||||
[Token(Token = "0x6009B3D")]
|
||||
[Address(RVA = "0x22DE8F0", Offset = "0x22DD2F0", VA = "0x1822DE8F0")]
|
||||
private static void decroldq(int rot, uint[] ki, int ioff, uint[] ko, int ooff)
|
||||
{
|
||||
int length = ki.Length;
|
||||
uint num = ki[ioff];
|
||||
int num2 = ioff + 1;
|
||||
uint num3 = ki[num2];
|
||||
ko[0] = num3;
|
||||
int length2 = ki.Length;
|
||||
uint num4 = ki[(int)num];
|
||||
ko[0] = num4;
|
||||
int length3 = ki.Length;
|
||||
uint num5 = ki[(int)num];
|
||||
uint num6 = ki[(int)num4];
|
||||
ko[0] = num6;
|
||||
int length4 = ki.Length;
|
||||
ko[0] = num6;
|
||||
uint num7;
|
||||
ki[0] = num7;
|
||||
uint num8;
|
||||
ki[0] = num8;
|
||||
ki[0] = num8;
|
||||
}
|
||||
|
||||
// Token: 0x06009B3E RID: 39742 RVA: 0x0022E1F4 File Offset: 0x0022C3F4
|
||||
[Token(Token = "0x6009B3E")]
|
||||
[Address(RVA = "0x22DFE40", Offset = "0x22DE840", VA = "0x1822DFE40")]
|
||||
private static void roldqo32(int rot, uint[] ki, int ioff, uint[] ko, int ooff)
|
||||
{
|
||||
int length = ki.Length;
|
||||
int num = ioff + 1;
|
||||
uint num2;
|
||||
ko[0] = num2;
|
||||
int length2 = ki.Length;
|
||||
uint num3 = ki[(int)num2];
|
||||
ko[0] = num3;
|
||||
int length3 = ki.Length;
|
||||
uint num4 = ki[(int)num2];
|
||||
uint num5 = ki[ioff];
|
||||
ko[0] = num5;
|
||||
int length4 = ki.Length;
|
||||
uint num6 = ki[num];
|
||||
ko[0] = num6;
|
||||
uint num7;
|
||||
ki[0] = num7;
|
||||
uint num8;
|
||||
ki[0] = num8;
|
||||
uint num9 = ko[(int)num3];
|
||||
ki[0] = num9;
|
||||
}
|
||||
|
||||
// Token: 0x06009B3F RID: 39743 RVA: 0x0022E2A0 File Offset: 0x0022C4A0
|
||||
[Token(Token = "0x6009B3F")]
|
||||
[Address(RVA = "0x22DEC30", Offset = "0x22DD630", VA = "0x1822DEC30")]
|
||||
private static void decroldqo32(int rot, uint[] ki, int ioff, uint[] ko, int ooff)
|
||||
{
|
||||
int length = ki.Length;
|
||||
int num = ioff + 1;
|
||||
uint num2;
|
||||
ko[0] = num2;
|
||||
int length2 = ki.Length;
|
||||
uint num3 = ki[(int)num2];
|
||||
ko[0] = num3;
|
||||
int length3 = ki.Length;
|
||||
uint num4 = ki[(int)num2];
|
||||
uint num5 = ki[ioff];
|
||||
ko[0] = num5;
|
||||
int length4 = ki.Length;
|
||||
uint num6 = ki[num];
|
||||
ko[0] = num6;
|
||||
uint num7;
|
||||
ki[0] = num7;
|
||||
uint num8;
|
||||
ki[0] = num8;
|
||||
uint num9;
|
||||
ki[0] = num9;
|
||||
}
|
||||
|
||||
// Token: 0x06009B40 RID: 39744 RVA: 0x0022E33C File Offset: 0x0022C53C
|
||||
[Token(Token = "0x6009B40")]
|
||||
[Address(RVA = "0x22DE140", Offset = "0x22DCB40", VA = "0x1822DE140")]
|
||||
private static uint bytes2uint(byte[] src, int offset)
|
||||
{
|
||||
int num = 0;
|
||||
byte b;
|
||||
num += (int)b;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x06009B41 RID: 39745 RVA: 0x0022E354 File Offset: 0x0022C554
|
||||
[Token(Token = "0x6009B41")]
|
||||
[Address(RVA = "0x22E1FB0", Offset = "0x22E09B0", VA = "0x1822E1FB0")]
|
||||
private static void uint2bytes(uint word, byte[] dst, int offset)
|
||||
{
|
||||
int num = 0;
|
||||
num++;
|
||||
}
|
||||
|
||||
// Token: 0x06009B42 RID: 39746 RVA: 0x0022E370 File Offset: 0x0022C570
|
||||
[Token(Token = "0x6009B42")]
|
||||
[Address(RVA = "0x22E2A50", Offset = "0x22E1450", VA = "0x1822E2A50")]
|
||||
private byte lRot8(byte v, int rot)
|
||||
{
|
||||
uint num;
|
||||
num -= (uint)rot;
|
||||
return v;
|
||||
}
|
||||
|
||||
// Token: 0x06009B43 RID: 39747 RVA: 0x0022E384 File Offset: 0x0022C584
|
||||
[Token(Token = "0x6009B43")]
|
||||
[Address(RVA = "0x22E3620", Offset = "0x22E2020", VA = "0x1822E3620")]
|
||||
private uint sbox2(int x)
|
||||
{
|
||||
byte[] sbox = CamelliaLightEngine.SBOX1;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x06009B44 RID: 39748 RVA: 0x0022E39C File Offset: 0x0022C59C
|
||||
[Token(Token = "0x6009B44")]
|
||||
[Address(RVA = "0x22E36B0", Offset = "0x22E20B0", VA = "0x1822E36B0")]
|
||||
private uint sbox3(int x)
|
||||
{
|
||||
byte[] sbox = CamelliaLightEngine.SBOX1;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x06009B45 RID: 39749 RVA: 0x0022E3B4 File Offset: 0x0022C5B4
|
||||
[Token(Token = "0x6009B45")]
|
||||
[Address(RVA = "0x22E3740", Offset = "0x22E2140", VA = "0x1822E3740")]
|
||||
private uint sbox4(int x)
|
||||
{
|
||||
byte[] sbox = CamelliaLightEngine.SBOX1;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x06009B46 RID: 39750 RVA: 0x0022E3CC File Offset: 0x0022C5CC
|
||||
[Token(Token = "0x6009B46")]
|
||||
[Address(RVA = "0x22E2390", Offset = "0x22E0D90", VA = "0x1822E2390")]
|
||||
private void camelliaF2(uint[] s, uint[] skey, int keyoff)
|
||||
{
|
||||
uint num = skey[keyoff];
|
||||
uint num2 = this.sbox4((int)num);
|
||||
uint num3 = this.sbox3((int)num);
|
||||
uint num4 = this.sbox2((int)num);
|
||||
int length = CamelliaLightEngine.SBOX1.Length;
|
||||
int num5 = keyoff + 1;
|
||||
uint num6 = skey[num5];
|
||||
num3 = this.sbox4((int)num6);
|
||||
uint num7 = this.sbox3((int)num6);
|
||||
uint num8 = this.sbox2((int)num6);
|
||||
num8 += num8;
|
||||
num6 = num8;
|
||||
num6 += num8;
|
||||
byte b;
|
||||
b += b;
|
||||
num6 += num6;
|
||||
s[1] = num6;
|
||||
b += b;
|
||||
uint num9 = skey[(int)b];
|
||||
num6 = num9;
|
||||
num7 = this.sbox4((int)num6);
|
||||
num6 = num9;
|
||||
num3 = this.sbox3((int)num6);
|
||||
num6 = num9;
|
||||
uint num10 = this.sbox2((int)num6);
|
||||
int length2 = CamelliaLightEngine.SBOX1.Length;
|
||||
num3 = this.sbox4((int)num10);
|
||||
uint num11 = this.sbox3((int)num10);
|
||||
uint num12 = this.sbox2((int)num10);
|
||||
num12 += num12;
|
||||
num10 = num12;
|
||||
num10 += num12;
|
||||
byte b2;
|
||||
b2 += b2;
|
||||
num10 += num10;
|
||||
s[0] = num10;
|
||||
b2 += b2;
|
||||
}
|
||||
|
||||
// Token: 0x06009B47 RID: 39751 RVA: 0x0022E4F8 File Offset: 0x0022C6F8
|
||||
[Token(Token = "0x6009B47")]
|
||||
[Address(RVA = "0x22E2840", Offset = "0x22E1240", VA = "0x1822E2840")]
|
||||
private void camelliaFLs(uint[] s, uint[] fkey, int keyoff)
|
||||
{
|
||||
s[0] = typeof(CamelliaLightEngine).TypeHandle;
|
||||
int length = s.Length;
|
||||
int num = keyoff + 1;
|
||||
uint num2 = fkey[num];
|
||||
s[1] = num2;
|
||||
}
|
||||
|
||||
// Token: 0x06009B48 RID: 39752 RVA: 0x0022E534 File Offset: 0x0022C734
|
||||
[Token(Token = "0x6009B48")]
|
||||
[Address(RVA = "0x22E37D0", Offset = "0x22E21D0", VA = "0x1822E37D0")]
|
||||
private void setKey(bool forEncryption, byte[] key)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (06009B48)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Engines.CamelliaLightEngine::setKey(System.Boolean,System.Byte[])
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
IL_A9D:
|
||||
stloc:uint32(var_225_AA4, ldelem:uint32([mscorlib]System.UInt32, ldloc:uint32[](var_1_06), ldc.i4:int32(0)))
|
||||
stelem:uint32([mscorlib]System.UInt32, ldloc:uint32[](var_171_829), ldc.i4:int32(0), ldloc:uint32(var_225_AA4))
|
||||
stloc:uint32[](var_226_AB6, ldfld:uint32[](CamelliaLightEngine::kw, ldloc:CamelliaLightEngine(this)))
|
||||
stloc:uint32(var_227_ABF, ldelem:uint32([mscorlib]System.UInt32, ldloc:uint32[](var_1_06), ldc.i4:int32(0)))
|
||||
stelem:uint32([mscorlib]System.UInt32, ldloc:uint32[](var_226_AB6), ldc.i4:int32(0), ldloc:uint32(var_227_ABF))
|
||||
stloc:uint32[](var_228_AD1, ldfld:uint32[](CamelliaLightEngine::kw, ldloc:CamelliaLightEngine(this)))
|
||||
stloc:uint32(var_229_ADA, ldelem:uint32([mscorlib]System.UInt32, ldloc:uint32[](var_1_06), ldc.i4:int32(1)))
|
||||
stelem:uint32([mscorlib]System.UInt32, ldloc:uint32[](var_228_AD1), ldc.i4:int32(1), ldloc:uint32(var_229_ADA))
|
||||
stloc:uint32[](var_230_AEC, ldfld:uint32[](CamelliaLightEngine::kw, ldloc:CamelliaLightEngine(this)))
|
||||
stloc:uint32(var_231_AF5, ldelem:uint32([mscorlib]System.UInt32, ldloc:uint32[](var_1_06), ldc.i4:int32(1)))
|
||||
stelem:uint32([mscorlib]System.UInt32, ldloc:uint32[](var_230_AEC), ldc.i4:int32(1), ldloc:uint32(var_231_AF5))
|
||||
stloc:uint32[](var_232_B07, ldfld:uint32[](CamelliaLightEngine::subkey, ldloc:CamelliaLightEngine(this)))
|
||||
stloc:int32(var_233_B0A, ldc.i4:int32(0))
|
||||
call:void(CamelliaEngine::roldq, ldc.i4:int32(15), ldloc:uint32[](var_1_06), ldloc:int32(var_233_B0A), ldloc:uint32[](var_232_B07), ldloc:uint64[exp:int32](var_234))
|
||||
stloc:uint32[](var_235_B20, ldfld:uint32[](CamelliaLightEngine::subkey, ldloc:CamelliaLightEngine(this)))
|
||||
stloc:int32(var_236_B23, ldc.i4:int32(0))
|
||||
call:void(CamelliaEngine::roldq, ldc.i4:int32(30), ldloc:uint32[](var_1_06), ldloc:int32(var_236_B23), ldloc:uint32[](var_235_B20), ldloc:uint64[exp:int32](var_237))
|
||||
stloc:int32(var_238_B34, ldc.i4:int32(0))
|
||||
call:void(CamelliaEngine::roldq, ldc.i4:int32(15), ldloc:uint32[](var_1_06), ldloc:int32(var_238_B34), ldloc:uint32[](var_7_1C), ldloc:int32(var_9_25A))
|
||||
stloc:uint32[](var_239_B4A, ldfld:uint32[](CamelliaLightEngine::subkey, ldloc:CamelliaLightEngine(this)))
|
||||
stloc:uint32(var_240_B54, ldelem:uint32([mscorlib]System.UInt32, ldloc:uint32[](var_7_1C), ldc.i4:int32(1)))
|
||||
stelem:uint32([mscorlib]System.UInt32, ldloc:uint32[](var_239_B4A), ldc.i4:int32(9), ldloc:uint32(var_240_B54))
|
||||
stloc:uint32[](var_241_B67, ldfld:uint32[](CamelliaLightEngine::subkey, ldloc:CamelliaLightEngine(this)))
|
||||
stloc:uint32(var_242_B71, ldelem:uint32([mscorlib]System.UInt32, ldloc:uint32[](var_7_1C), ldc.i4:int32(1)))
|
||||
stelem:uint32([mscorlib]System.UInt32, ldloc:uint32[](var_241_B67), ldc.i4:int32(9), ldloc:uint32(var_242_B71))
|
||||
stloc:int32(var_243_B7F, ldc.i4:int32(0))
|
||||
stloc:uint32[](var_244_B87, ldfld:uint32[](CamelliaLightEngine::ke, ldloc:CamelliaLightEngine(this)))
|
||||
call:void(CamelliaEngine::roldq, ldc.i4:int32(17), ldloc:uint32[](var_1_06), ldloc:int32(var_243_B7F), ldloc:uint32[](var_244_B87), ldloc:uint64[exp:int32](var_245))
|
||||
}
|
||||
|
||||
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: 0x06009B49 RID: 39753 RVA: 0x0022F0D8 File Offset: 0x0022D2D8
|
||||
[Token(Token = "0x6009B49")]
|
||||
[Address(RVA = "0x22E2A80", Offset = "0x22E1480", VA = "0x1822E2A80")]
|
||||
private int processBlock128(byte[] input, int inOff, byte[] output, int outOff)
|
||||
{
|
||||
int num = 0;
|
||||
uint[] array = this.state;
|
||||
num++;
|
||||
byte b;
|
||||
num += (int)b;
|
||||
array[0] = (uint)num;
|
||||
uint[] array2 = this.state;
|
||||
uint[] array3 = this.kw;
|
||||
num++;
|
||||
uint[] array4 = this.subkey;
|
||||
int num2 = 0;
|
||||
uint[] array5 = this.state;
|
||||
this.camelliaF2(array5, array4, num2);
|
||||
uint[] array6 = this.subkey;
|
||||
uint[] array7 = this.state;
|
||||
uint num3;
|
||||
this.camelliaF2(array7, array6, (int)num3);
|
||||
uint[] array8 = this.subkey;
|
||||
uint[] array9 = this.state;
|
||||
uint num4;
|
||||
this.camelliaF2(array9, array8, (int)num4);
|
||||
uint[] array10 = this.ke;
|
||||
int num5 = 0;
|
||||
uint[] array11 = this.state;
|
||||
this.camelliaFLs(array11, array10, num5);
|
||||
uint[] array12 = this.subkey;
|
||||
uint[] array13 = this.state;
|
||||
uint num6;
|
||||
this.camelliaF2(array13, array12, (int)num6);
|
||||
uint[] array14 = this.subkey;
|
||||
uint[] array15 = this.state;
|
||||
uint num7;
|
||||
this.camelliaF2(array15, array14, (int)num7);
|
||||
uint[] array16 = this.subkey;
|
||||
uint[] array17 = this.state;
|
||||
uint num8;
|
||||
this.camelliaF2(array17, array16, (int)num8);
|
||||
uint[] array18 = this.ke;
|
||||
uint[] array19 = this.state;
|
||||
uint num9;
|
||||
this.camelliaFLs(array19, array18, (int)num9);
|
||||
uint[] array20 = this.subkey;
|
||||
uint[] array21 = this.state;
|
||||
uint num10;
|
||||
this.camelliaF2(array21, array20, (int)num10);
|
||||
uint[] array22 = this.subkey;
|
||||
uint[] array23 = this.state;
|
||||
uint num11;
|
||||
this.camelliaF2(array23, array22, (int)num11);
|
||||
uint[] array24 = this.subkey;
|
||||
uint[] array25 = this.state;
|
||||
uint num12;
|
||||
this.camelliaF2(array25, array24, (int)num12);
|
||||
uint[] array26 = this.state;
|
||||
uint[] array27 = this.kw;
|
||||
uint[] array28 = this.state;
|
||||
uint[] array29 = this.kw;
|
||||
uint[] array30 = this.state;
|
||||
uint[] array31 = this.kw;
|
||||
uint[] array32 = this.state;
|
||||
uint[] array33 = this.kw;
|
||||
uint[] array34 = this.state;
|
||||
num++;
|
||||
uint num13 = this.state[1];
|
||||
output[0] = (byte)num13;
|
||||
num++;
|
||||
uint num14 = this.state[0];
|
||||
output[0] = (byte)num14;
|
||||
num++;
|
||||
uint num15 = this.state[0];
|
||||
output[0] = (byte)num15;
|
||||
num++;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x06009B4A RID: 39754 RVA: 0x0022F2F0 File Offset: 0x0022D4F0
|
||||
[Token(Token = "0x6009B4A")]
|
||||
[Address(RVA = "0x22E3020", Offset = "0x22E1A20", VA = "0x1822E3020")]
|
||||
private int processBlock192or256(byte[] input, int inOff, byte[] output, int outOff)
|
||||
{
|
||||
int num = 0;
|
||||
uint[] array = this.state;
|
||||
num++;
|
||||
byte b;
|
||||
num += (int)b;
|
||||
array[0] = (uint)num;
|
||||
uint[] array2 = this.state;
|
||||
uint[] array3 = this.kw;
|
||||
num++;
|
||||
uint[] array4 = this.subkey;
|
||||
int num2 = 0;
|
||||
uint[] array5 = this.state;
|
||||
this.camelliaF2(array5, array4, num2);
|
||||
uint[] array6 = this.subkey;
|
||||
uint[] array7 = this.state;
|
||||
uint num3;
|
||||
this.camelliaF2(array7, array6, (int)num3);
|
||||
uint[] array8 = this.subkey;
|
||||
uint[] array9 = this.state;
|
||||
uint num4;
|
||||
this.camelliaF2(array9, array8, (int)num4);
|
||||
uint[] array10 = this.ke;
|
||||
int num5 = 0;
|
||||
uint[] array11 = this.state;
|
||||
this.camelliaFLs(array11, array10, num5);
|
||||
uint[] array12 = this.subkey;
|
||||
uint[] array13 = this.state;
|
||||
uint num6;
|
||||
this.camelliaF2(array13, array12, (int)num6);
|
||||
uint[] array14 = this.subkey;
|
||||
uint[] array15 = this.state;
|
||||
uint num7;
|
||||
this.camelliaF2(array15, array14, (int)num7);
|
||||
uint[] array16 = this.subkey;
|
||||
uint[] array17 = this.state;
|
||||
uint num8;
|
||||
this.camelliaF2(array17, array16, (int)num8);
|
||||
uint[] array18 = this.ke;
|
||||
uint[] array19 = this.state;
|
||||
uint num9;
|
||||
this.camelliaFLs(array19, array18, (int)num9);
|
||||
uint[] array20 = this.subkey;
|
||||
uint[] array21 = this.state;
|
||||
uint num10;
|
||||
this.camelliaF2(array21, array20, (int)num10);
|
||||
uint[] array22 = this.subkey;
|
||||
uint[] array23 = this.state;
|
||||
uint num11;
|
||||
this.camelliaF2(array23, array22, (int)num11);
|
||||
uint[] array24 = this.subkey;
|
||||
uint[] array25 = this.state;
|
||||
uint num12;
|
||||
this.camelliaF2(array25, array24, (int)num12);
|
||||
uint[] array26 = this.ke;
|
||||
uint[] array27 = this.state;
|
||||
uint num13;
|
||||
this.camelliaFLs(array27, array26, (int)num13);
|
||||
uint[] array28 = this.subkey;
|
||||
uint[] array29 = this.state;
|
||||
uint num14;
|
||||
this.camelliaF2(array29, array28, (int)num14);
|
||||
uint[] array30 = this.subkey;
|
||||
uint[] array31 = this.state;
|
||||
uint num15;
|
||||
this.camelliaF2(array31, array30, (int)num15);
|
||||
uint[] array32 = this.subkey;
|
||||
uint[] array33 = this.state;
|
||||
uint num16;
|
||||
this.camelliaF2(array33, array32, (int)num16);
|
||||
uint[] array34 = this.state;
|
||||
uint[] array35 = this.kw;
|
||||
uint[] array36 = this.state;
|
||||
uint[] array37 = this.kw;
|
||||
uint[] array38 = this.state;
|
||||
uint[] array39 = this.kw;
|
||||
uint[] array40 = this.state;
|
||||
uint[] array41 = this.kw;
|
||||
uint[] array42 = this.state;
|
||||
num++;
|
||||
uint num17 = this.state[1];
|
||||
output[0] = (byte)num17;
|
||||
num++;
|
||||
uint num18 = this.state[0];
|
||||
output[0] = (byte)num18;
|
||||
num++;
|
||||
uint num19 = this.state[0];
|
||||
output[0] = (byte)num19;
|
||||
num++;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x06009B4B RID: 39755 RVA: 0x0022F578 File Offset: 0x0022D778
|
||||
[Token(Token = "0x6009B4B")]
|
||||
[Address(RVA = "0x22E2300", Offset = "0x22E0D00", VA = "0x1822E2300")]
|
||||
public CamelliaLightEngine()
|
||||
{
|
||||
uint[] array = new uint[96];
|
||||
this.subkey = array;
|
||||
uint[] array2 = new uint[8];
|
||||
this.kw = array2;
|
||||
uint[] array3 = new uint[12];
|
||||
this.ke = array3;
|
||||
uint[] array4 = new uint[4];
|
||||
this.state = array4;
|
||||
this.Reset();
|
||||
this.initialised = false;
|
||||
}
|
||||
|
||||
// Token: 0x170018BD RID: 6333
|
||||
// (get) Token: 0x06009B4C RID: 39756 RVA: 0x0022F5CC File Offset: 0x0022D7CC
|
||||
[Token(Token = "0x170018BD")]
|
||||
public virtual string AlgorithmName
|
||||
{
|
||||
[Token(Token = "0x6009B4C")]
|
||||
[Address(RVA = "0x22E2A20", Offset = "0x22E1420", VA = "0x1822E2A20", Slot = "10")]
|
||||
get
|
||||
{
|
||||
return "Camellia";
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170018BE RID: 6334
|
||||
// (get) Token: 0x06009B4D RID: 39757 RVA: 0x0022F5E0 File Offset: 0x0022D7E0
|
||||
[Token(Token = "0x170018BE")]
|
||||
public virtual bool IsPartialBlockOkay
|
||||
{
|
||||
[Token(Token = "0x6009B4D")]
|
||||
[Address(RVA = "0x413970", Offset = "0x412370", VA = "0x180413970", Slot = "11")]
|
||||
get
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06009B4E RID: 39758 RVA: 0x0022F5F0 File Offset: 0x0022D7F0
|
||||
[Token(Token = "0x6009B4E")]
|
||||
[Address(RVA = "0x11B1BB0", Offset = "0x11B05B0", VA = "0x1811B1BB0", Slot = "12")]
|
||||
public virtual int GetBlockSize()
|
||||
{
|
||||
return 16;
|
||||
}
|
||||
|
||||
// Token: 0x06009B4F RID: 39759 RVA: 0x0022F600 File Offset: 0x0022D800
|
||||
[Token(Token = "0x6009B4F")]
|
||||
[Address(RVA = "0x22E2000", Offset = "0x22E0A00", VA = "0x1822E2000", Slot = "13")]
|
||||
public virtual void Init(bool forEncryption, ICipherParameters parameters)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (06009B4F)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Engines.CamelliaLightEngine::Init(System.Boolean,BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.ICipherParameters)
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
IL_26:
|
||||
stloc:ArgumentException(var_4_30, newobj:ArgumentException(ArgumentException::.ctor, ldstr:string("only simple KeyParameter expected.")))
|
||||
}
|
||||
|
||||
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: 0x06009B50 RID: 39760 RVA: 0x0022F640 File Offset: 0x0022D840
|
||||
[Token(Token = "0x6009B50")]
|
||||
[Address(RVA = "0x22E2160", Offset = "0x22E0B60", VA = "0x1822E2160", Slot = "14")]
|
||||
public virtual int ProcessBlock(byte[] input, int inOff, byte[] output, int outOff)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (06009B50)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Int32 BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Engines.CamelliaLightEngine::ProcessBlock(System.Byte[],System.Int32,System.Byte[],System.Int32)
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
IL_24:
|
||||
stloc:InvalidOperationException(var_3_2E, newobj:InvalidOperationException(InvalidOperationException::.ctor, ldstr:string("Camellia 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.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: 0x06009B51 RID: 39761 RVA: 0x0000220F File Offset: 0x0000040F
|
||||
[Token(Token = "0x6009B51")]
|
||||
[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: 0x06009B52 RID: 39762 RVA: 0x0022F67C File Offset: 0x0022D87C
|
||||
// Note: this type is marked as 'beforefieldinit'.
|
||||
[Token(Token = "0x6009B52")]
|
||||
[Address(RVA = "0x22E2260", Offset = "0x22E0C60", VA = "0x1822E2260")]
|
||||
static CamelliaLightEngine()
|
||||
{
|
||||
uint[] array = new uint[12];
|
||||
RuntimeHelpers.InitializeArray(array, fieldof(<PrivateImplementationDetails>.AE843E1C1136C908565A6D4E04E8564B69465B3B).FieldHandle);
|
||||
CamelliaLightEngine.SIGMA = array;
|
||||
byte[] array2 = new byte[256];
|
||||
RuntimeHelpers.InitializeArray(array2, fieldof(<PrivateImplementationDetails>.81FDCC6319440C75C8E422A1FE4E3F1A80B89F5F).FieldHandle);
|
||||
CamelliaLightEngine.SBOX1 = array2;
|
||||
}
|
||||
|
||||
// Token: 0x040065DC RID: 26076
|
||||
[Token(Token = "0x40065DC")]
|
||||
private const int BLOCK_SIZE = 16;
|
||||
|
||||
// Token: 0x040065DD RID: 26077
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x40065DD")]
|
||||
private bool initialised;
|
||||
|
||||
// Token: 0x040065DE RID: 26078
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x11")]
|
||||
[Token(Token = "0x40065DE")]
|
||||
private bool _keyis128;
|
||||
|
||||
// Token: 0x040065DF RID: 26079
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x40065DF")]
|
||||
private uint[] subkey;
|
||||
|
||||
// Token: 0x040065E0 RID: 26080
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x40065E0")]
|
||||
private uint[] kw;
|
||||
|
||||
// Token: 0x040065E1 RID: 26081
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x28")]
|
||||
[Token(Token = "0x40065E1")]
|
||||
private uint[] ke;
|
||||
|
||||
// Token: 0x040065E2 RID: 26082
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x30")]
|
||||
[Token(Token = "0x40065E2")]
|
||||
private uint[] state;
|
||||
|
||||
// Token: 0x040065E3 RID: 26083
|
||||
[Token(Token = "0x40065E3")]
|
||||
private static readonly uint[] SIGMA;
|
||||
|
||||
// Token: 0x040065E4 RID: 26084
|
||||
[Token(Token = "0x40065E4")]
|
||||
private static readonly byte[] SBOX1;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user