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
TermInfoReader.cs
Go to the documentation of this file.
1using System;
2using System.IO;
4
5namespace System
6{
7 // Token: 0x02000193 RID: 403
8 internal class TermInfoReader
9 {
10 // Token: 0x06000FB5 RID: 4021 RVA: 0x000218CC File Offset: 0x0001FACC
11 public TermInfoReader(string term, string filename)
12 {
14 byte[] array = this.buffer;
15 this.ReadHeader(array, 0);
16 byte[] array2 = this.buffer;
17 int num = this.booleansOffset;
18 int stringLength = this.GetString(array2, num)._stringLength;
19 if (stringLength != 0)
20 {
21 }
22 }
23
24 // Token: 0x06000FB6 RID: 4022 RVA: 0x00021948 File Offset: 0x0001FB48
25 public TermInfoReader(string term, byte[] buffer)
26 {
27 while (buffer == null)
28 {
29 }
31 int num = this.booleansOffset;
32 string @string = this.GetString(buffer, num);
33 int num2 = this.booleansOffset;
34 int stringLength = @string._stringLength;
36 }
37
38 // Token: 0x06000FB7 RID: 4023 RVA: 0x00021984 File Offset: 0x0001FB84
39 private void DetermineVersion(short magic)
40 {
41 }
42
43 // Token: 0x06000FB8 RID: 4024 RVA: 0x0002199C File Offset: 0x0001FB9C
44 private void ReadHeader(byte[] buffer, int position)
45 {
46 }
47
48 // Token: 0x06000FB9 RID: 4025 RVA: 0x000219AC File Offset: 0x0001FBAC
49 private void ReadNames(byte[] buffer, int position)
50 {
51 string text;
52 int stringLength = text._stringLength;
53 }
54
55 // Token: 0x06000FBA RID: 4026 RVA: 0x000219C0 File Offset: 0x0001FBC0
57 {
58 /*
59An exception occurred when decompiling this method (06000FBA)
60
61ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Int32 System.TermInfoReader::Get(System.TermInfoNumbers)
62
63 ---> System.Exception: Basic block has to end with unconditional control flow.
64{
65 Block_0:
66 stloc:int32(var_0_06, ldfld:int32(TermInfoReader::numSize, ldloc:TermInfoReader(this)))
67 stloc:int32(var_1_0D, ldfld:int32(TermInfoReader::boolSize, ldloc:TermInfoReader(this)))
68 stloc:int32(var_2_14, ldfld:int32(TermInfoReader::booleansOffset, ldloc:TermInfoReader(this)))
69 stloc:uint8[](var_3_1B, ldfld:uint8[](TermInfoReader::buffer, ldloc:TermInfoReader(this)))
70}
71
72 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
73 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
74 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
75 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
76 --- End of inner exception stack trace ---
77 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
78 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
79*/;
80 }
81
82 // Token: 0x06000FBB RID: 4027 RVA: 0x000219E8 File Offset: 0x0001FBE8
83 public string Get(TermInfoStrings tstr)
84 {
85 int num = this.strOffsets;
86 int num2 = this.booleansOffset;
87 int num3 = this.boolSize;
88 int num4 = this.strOffsets;
89 byte[] array = this.buffer;
90 string text;
91 return text;
92 }
93
94 // Token: 0x06000FBC RID: 4028 RVA: 0x00021A28 File Offset: 0x0001FC28
96 {
97 int num = this.strOffsets;
98 int num2 = this.booleansOffset;
99 int num3 = this.boolSize;
100 int num4 = this.strOffsets;
101 byte[] array = this.buffer;
102 byte[] array2;
103 return array2;
104 }
105
106 // Token: 0x06000FBD RID: 4029 RVA: 0x0000207A File Offset: 0x0000027A
107 private short GetInt16(byte[] buffer, int offset)
108 {
109 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
110 }
111
112 // Token: 0x06000FBE RID: 4030 RVA: 0x00021A68 File Offset: 0x0001FC68
113 private string GetString(byte[] buffer, int offset)
114 {
115 /*
116An exception occurred when decompiling this method (06000FBE)
117
118ICSharpCode.Decompiler.DecompilerException: Error decompiling System.String System.TermInfoReader::GetString(System.Byte[],System.Int32)
119
120 ---> System.Exception: Basic block has to end with unconditional control flow.
121{
122 Block_0:
123 stloc:Encoding(var_1_07, callgetter:Encoding(Encoding::get_ASCII))
124}
125
126 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
127 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
128 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
129 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
130 --- End of inner exception stack trace ---
131 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
132 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
133*/;
134 }
135
136 // Token: 0x06000FBF RID: 4031 RVA: 0x00021A7C File Offset: 0x0001FC7C
137 private byte[] GetStringBytes(byte[] buffer, int offset)
138 {
139 }
140
141 // Token: 0x040006EE RID: 1774
142 private int boolSize;
143
144 // Token: 0x040006EF RID: 1775
145 private int numSize;
146
147 // Token: 0x040006F0 RID: 1776
148 private int strOffsets;
149
150 // Token: 0x040006F1 RID: 1777
151 private byte[] buffer;
152
153 // Token: 0x040006F2 RID: 1778
154 private int booleansOffset;
155
156 // Token: 0x040006F3 RID: 1779
157 private int intOffset;
158 }
159}
class f__AnonymousType0<< Count > j__TPar
static FileStream OpenRead(string path)
Definition File.cs:159
TermInfoReader(string term, string filename)
void DetermineVersion(short magic)
string GetString(byte[] buffer, int offset)
void ReadNames(byte[] buffer, int position)
TermInfoReader(string term, byte[] buffer)
void ReadHeader(byte[] buffer, int position)
string Get(TermInfoStrings tstr)
byte[] GetStringBytes(byte[] buffer, int offset)
byte[] GetStringBytes(TermInfoStrings tstr)
int Get(TermInfoNumbers number)
short GetInt16(byte[] buffer, int offset)