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
IdnMapping.cs
Go to the documentation of this file.
1using System;
2
4{
5 // Token: 0x020005C3 RID: 1475
6 public sealed class IdnMapping
7 {
8 // Token: 0x06002D20 RID: 11552 RVA: 0x00063D00 File Offset: 0x00061F00
9 public IdnMapping()
10 {
11 }
12
13 // Token: 0x06002D21 RID: 11553 RVA: 0x00063D14 File Offset: 0x00061F14
14 public override bool Equals(object obj)
15 {
16 if (obj != null)
17 {
18 bool flag = this.allow_unassigned;
19 bool flag2 = this.use_std3;
20 return;
21 }
22 }
23
24 // Token: 0x06002D22 RID: 11554 RVA: 0x00063D34 File Offset: 0x00061F34
25 public override int GetHashCode()
26 {
27 /*
28An exception occurred when decompiling this method (06002D22)
29
30ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Int32 System.Globalization.IdnMapping::GetHashCode()
31
32 ---> System.Exception: Basic block has to end with unconditional control flow.
33{
34 Block_0:
35 stloc:bool(var_0_06, ldfld:bool(IdnMapping::allow_unassigned, ldloc:IdnMapping(this)))
36 stloc:bool(var_1_0D, ldfld:bool(IdnMapping::use_std3, ldloc:IdnMapping(this)))
37}
38
39 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
40 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
41 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
42 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
43 --- End of inner exception stack trace ---
44 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
45 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
46*/;
47 }
48
49 // Token: 0x06002D23 RID: 11555 RVA: 0x00063D50 File Offset: 0x00061F50
50 public string GetAscii(string unicode)
51 {
52 while (unicode == null)
53 {
54 }
55 int stringLength = unicode._stringLength;
56 long num = 0L;
57 return this.GetAscii(unicode, (int)num, stringLength);
58 }
59
60 // Token: 0x06002D24 RID: 11556 RVA: 0x00063D74 File Offset: 0x00061F74
61 public string GetAscii(string unicode, int index, int count)
62 {
63 while (unicode == null)
64 {
65 }
66 int stringLength = unicode._stringLength;
67 int num = 1;
68 return this.Convert(unicode, index, count, num != 0);
69 }
70
71 // Token: 0x06002D25 RID: 11557 RVA: 0x00063DA0 File Offset: 0x00061FA0
72 private string Convert(string input, int index, int count, bool toAscii)
73 {
74 int stringLength = input.Substring(index, count)._stringLength;
75 if (stringLength == 0)
76 {
77 }
79 if (stringLength != 0)
80 {
81 string text;
82 return text;
83 }
84 string text2;
85 int stringLength2 = text2._stringLength;
86 string[] array;
87 return string.Join(".", array);
88 }
89
90 // Token: 0x06002D26 RID: 11558 RVA: 0x00063DF8 File Offset: 0x00061FF8
91 private string ToAscii(string s, int offset)
92 {
93 int stringLength = s._stringLength;
94 long num = 0L;
95 char c = s[(int)num];
96 char c2 = s[(int)num];
97 char c3 = s[(int)num];
98 int stringLength2 = s._stringLength;
99 string text = this.NamePrep(s, offset);
100 if (this.use_std3)
101 {
102 }
103 int stringLength3 = text._stringLength;
104 long num2 = 0L;
105 char c4 = text[(int)num2];
106 int stringLength4 = text._stringLength;
107 int num3 = 5;
108 string text2 = this.puny.Encode(text, num3);
109 return "xn--" + text2;
110 }
111
112 // Token: 0x06002D27 RID: 11559 RVA: 0x00063E88 File Offset: 0x00062088
113 private void VerifyLength(string s, int offset)
114 {
115 if (s._stringLength != 0)
116 {
117 return;
118 }
119 }
120
121 // Token: 0x06002D28 RID: 11560 RVA: 0x00063EA0 File Offset: 0x000620A0
122 private string NamePrep(string s, int offset)
123 {
124 string text;
125 if (!this.allow_unassigned)
126 {
127 int stringLength = text._stringLength;
128 long num = 0L;
129 if (stringLength == 0)
130 {
131 }
132 UnicodeCategory unicodeCategory = char.GetUnicodeCategory(text, (int)num);
133 int stringLength2 = text._stringLength;
134 }
135 return text;
136 }
137
138 // Token: 0x06002D29 RID: 11561 RVA: 0x00063ED4 File Offset: 0x000620D4
139 private void VerifyProhibitedCharacters(string s, int offset)
140 {
141 int stringLength = s._stringLength;
142 long num = 0L;
143 if (stringLength == 0)
144 {
145 }
146 UnicodeCategory unicodeCategory = char.GetUnicodeCategory(s, (int)num);
147 char c = s[(int)num];
148 }
149
150 // Token: 0x06002D2A RID: 11562 RVA: 0x00063F20 File Offset: 0x00062120
151 private void VerifyStd3AsciiRules(string s, int offset)
152 {
153 int stringLength = s._stringLength;
154 long num = 0L;
155 char c = s[(int)num];
156 int stringLength2 = s._stringLength;
157 char c2 = s[(int)num];
158 int stringLength3 = s._stringLength;
159 long num2 = 0L;
160 char c3 = s[(int)num2];
161 int stringLength4 = s._stringLength;
162 }
163
164 // Token: 0x06002D2B RID: 11563 RVA: 0x00063F70 File Offset: 0x00062170
165 public string GetUnicode(string ascii)
166 {
167 while (ascii == null)
168 {
169 }
170 int stringLength = ascii._stringLength;
171 long num = 0L;
172 return this.GetUnicode(ascii, (int)num, stringLength);
173 }
174
175 // Token: 0x06002D2C RID: 11564 RVA: 0x00063F94 File Offset: 0x00062194
176 public string GetUnicode(string ascii, int index, int count)
177 {
178 while (ascii == null)
179 {
180 }
181 int stringLength = ascii._stringLength;
182 long num = 0L;
183 return this.Convert(ascii, index, count, num != 0L);
184 }
185
186 // Token: 0x06002D2D RID: 11565 RVA: 0x00063FC0 File Offset: 0x000621C0
187 private string ToUnicode(string s, int offset)
188 {
189 string text4;
190 int num5;
191 do
192 {
193 int stringLength = s._stringLength;
194 long num = 0L;
195 long num2 = 0L;
196 char c = s[(int)num];
197 int stringLength2 = s._stringLength;
198 string text = this.NamePrep(s, (int)num2);
200 string text2 = text.ToLower(invariantCulture);
201 int num3 = 4;
202 long num4 = 0L;
203 string text3 = text2.Substring(num3);
204 text4 = this.puny.Decode(text3, (int)num4);
205 string text5 = this.ToAscii(text4, (int)num4);
206 }
207 while (num5 != 0);
208 return text4;
209 }
210
211 // Token: 0x04001938 RID: 6456
212 private bool allow_unassigned;
213
214 // Token: 0x04001939 RID: 6457
215 private bool use_std3;
216
217 // Token: 0x0400193A RID: 6458
218 private Punycode puny;
219 }
220}
class f__AnonymousType0<< Count > j__TPar
string Decode(string s, int offset)
Definition Bootstring.cs:88
string Encode(string s, int offset)
Definition Bootstring.cs:22
static CultureInfo InvariantCulture
string GetUnicode(string ascii)
override bool Equals(object obj)
Definition IdnMapping.cs:14
string GetUnicode(string ascii, int index, int count)
string Convert(string input, int index, int count, bool toAscii)
Definition IdnMapping.cs:72
string GetAscii(string unicode)
Definition IdnMapping.cs:50
string ToUnicode(string s, int offset)
string NamePrep(string s, int offset)
string GetAscii(string unicode, int index, int count)
Definition IdnMapping.cs:61
void VerifyStd3AsciiRules(string s, int offset)
void VerifyProhibitedCharacters(string s, int offset)
void VerifyLength(string s, int offset)
string ToAscii(string s, int offset)
Definition IdnMapping.cs:91