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
HttpListenerRequestUriBuilder.cs
Go to the documentation of this file.
1using System;
4using System.Text;
6
7namespace System.Net
8{
9 // Token: 0x02000192 RID: 402
10 internal sealed class HttpListenerRequestUriBuilder
11 {
12 // Token: 0x06000A4E RID: 2638 RVA: 0x00022C74 File Offset: 0x00020E74
14 {
15 if (!true)
16 {
17 }
18 if (!true)
19 {
20 }
21 }
22
23 // Token: 0x06000A4F RID: 2639 RVA: 0x00022C8C File Offset: 0x00020E8C
38
39 // Token: 0x06000A50 RID: 2640 RVA: 0x00022CC8 File Offset: 0x00020EC8
40 public static global::System.Uri GetRequestUri(string rawUri, string cookedUriScheme, string cookedUriHost, string cookedUriPath, string cookedUriQuery)
41 {
42 global::System.Uri uri;
43 return uri;
44 }
45
46 // Token: 0x06000A51 RID: 2641 RVA: 0x00022CD8 File Offset: 0x00020ED8
47 private global::System.Uri Build()
48 {
50 global::System.Uri uri = this.requestUri;
53 global::System.Uri uri2 = this.requestUri;
55 return this.requestUri;
56 }
57
58 // Token: 0x06000A52 RID: 2642 RVA: 0x00022D14 File Offset: 0x00020F14
60 {
61 string text = this.cookedUriScheme;
62 if ((text == null || text != null) && (text == null || text != null))
63 {
64 string text2 = this.cookedUriHost;
65 if (text2 == null || text2 != null)
66 {
67 string text3 = this.cookedUriPath;
68 if (text3 == null || text3 != null)
69 {
70 string text4 = this.cookedUriQuery;
71 if (text4 == null || text4 != null)
72 {
73 return;
74 }
75 }
76 }
77 }
79 }
80
81 // Token: 0x06000A53 RID: 2643 RVA: 0x00022DC0 File Offset: 0x00020FC0
83 {
84 int num = 1;
85 string text = this.rawUri;
86 if (num == 0)
87 {
88 }
90 this.rawPath = path;
91 string text2 = this.rawPath;
92 string text3 = this.cookedUriScheme;
93 if ((text3 == null || text3 != null) && (text3 == null || text3 != null))
94 {
95 string text4 = this.cookedUriHost;
96 if ((text4 == null || text4 != null) && ("/" == null || "/" != null))
97 {
98 string text5 = this.cookedUriQuery;
99 if (text5 == null || text5 != null)
100 {
101 return;
102 }
103 }
104 }
105 throw new ArrayTypeMismatchException();
106 }
107
108 // Token: 0x06000A54 RID: 2644 RVA: 0x00022EB8 File Offset: 0x000210B8
110 {
111 if (!true)
112 {
113 }
114 return 1;
115 }
116
117 // Token: 0x06000A55 RID: 2645 RVA: 0x00022ECC File Offset: 0x000210CC
119 {
120 int num = 1;
121 string text = this.cookedUriScheme;
122 StringBuilder stringBuilder = this.requestUriString;
123 if (num == 0)
124 {
125 }
126 StringBuilder stringBuilder2 = stringBuilder.Append(text);
128 string text2 = this.cookedUriHost;
130 if (this.ParseRawPath(encoding) == HttpListenerRequestUriBuilder.ParsingResult.Success)
131 {
132 string text3 = this.cookedUriQuery;
135 }
136 string text4 = this.rawPath;
137 if ((text4 == null || text4 != null) && (encoding == null || encoding != null))
138 {
139 bool on = Logging.On;
140 }
141 throw new ArrayTypeMismatchException();
142 }
143
144 // Token: 0x06000A56 RID: 2646 RVA: 0x00022F60 File Offset: 0x00021160
146 {
147 /*
148An exception occurred when decompiling this method (06000A56)
149
150ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Net.HttpListenerRequestUriBuilder/ParsingResult System.Net.HttpListenerRequestUriBuilder::ParseRawPath(System.Text.Encoding)
151
152 ---> System.Exception: Basic block has to end with unconditional control flow.
153{
154 Block_0:
155 stloc:string(var_0_06, ldfld:string(HttpListenerRequestUriBuilder::rawPath, ldloc:HttpListenerRequestUriBuilder(this)))
156 stloc:int32(var_1_0D, ldfld:int32(string::_stringLength, ldloc:string(var_0_06)))
157 stloc:int64(var_2_0F, ldc.i4:int64(0))
158 stloc:char(var_3_17, callgetter:char(string::get_Chars, ldloc:string(var_0_06), ldloc:int64[exp:int32](var_2_0F)))
159 stloc:char(var_4_24, callgetter:char(string::get_Chars, ldfld:string(HttpListenerRequestUriBuilder::rawPath, ldloc:HttpListenerRequestUriBuilder(this)), ldloc:int64[exp:int32](var_2_0F)))
160 stloc:bool(var_5_2D, call:bool(HttpListenerRequestUriBuilder::EmptyDecodeAndAppendRawOctetsList, ldloc:HttpListenerRequestUriBuilder(this), ldloc:Encoding(encoding)))
161 stloc:string(var_6_35, ldfld:string(HttpListenerRequestUriBuilder::rawPath, ldloc:HttpListenerRequestUriBuilder(this)))
162 stloc:bool(var_8_3F, call:bool(HttpListenerRequestUriBuilder::AppendUnicodeCodePointValuePercentEncoded, ldloc:HttpListenerRequestUriBuilder(this), ldloc:string(var_7)))
163 stloc:bool(var_9_48, call:bool(HttpListenerRequestUriBuilder::EmptyDecodeAndAppendRawOctetsList, ldloc:HttpListenerRequestUriBuilder(this), ldloc:Encoding(encoding)))
164 stloc:StringBuilder(var_10_57, call:StringBuilder(StringBuilder::Append, ldfld:StringBuilder(HttpListenerRequestUriBuilder::requestUriString, ldloc:HttpListenerRequestUriBuilder(this)), ldloc:bool[exp:char](var_8_3F)))
165 stloc:string(var_11_5F, ldfld:string(HttpListenerRequestUriBuilder::rawPath, ldloc:HttpListenerRequestUriBuilder(this)))
166 stloc:int32(var_12_62, ldc.i4:int32(2))
167 stloc:string(var_13_6F, call:string(string::Substring, ldloc:string(var_11_5F), ldloc:bool[exp:int32](var_8_3F), ldloc:int32(var_12_62)))
168 stloc:int32(var_15_7C, ldfld:int32(string::_stringLength, ldfld:string(HttpListenerRequestUriBuilder::rawPath, ldloc:HttpListenerRequestUriBuilder(this))))
169 stloc:bool(var_16_85, call:bool(HttpListenerRequestUriBuilder::EmptyDecodeAndAppendRawOctetsList, ldloc:HttpListenerRequestUriBuilder(this), ldloc:Encoding(encoding)))
170}
171
172 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
173 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
174 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
175 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
176 --- End of inner exception stack trace ---
177 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
178 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
179*/;
180 }
181
182 // Token: 0x06000A57 RID: 2647 RVA: 0x00022FFC File Offset: 0x000211FC
184 {
185 string text = char.ConvertFromUtf32(43163648);
186 StringBuilder stringBuilder = this.requestUriString;
187 if (codePoint == null || codePoint != null)
188 {
189 bool on = Logging.On;
190 if (codePoint == null || codePoint != null)
191 {
192 return "Can't convert percent encoded value '{0}'." != null;
193 }
194 }
195 throw new ArrayTypeMismatchException();
196 }
197
198 // Token: 0x06000A58 RID: 2648 RVA: 0x00002050 File Offset: 0x00000250
200 {
201 throw new global::Cpp2IlInjected.AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
202 }
203
204 // Token: 0x06000A59 RID: 2649 RVA: 0x00023054 File Offset: 0x00021254
206 {
207 if (this.rawOctets._size != 0)
208 {
209 StringBuilder stringBuilder = this.requestUriString;
213 int version = list2._version;
214 list2._syncRoot = version;
215 }
217 if (octetsAsString == null || octetsAsString != null)
218 {
219 return "Can't convert bytes '{0}' into UTF-16 characters: {1}" != null;
220 }
221 throw new ArrayTypeMismatchException();
222 }
223
224 // Token: 0x06000A5A RID: 2650 RVA: 0x000230DC File Offset: 0x000212DC
226 {
227 }
228
229 // Token: 0x06000A5B RID: 2651 RVA: 0x0002313C File Offset: 0x0002133C
231 {
233 long num = 0L;
234 int num2 = 6;
235 if (num != 0L || num2 == 0)
236 {
237 }
238 throw new OutOfMemoryException();
239 }
240
241 // Token: 0x06000A5C RID: 2652 RVA: 0x00023174 File Offset: 0x00021374
242 private static string GetPath(string uriString)
243 {
244 long num = 0L;
245 int num2 = 63;
246 long num3 = 0L;
247 string text;
248 int num4 = text.IndexOf((char)num2);
249 int stringLength = text._stringLength;
250 return HttpListenerRequestUriBuilder.AddSlashToAsteriskOnlyPath(text.Substring((int)num, (int)num3));
251 }
252
253 // Token: 0x06000A5D RID: 2653 RVA: 0x000231BC File Offset: 0x000213BC
254 private static string AddSlashToAsteriskOnlyPath(string path)
255 {
256 }
257
258 // Token: 0x06000A5E RID: 2654 RVA: 0x000231CC File Offset: 0x000213CC
259 private void LogWarning(string methodName, string message, params object[] args)
260 {
261 bool on = Logging.On;
262 }
263
264 // Token: 0x040007F2 RID: 2034
265 private static readonly bool useCookedRequestUrl;
266
267 // Token: 0x040007F3 RID: 2035
269
270 // Token: 0x040007F4 RID: 2036
272
273 // Token: 0x040007F5 RID: 2037
274 private readonly string rawUri;
275
276 // Token: 0x040007F6 RID: 2038
277 private readonly string cookedUriScheme;
278
279 // Token: 0x040007F7 RID: 2039
280 private readonly string cookedUriHost;
281
282 // Token: 0x040007F8 RID: 2040
283 private readonly string cookedUriPath;
284
285 // Token: 0x040007F9 RID: 2041
286 private readonly string cookedUriQuery;
287
288 // Token: 0x040007FA RID: 2042
290
291 // Token: 0x040007FB RID: 2043
293
294 // Token: 0x040007FC RID: 2044
295 private string rawPath;
296
297 // Token: 0x040007FD RID: 2045
298 private global::System.Uri requestUri;
299
300 // Token: 0x02000193 RID: 403
301 private enum ParsingResult
302 {
303 // Token: 0x040007FF RID: 2047
304 Success,
305 // Token: 0x04000800 RID: 2048
307 // Token: 0x04000801 RID: 2049
309 }
310
311 // Token: 0x02000194 RID: 404
312 private enum EncodingType
313 {
314 // Token: 0x04000803 RID: 2051
315 Primary,
316 // Token: 0x04000804 RID: 2052
318 }
319 }
320}
class f__AnonymousType0<< Count > j__TPar
static CultureInfo InvariantCulture
static void AppendOctetsPercentEncoded(StringBuilder target, IEnumerable< byte > octets)
static string GetOctetsAsString(IEnumerable< byte > octets)
HttpListenerRequestUriBuilder.ParsingResult BuildRequestUriUsingRawPath(Encoding encoding)
bool AddPercentEncodedOctetToRawOctetsList(Encoding encoding, string escapedCharacter)
HttpListenerRequestUriBuilder(string rawUri, string cookedUriScheme, string cookedUriHost, string cookedUriPath, string cookedUriQuery)
static Encoding GetEncoding(HttpListenerRequestUriBuilder.EncodingType type)
HttpListenerRequestUriBuilder.ParsingResult ParseRawPath(Encoding encoding)
void LogWarning(string methodName, string message, params object[] args)
static global::System.Uri GetRequestUri(string rawUri, string cookedUriScheme, string cookedUriHost, string cookedUriPath, string cookedUriQuery)
static bool On
Definition Logging.cs:12
StringBuilder Append(char value, int repeatCount)
Uri(string uriString)
Definition Uri.cs:279