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
ASN1.cs
Go to the documentation of this file.
1using System;
4
5namespace Mono.Security
6{
7 // Token: 0x02000003 RID: 3
8 public class ASN1
9 {
10 // Token: 0x06000003 RID: 3 RVA: 0x0000206C File Offset: 0x0000026C
11 public ASN1(byte tag)
12 {
13 this.m_nTag = tag;
14 }
15
16 // Token: 0x06000004 RID: 4 RVA: 0x00002088 File Offset: 0x00000288
17 public ASN1(byte tag, byte[] data)
18 {
19 this.m_nTag = tag;
20 this.m_aValue = data;
21 }
22
23 // Token: 0x06000005 RID: 5 RVA: 0x000020AC File Offset: 0x000002AC
24 public ASN1(byte[] data)
25 {
26 int num = 1;
27 base..ctor();
28 this.m_nTag = (byte)num;
29 }
30
31 // Token: 0x17000001 RID: 1
32 // (get) Token: 0x06000006 RID: 6 RVA: 0x000020FC File Offset: 0x000002FC
33 public int Count
34 {
35 get
36 {
37 /*
38An exception occurred when decompiling this method (06000006)
39
40ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Int32 Mono.Security.ASN1::get_Count()
41
42 ---> System.Exception: Basic block has to end with unconditional control flow.
43{
44 IL_0000:
45 brtrue(IL_0000, logicnot:bool(ldfld:ArrayList[exp:bool](ASN1::elist, ldloc:ASN1(this))))
46}
47
48 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
49 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
50 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
51 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
52 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
53 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
54 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
55 --- End of inner exception stack trace ---
56 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
57 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
58*/;
59 }
60 }
61
62 // Token: 0x17000002 RID: 2
63 // (get) Token: 0x06000007 RID: 7 RVA: 0x00002110 File Offset: 0x00000310
64 public byte Tag
65 {
66 get
67 {
68 return this.m_nTag;
69 }
70 }
71
72 // Token: 0x17000003 RID: 3
73 // (get) Token: 0x06000008 RID: 8 RVA: 0x00002124 File Offset: 0x00000324
74 public int Length
75 {
76 get
77 {
78 if (this.m_aValue != null)
79 {
80 return;
81 }
82 }
83 }
84
85 // Token: 0x17000004 RID: 4
86 // (get) Token: 0x06000009 RID: 9 RVA: 0x0000213C File Offset: 0x0000033C
87 // (set) Token: 0x0600000A RID: 10 RVA: 0x00002164 File Offset: 0x00000364
88 public byte[] Value
89 {
90 get
91 {
92 if (this.m_aValue == null)
93 {
94 byte[] aValue = this.m_aValue;
95 }
96 object obj;
97 if (obj == null || obj != null)
98 {
99 }
100 throw new InvalidCastException();
101 }
102 set
103 {
104 object obj;
105 if (value != null && obj != null)
106 {
107 if (obj == null)
108 {
109 throw new InvalidCastException();
110 }
112 if (obj == null)
113 {
114 throw new InvalidCastException();
115 }
116 }
117 }
118 }
119
120 // Token: 0x0600000B RID: 11 RVA: 0x00002190 File Offset: 0x00000390
121 private bool CompareArray(byte[] array1, byte[] array2)
122 {
123 }
124
125 // Token: 0x0600000C RID: 12 RVA: 0x000021A4 File Offset: 0x000003A4
126 public bool CompareValue(byte[] value)
127 {
128 /*
129An exception occurred when decompiling this method (0600000C)
130
131ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Boolean Mono.Security.ASN1::CompareValue(System.Byte[])
132
133 ---> System.Exception: Basic block has to end with unconditional control flow.
134{
135 Block_0:
136 stloc:uint8[](var_0_06, ldfld:uint8[](ASN1::m_aValue, ldloc:ASN1(this)))
137}
138
139 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
140 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
141 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
142 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
143 --- End of inner exception stack trace ---
144 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
145 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
146*/;
147 }
148
149 // Token: 0x0600000D RID: 13 RVA: 0x000021C0 File Offset: 0x000003C0
151 {
152 if (asn1 == null || this.elist == null)
153 {
154 }
155 return asn1;
156 }
157
158 // Token: 0x0600000E RID: 14 RVA: 0x000021DC File Offset: 0x000003DC
159 public virtual byte[] GetBytes()
160 {
162 if (this.elist != null)
163 {
164 arrayList = this.elist;
165 int size = arrayList._size;
166 }
167 if (this.m_aValue == null)
168 {
169 long num = 0L;
170 int num2 = 5;
171 if (arrayList != null)
172 {
173 }
174 if (num != 0L)
175 {
176 throw new OutOfMemoryException();
177 }
178 if (num2 != 0)
179 {
180 goto IL_0063;
181 }
184 }
185 if (this.m_aValue == null)
186 {
187 }
188 byte nTag = this.m_nTag;
189 IL_0063:
190 throw new InvalidCastException();
191 }
192
193 // Token: 0x0600000F RID: 15 RVA: 0x00002268 File Offset: 0x00000468
194 protected void Decode(byte[] asn1, int anPos, int anLength)
195 {
196 }
197
198 // Token: 0x06000010 RID: 16 RVA: 0x00002280 File Offset: 0x00000480
199 protected void DecodeTLV(byte[] asn1, int pos, [Out] byte tag, [Out] int length, [Out] byte[] content)
200 {
201 int num = 1;
202 tag.m_value = (byte)num;
205 }
206
207 // Token: 0x17000005 RID: 5
208 public ASN1 this[int index]
209 {
210 get
211 {
212 if (this.elist != null && this.elist != null)
213 {
214 throw new InvalidCastException();
215 }
216 }
217 }
218
219 // Token: 0x06000012 RID: 18 RVA: 0x000022D4 File Offset: 0x000004D4
220 public ASN1 Element(int index, byte anTag)
221 {
222 if (this.elist != null)
223 {
225 if (arrayList != null)
226 {
227 }
228 object[] items = arrayList._items;
229 throw new InvalidCastException();
230 }
231 }
232
233 // Token: 0x06000013 RID: 19 RVA: 0x00002304 File Offset: 0x00000504
234 public override string ToString()
235 {
236 /*
237An exception occurred when decompiling this method (06000013)
238
239ICSharpCode.Decompiler.DecompilerException: Error decompiling System.String Mono.Security.ASN1::ToString()
240
241 ---> System.Exception: Basic block has to end with unconditional control flow.
242{
243 Block_0:
244 stloc:string(var_3_09, callgetter:string(Environment::get_NewLine))
245 stloc:uint8[](var_5_10, callgetter:uint8[](ASN1::get_Value, ldloc:ASN1(this)))
246 stloc:string(var_7_1A, callgetter:string(Environment::get_NewLine))
247 stloc:string(var_11_24, callgetter:string(Environment::get_NewLine))
248 stloc:uint8[](var_13_2C, callgetter:uint8[](ASN1::get_Value, ldloc:ASN1(this)))
249 stloc:string(var_14_3E, call:string(uint8::ToString, callgetter:uint8[][exp:uint8&](ASN1::get_Value, ldloc:ASN1(this)), ldstr:string("X2")))
250 stloc:string(var_17_48, callgetter:string(Environment::get_NewLine))
251 stloc:uint8[](var_19_50, callgetter:uint8[](ASN1::get_Value, ldloc:ASN1(this)))
252}
253
254 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
255 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
256 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
257 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
258 --- End of inner exception stack trace ---
259 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
260 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
261*/;
262 }
263
264 // Token: 0x04000001 RID: 1
265 private byte m_nTag;
266
267 // Token: 0x04000002 RID: 2
268 private byte[] m_aValue;
269
270 // Token: 0x04000003 RID: 3
272 }
273}
class f__AnonymousType0<< Count > j__TPar
void DecodeTLV(byte[] asn1, int pos, [Out] byte tag, [Out] int length, [Out] byte[] content)
Definition ASN1.cs:199
ASN1(byte tag)
Definition ASN1.cs:11
ASN1 Add(ASN1 asn1)
Definition ASN1.cs:150
byte[] Value
Definition ASN1.cs:89
ArrayList elist
Definition ASN1.cs:271
virtual byte[] GetBytes()
Definition ASN1.cs:159
bool CompareValue(byte[] value)
Definition ASN1.cs:126
void Decode(byte[] asn1, int anPos, int anLength)
Definition ASN1.cs:194
ASN1(byte[] data)
Definition ASN1.cs:24
bool CompareArray(byte[] array1, byte[] array2)
Definition ASN1.cs:121
override string ToString()
Definition ASN1.cs:234
byte[] m_aValue
Definition ASN1.cs:268
ASN1 Element(int index, byte anTag)
Definition ASN1.cs:220
ASN1(byte tag, byte[] data)
Definition ASN1.cs:17