terraria-cpp2il-methodrecon v1.4.4.9
Terraria mobile dump, with reconstructed method body. Dump with CallAnalysis: https://infinitynichto.github.io/terraria-cpp2il
Loading...
Searching...
No Matches
AesTransform.cs
Go to the documentation of this file.
1using System;
3
5{
6 // Token: 0x02000005 RID: 5
8 {
9 // Token: 0x0600002A RID: 42 RVA: 0x000023BC File Offset: 0x000005BC
10 public AesTransform(Aes algo, bool encryption, byte[] key, byte[] iv)
12 {
13 if (key != null)
14 {
15 if (iv != null)
16 {
17 }
18 long num = 257L;
19 this.Nk = (int)num;
20 int num2 = 14;
21 this.Nr = num2;
22 return;
23 }
25 }
26
27 // Token: 0x0600002B RID: 43 RVA: 0x00002480 File Offset: 0x00000680
28 protected override void ECB(byte[] input, byte[] output)
29 {
30 bool encrypt = this.encrypt;
31 uint[] array = this.expandedKey;
32 if (encrypt)
33 {
34 this.Encrypt128(input, output, array);
35 return;
36 }
37 this.Decrypt128(input, output, array);
38 }
39
40 // Token: 0x0600002C RID: 44 RVA: 0x000024B4 File Offset: 0x000006B4
41 private uint SubByte(uint a)
42 {
43 /*
44An exception occurred when decompiling this method (0600002C)
45
46ICSharpCode.Decompiler.DecompilerException: Error decompiling System.UInt32 System.Security.Cryptography.AesTransform::SubByte(System.UInt32)
47
48 ---> System.Exception: Basic block has to end with unconditional control flow.
49{
50 IL_0000:
51 brtrue(IL_0000, ldc.i4:bool(1))
52}
53
54 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
55 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
56 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
57 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
58 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
59 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
60 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
61 --- End of inner exception stack trace ---
62 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
63 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 1683
64*/;
65 }
66
67 // Token: 0x0600002D RID: 45 RVA: 0x000024C4 File Offset: 0x000006C4
68 private void Encrypt128(byte[] indata, byte[] outdata, uint[] ekey)
69 {
70 int nr = this.Nr;
71 }
72
73 // Token: 0x0600002E RID: 46 RVA: 0x000024E4 File Offset: 0x000006E4
74 private void Decrypt128(byte[] indata, byte[] outdata, uint[] ekey)
75 {
76 int nr = this.Nr;
77 }
78
79 // Token: 0x0600002F RID: 47 RVA: 0x00002504 File Offset: 0x00000704
80 // Note: this type is marked as 'beforefieldinit'.
81 static AesTransform()
82 {
83 }
84
85 // Token: 0x04000002 RID: 2
86 private uint[] expandedKey;
87
88 // Token: 0x04000003 RID: 3
89 private int Nk;
90
91 // Token: 0x04000004 RID: 4
92 private int Nr;
93
94 // Token: 0x04000005 RID: 5
95 private static readonly uint[] Rcon;
96
97 // Token: 0x04000006 RID: 6
98 private static readonly byte[] SBox;
99
100 // Token: 0x04000007 RID: 7
101 private static readonly byte[] iSBox;
102
103 // Token: 0x04000008 RID: 8
104 private static readonly uint[] T0;
105
106 // Token: 0x04000009 RID: 9
107 private static readonly uint[] T1;
108
109 // Token: 0x0400000A RID: 10
110 private static readonly uint[] T2;
111
112 // Token: 0x0400000B RID: 11
113 private static readonly uint[] T3;
114
115 // Token: 0x0400000C RID: 12
116 private static readonly uint[] iT0;
117
118 // Token: 0x0400000D RID: 13
119 private static readonly uint[] iT1;
120
121 // Token: 0x0400000E RID: 14
122 private static readonly uint[] iT2;
123
124 // Token: 0x0400000F RID: 15
125 private static readonly uint[] iT3;
126 }
127}
class f__AnonymousType0<< Count > j__TPar
override void ECB(byte[] input, byte[] output)
AesTransform(Aes algo, bool encryption, byte[] key, byte[] iv)
void Encrypt128(byte[] indata, byte[] outdata, uint[] ekey)
void Decrypt128(byte[] indata, byte[] outdata, uint[] ekey)