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
ResourceReader.cs
Go to the documentation of this file.
1using System;
4using System.IO;
7using System.Text;
10
11namespace System.Resources
12{
13 // Token: 0x020004B7 RID: 1207
14 [ComVisible(true)]
16 {
17 // Token: 0x0600232B RID: 9003 RVA: 0x0004F510 File Offset: 0x0004D710
19 {
22 if (stream != null)
23 {
24 }
25 }
26
27 // Token: 0x0600232C RID: 9004 RVA: 0x0004F548 File Offset: 0x0004D748
28 public void Close()
29 {
30 if (this._store != null)
31 {
32 }
33 }
34
35 // Token: 0x0600232D RID: 9005 RVA: 0x0004F560 File Offset: 0x0004D760
36 public void Dispose()
37 {
38 if (this._store != null)
39 {
40 }
41 }
42
43 // Token: 0x0600232E RID: 9006 RVA: 0x0004F578 File Offset: 0x0004D778
44 private void Dispose(bool disposing)
45 {
46 if (this._store != null)
47 {
48 }
49 }
50
51 // Token: 0x0600232F RID: 9007 RVA: 0x0000207A File Offset: 0x0000027A
52 internal unsafe static int ReadUnalignedI4(int* p)
53 {
54 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
55 }
56
57 // Token: 0x06002330 RID: 9008 RVA: 0x0004F590 File Offset: 0x0004D790
58 private void SkipString()
59 {
60 int num = this._store.Read7BitEncodedInt();
61 BinaryReader store = this._store;
62 }
63
64 // Token: 0x06002331 RID: 9009 RVA: 0x0004F5BC File Offset: 0x0004D7BC
65 private int GetNameHash(int index)
66 {
67 /*
68An exception occurred when decompiling this method (06002331)
69
70ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Int32 System.Resources.ResourceReader::GetNameHash(System.Int32)
71
72 ---> System.Exception: Basic block has to end with unconditional control flow.
73{
74 IL_000F:
75 stloc:int32[](var_1_15, ldfld:int32[](ResourceReader::_nameHashes, ldloc:ResourceReader(this)))
76}
77
78 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
79 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
80 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
81 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
82 --- End of inner exception stack trace ---
83 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
84 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
85*/;
86 }
87
88 // Token: 0x06002332 RID: 9010 RVA: 0x0004F5E0 File Offset: 0x0004D7E0
89 private unsafe int GetNamePosition(int index)
90 {
91 if (this._ums != null)
92 {
94 }
95 int[] namePositions = this._namePositions;
98 return namePositions;
99 }
100
101 // Token: 0x06002333 RID: 9011 RVA: 0x0004F61C File Offset: 0x0004D81C
103 {
104 /*
105An exception occurred when decompiling this method (06002333)
106
107ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Collections.IEnumerator System.Resources.ResourceReader::System.Collections.IEnumerable.GetEnumerator()
108
109 ---> System.Exception: Basic block has to end with unconditional control flow.
110{
111 Block_0:
112 stloc:IDictionaryEnumerator(var_0_06, call:IDictionaryEnumerator(ResourceReader::GetEnumerator, ldloc:ResourceReader(this)))
113}
114
115 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
116 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
117 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
118 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
119 --- End of inner exception stack trace ---
120 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
121 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
122*/;
123 }
124
125 // Token: 0x06002334 RID: 9012 RVA: 0x0004F630 File Offset: 0x0004D830
127 {
128 /*
129An exception occurred when decompiling this method (06002334)
130
131ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Collections.IDictionaryEnumerator System.Resources.ResourceReader::GetEnumerator()
132
133 ---> System.Exception: Basic block has to end with unconditional control flow.
134{
135 IL_0008:
136 stloc:string(var_0_12, call:string(Environment::GetResourceString, ldstr:string("ResourceReader is closed.")))
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: 0x06002335 RID: 9013 RVA: 0x0000207A File Offset: 0x0000027A
151 {
152 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
153 }
154
155 // Token: 0x06002336 RID: 9014 RVA: 0x0004F650 File Offset: 0x0004D850
156 internal int FindPosForResource(string name)
157 {
158 if (!true)
159 {
160 }
162 int numResources = this._numResources;
163 int num2;
164 return num2;
165 }
166
167 // Token: 0x06002337 RID: 9015 RVA: 0x0004F700 File Offset: 0x0004D900
169 {
170 int num = this._store.Read7BitEncodedInt();
173 if (ums != null)
174 {
177 ums3 = this._ums;
178 if (this._ums == null)
179 {
180 }
181 }
182 if (ums3._identity != null)
183 {
184 }
185 string resourceString = Environment.GetResourceString("Corrupt .resources file. A resource name extends past the end of the stream.");
186 return "Corrupt .resources file. String length must be non-negative." != null;
187 }
188
189 // Token: 0x06002338 RID: 9016 RVA: 0x0004F764 File Offset: 0x0004D964
190 private unsafe string AllocateStringForNameIndex(int index, [Out] int dataOffset)
191 {
192 int namePosition = this.GetNamePosition(index);
193 Monitor.Enter(this, index != 0);
194 BinaryReader store = this._store;
196 int num = this._store.Read7BitEncodedInt();
197 if (this._ums != null)
198 {
201 string text;
202 return text;
203 }
204 if (this._store != null)
205 {
206 BinaryReader store2 = this._store;
207 dataOffset.m_value = store2;
210 long num2 = 0L;
216 long num3 = 0L;
217 int num4 = 20;
218 if (dataSectionOffset2 != 0L)
219 {
220 Monitor.Exit(this);
221 }
222 if (num3 != 0L)
223 {
224 throw new OutOfMemoryException();
225 }
226 if (num4 == 0)
227 {
229 }
230 }
231 throw new ArrayTypeMismatchException();
232 }
233
234 // Token: 0x06002339 RID: 9017 RVA: 0x0004F884 File Offset: 0x0004DA84
235 private object GetValueForNameIndex(int index)
236 {
237 int namePosition = this.GetNamePosition(index);
238 Monitor.Enter(this, index != 0);
239 BinaryReader store = this._store;
241 this.SkipString();
242 BinaryReader store2 = this._store;
245 int version = this._version;
246 object obj;
247 return obj;
248 }
249
250 // Token: 0x0600233A RID: 9018 RVA: 0x0004F90C File Offset: 0x0004DB0C
251 internal string LoadString(int pos)
252 {
253 BinaryReader store = this._store;
255 int num = this._store.Read7BitEncodedInt();
256 int version = this._version;
257 RuntimeType runtimeType = this.FindType(num);
258 if (dataSectionOffset == 0L)
259 {
260 }
261 Type type;
262 bool flag = runtimeType != type;
264 throw new ArrayTypeMismatchException();
265 }
266
267 // Token: 0x0600233B RID: 9019 RVA: 0x0004F980 File Offset: 0x0004DB80
268 internal object LoadObject(int pos)
269 {
270 int version = this._version;
271 return this.LoadObjectV1(pos);
272 }
273
274 // Token: 0x0600233C RID: 9020 RVA: 0x0004F9A0 File Offset: 0x0004DBA0
275 internal object LoadObject(int pos, [Out] ResourceTypeCode typeCode)
276 {
277 int version = this._version;
278 object obj = this.LoadObjectV1(pos);
279 if (obj != null)
280 {
281 }
282 typeCode.value__ = 64;
283 return obj;
284 }
285
286 // Token: 0x0600233D RID: 9021 RVA: 0x0004F9CC File Offset: 0x0004DBCC
287 internal object LoadObjectV1(int pos)
288 {
289 return this._LoadObjectV1(pos);
290 }
291
292 // Token: 0x0600233E RID: 9022 RVA: 0x0004F9F0 File Offset: 0x0004DBF0
293 private object _LoadObjectV1(int pos)
294 {
295 BinaryReader store = this._store;
297 int num = this._store.Read7BitEncodedInt();
298 RuntimeType runtimeType = this.FindType(num);
299 if (dataSectionOffset == 0L)
300 {
301 }
302 Type type;
303 bool flag = runtimeType == type;
304 BinaryReader store2 = this._store;
305 if (dataSectionOffset == 0L)
306 {
307 }
308 Type type2;
309 bool flag2 = runtimeType == type2;
311 if (dataSectionOffset == 0L)
312 {
313 }
314 Type type3;
315 bool flag3 = runtimeType == type3;
316 if (dataSectionOffset == 0L)
317 {
318 }
319 Type type4;
320 bool flag4 = runtimeType == type4;
321 if (dataSectionOffset == 0L)
322 {
323 }
324 Type type5;
325 bool flag5 = runtimeType == type5;
326 if (dataSectionOffset == 0L)
327 {
328 }
329 Type type6;
330 bool flag6 = runtimeType == type6;
331 if (dataSectionOffset == 0L)
332 {
333 }
334 Type type7;
335 bool flag7 = runtimeType == type7;
336 if (dataSectionOffset == 0L)
337 {
338 }
339 Type type8;
340 bool flag8 = runtimeType == type8;
341 if (dataSectionOffset == 0L)
342 {
343 }
344 Type type9;
345 bool flag9 = runtimeType == type9;
346 if (dataSectionOffset == 0L)
347 {
348 }
349 Type type10;
350 bool flag10 = runtimeType == type10;
351 if (dataSectionOffset == 0L)
352 {
353 }
354 Type type11;
355 bool flag11 = runtimeType == type11;
356 if (dataSectionOffset == 0L)
357 {
358 }
359 Type type12;
360 bool flag12 = runtimeType == type12;
361 if (dataSectionOffset == 0L)
362 {
363 }
364 Type type13;
365 bool flag13 = runtimeType == type13;
366 if (dataSectionOffset == 0L)
367 {
368 }
369 Type type14;
370 bool flag14 = runtimeType == type14;
371 object obj;
372 return obj;
373 }
374
375 // Token: 0x0600233F RID: 9023 RVA: 0x0004FAF0 File Offset: 0x0004DCF0
376 internal object LoadObjectV2(int pos, [Out] ResourceTypeCode typeCode)
377 {
378 return this._LoadObjectV2(pos, typeCode);
379 }
380
381 // Token: 0x06002340 RID: 9024 RVA: 0x0004FB14 File Offset: 0x0004DD14
382 private object _LoadObjectV2(int pos, [Out] ResourceTypeCode typeCode)
383 {
384 BinaryReader store = this._store;
386 long num = 0L;
387 int num2;
389 return this.DeserializeObject((int)num);
390 }
391
392 // Token: 0x06002341 RID: 9025 RVA: 0x0004FB58 File Offset: 0x0004DD58
393 private object DeserializeObject(int typeIndex)
394 {
395 RuntimeType runtimeType = this.FindType(typeIndex);
396 BinaryReader store = this._store;
398 object obj;
399 bool flag = obj.GetType() != runtimeType;
400 return obj;
401 }
402
403 // Token: 0x06002342 RID: 9026 RVA: 0x0004FBA0 File Offset: 0x0004DDA0
404 private void ReadResources()
405 {
406 this._ReadResources();
407 }
408
409 // Token: 0x06002343 RID: 9027 RVA: 0x0004FBC4 File Offset: 0x0004DDC4
410 private void _ReadResources()
411 {
412 BinaryReader store = this._store;
413 BinaryReader store2 = this._store;
416 this.SkipString();
417 }
418
419 // Token: 0x06002344 RID: 9028 RVA: 0x0004FD68 File Offset: 0x0004DF68
420 private RuntimeType FindType(int typeIndex)
421 {
423 MonoTypeInfo type_info = typeTable.type_info;
424 object genericCache = typeTable.GenericCache;
425 if (type_info == null)
426 {
427 }
428 BinaryReader store = this._store;
429 BinaryReader store2 = this._store;
433 if (store3 != null && store3 == null)
434 {
435 throw new ArrayTypeMismatchException();
436 }
437 long num = 0L;
438 int num2 = 6;
440 if (num == 0L)
441 {
442 if (num2 == 0)
443 {
445 }
446 string resourceString = Environment.GetResourceString("Corrupt .resources file. The specified type doesn't exist.");
447 throw new InvalidCastException();
448 }
449 throw new OutOfMemoryException();
450 }
451
452 // Token: 0x0400133F RID: 4927
454
455 // Token: 0x04001340 RID: 4928
457
458 // Token: 0x04001341 RID: 4929
459 private long _nameSectionOffset;
460
461 // Token: 0x04001342 RID: 4930
462 private long _dataSectionOffset;
463
464 // Token: 0x04001343 RID: 4931
465 private int[] _nameHashes;
466
467 // Token: 0x04001344 RID: 4932
468 private unsafe int* _nameHashesPtr;
469
470 // Token: 0x04001345 RID: 4933
471 private int[] _namePositions;
472
473 // Token: 0x04001346 RID: 4934
475
476 // Token: 0x04001347 RID: 4935
478
479 // Token: 0x04001348 RID: 4936
480 private int[] _typeNamePositions;
481
482 // Token: 0x04001349 RID: 4937
484
485 // Token: 0x0400134A RID: 4938
486 private int _numResources;
487
488 // Token: 0x0400134B RID: 4939
490
491 // Token: 0x0400134C RID: 4940
492 private int _version;
493
494 // Token: 0x020004B8 RID: 1208
496 {
497 // Token: 0x06002345 RID: 9029 RVA: 0x0004FE1C File Offset: 0x0004E01C
499 {
500 this._reader = reader;
501 }
502
503 // Token: 0x06002346 RID: 9030 RVA: 0x0004FE38 File Offset: 0x0004E038
504 public bool MoveNext()
505 {
506 /*
507An exception occurred when decompiling this method (06002346)
508
509ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Boolean System.Resources.ResourceReader/ResourceEnumerator::MoveNext()
510
511 ---> System.Exception: Basic block has to end with unconditional control flow.
512{
513 Block_0:
514 stloc:int32(var_0_06, ldfld:int32(ResourceEnumerator::_currentName, ldloc:ResourceEnumerator(this)))
515 stloc:int32(var_2_18, ldfld:int32(ResourceReader::_numResources, ldfld:ResourceReader(ResourceEnumerator::_reader, ldloc:ResourceEnumerator(this))))
516 stloc:int32(var_3_1A, ldc.i4:int32(1))
517 stfld:bool(ResourceEnumerator::_currentIsValid, ldloc:ResourceEnumerator(this), ldloc:int32[exp:bool](var_3_1A))
518 stloc:int32(var_5_2A, ldc.i4:int32(32768))
519 stfld:int32(ResourceEnumerator::_currentName, ldloc:ResourceEnumerator(this), ldloc:int32(var_5_2A))
520}
521
522 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
523 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
524 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
525 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
526 --- End of inner exception stack trace ---
527 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
528 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
529*/;
530 }
531
532 // Token: 0x17000494 RID: 1172
533 // (get) Token: 0x06002347 RID: 9031 RVA: 0x0004FE78 File Offset: 0x0004E078
534 public object Key
535 {
536 get
537 {
538 /*
539An exception occurred when decompiling this method (06002347)
540
541ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Object System.Resources.ResourceReader/ResourceEnumerator::get_Key()
542
543 ---> System.Exception: Basic block has to end with unconditional control flow.
544{
545 IL_002E:
546 stloc:string(var_3_38, call:string(Environment::GetResourceString, ldstr:string("ResourceReader is closed.")))
547}
548
549 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
550 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
551 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
552 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
553 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
554 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
555 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
556 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
557 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
558 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
559 --- End of inner exception stack trace ---
560 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
561 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
562*/;
563 }
564 }
565
566 // Token: 0x17000495 RID: 1173
567 // (get) Token: 0x06002348 RID: 9032 RVA: 0x0004FEC0 File Offset: 0x0004E0C0
568 public object Current
569 {
570 get
571 {
572 /*
573An exception occurred when decompiling this method (06002348)
574
575ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Object System.Resources.ResourceReader/ResourceEnumerator::get_Current()
576
577 ---> System.Exception: Basic block has to end with unconditional control flow.
578{
579 Block_0:
580 stloc:DictionaryEntry(var_0_06, callgetter:DictionaryEntry(ResourceEnumerator::get_Entry, ldloc:ResourceEnumerator(this)))
581}
582
583 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
584 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
585 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
586 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
587 --- End of inner exception stack trace ---
588 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
589 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
590*/;
591 }
592 }
593
594 // Token: 0x17000496 RID: 1174
595 // (get) Token: 0x06002349 RID: 9033 RVA: 0x0004FED4 File Offset: 0x0004E0D4
596 internal int DataPosition
597 {
598 get
599 {
600 return this._dataPosition;
601 }
602 }
603
604 // Token: 0x17000497 RID: 1175
605 // (get) Token: 0x0600234A RID: 9034 RVA: 0x0004FEE8 File Offset: 0x0004E0E8
607 {
608 get
609 {
610 int currentName = this._currentName;
611 if (this._currentIsValid)
612 {
613 ResourceReader reader = this._reader;
614 if (reader._resCache != null)
615 {
617 long num = 0L;
619 int currentName2 = this._currentName;
620 string text = reader2.AllocateStringForNameIndex(currentName2, (int)num);
623 int dataPosition = this._dataPosition;
624 object obj = this._reader.LoadObject(dataPosition);
625 int currentName3 = this._currentName;
626 long num2 = 0L;
627 int num3 = 14;
628 if (reader3 != null)
629 {
631 }
632 if (num2 != 0L)
633 {
634 throw new OutOfMemoryException();
635 }
636 long num4 = 0L;
637 long num5;
638 if (num3 == 0)
639 {
640 num5 = 0L;
641 }
642 if (reader3 != null)
643 {
644 Monitor.Exit(reader);
645 }
646 if (num4 == 0L)
647 {
648 if (num5 == 0L)
649 {
650 }
651 return "Enumeration already finished.";
652 }
653 }
654 else
655 {
656 string resourceString = Environment.GetResourceString("ResourceReader is closed.");
657 }
658 throw new OutOfMemoryException();
659 }
660 return "Enumeration has not started. Call MoveNext.";
661 }
662 }
663
664 // Token: 0x17000498 RID: 1176
665 // (get) Token: 0x0600234B RID: 9035 RVA: 0x00050004 File Offset: 0x0004E204
666 public object Value
667 {
668 get
669 {
670 /*
671An exception occurred when decompiling this method (0600234B)
672
673ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Object System.Resources.ResourceReader/ResourceEnumerator::get_Value()
674
675 ---> System.Exception: Basic block has to end with unconditional control flow.
676{
677 IL_0032:
678 stloc:string(var_2_3C, call:string(Environment::GetResourceString, ldstr:string("ResourceReader is closed.")))
679}
680
681 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
682 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
683 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
684 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
685 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
686 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
687 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
688 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
689 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
690 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
691 --- End of inner exception stack trace ---
692 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
693 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
694*/;
695 }
696 }
697
698 // Token: 0x0600234C RID: 9036 RVA: 0x00050050 File Offset: 0x0004E250
699 public void Reset()
700 {
701 /*
702An exception occurred when decompiling this method (0600234C)
703
704ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void System.Resources.ResourceReader/ResourceEnumerator::Reset()
705
706 ---> System.Exception: Basic block has to end with unconditional control flow.
707{
708 IL_0017:
709 stloc:string(var_1_21, call:string(Environment::GetResourceString, ldstr:string("ResourceReader is closed.")))
710}
711
712 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
713 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
714 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
715 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
716 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
717 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
718 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
719 --- End of inner exception stack trace ---
720 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
721 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
722*/;
723 }
724
725 // Token: 0x0400134D RID: 4941
727
728 // Token: 0x0400134E RID: 4942
729 private bool _currentIsValid;
730
731 // Token: 0x0400134F RID: 4943
732 private int _currentName;
733
734 // Token: 0x04001350 RID: 4944
735 private int _dataPosition;
736 }
737 }
738}
class f__AnonymousType0<< Count > j__TPar
static string GetResourceString(string key)
unsafe int GetNamePosition(int index)
unsafe bool CompareStringEqualsName(string name)
ResourceReader(Stream stream, Dictionary< string, ResourceLocator > resCache)
IDictionaryEnumerator GetEnumerator()
object LoadObjectV2(int pos, [Out] ResourceTypeCode typeCode)
object LoadObject(int pos, [Out] ResourceTypeCode typeCode)
object GetValueForNameIndex(int index)
ResourceReader.ResourceEnumerator GetEnumeratorInternal()
static unsafe int ReadUnalignedI4(int *p)
unsafe string AllocateStringForNameIndex(int index, [Out] int dataOffset)
RuntimeType FindType(int typeIndex)
object _LoadObjectV2(int pos, [Out] ResourceTypeCode typeCode)
object DeserializeObject(int typeIndex)
Dictionary< string, ResourceLocator > _resCache
static Encoding Unicode
Definition Encoding.cs:799
static Encoding UTF8
Definition Encoding.cs:828
static void Exit(object obj)
Definition Monitor.cs:47
static void Enter(object obj)
Definition Monitor.cs:11