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
IPAddressParser.cs
Go to the documentation of this file.
1using System;
3using System.Text;
5
6namespace System.Net
7{
8 // Token: 0x02000141 RID: 321
9 internal class IPAddressParser
10 {
11 // Token: 0x060007C1 RID: 1985 RVA: 0x0001B294 File Offset: 0x00019494
13 {
14 }
15
16 // Token: 0x060007C2 RID: 1986 RVA: 0x0001B2AC File Offset: 0x000194AC
17 internal static string IPv4AddressToString(uint address)
18 {
19 string text;
20 return text;
21 }
22
23 // Token: 0x060007C3 RID: 1987 RVA: 0x0001B2BC File Offset: 0x000194BC
24 internal static void IPv4AddressToString(uint address, StringBuilder destination)
25 {
26 }
27
28 // Token: 0x060007C4 RID: 1988 RVA: 0x0001B2CC File Offset: 0x000194CC
29 internal static bool IPv4AddressToString(uint address, Span<char> formatted, [Out] int charsWritten)
30 {
31 /*
32An exception occurred when decompiling this method (060007C4)
33
34ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Boolean System.Net.IPAddressParser::IPv4AddressToString(System.UInt32,System.Span`1<System.Char>,System.Int32)
35
36 ---> System.Exception: Basic block has to end with unconditional control flow.
37{
38 Block_0:
39 stloc:int64(var_1_01, ldc.i4:int64(0))
40 stfld:int32(int32::m_value, ldloc:int32[exp:int32&](charsWritten), ldloc:int64[exp:int32](var_1_01))
41}
42
43 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
44 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
45 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
46 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
47 --- End of inner exception stack trace ---
48 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
49 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
50*/;
51 }
52
53 // Token: 0x060007C5 RID: 1989 RVA: 0x0001B2E4 File Offset: 0x000194E4
54 private unsafe static int IPv4AddressToStringHelper(uint address, char* addressString)
55 {
56 /*
57An exception occurred when decompiling this method (060007C5)
58
59ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Int32 System.Net.IPAddressParser::IPv4AddressToStringHelper(System.UInt32,System.Char*)
60
61 ---> System.Exception: Basic block has to end with unconditional control flow.
62{
63 Block_0:
64 stloc:int32(var_0_02, ldc.i4:int32(46))
65 stfld:uint32(uint32::m_value, ldloc:uint32[exp:uint32&](address), ldloc:int32[exp:uint32](var_0_02))
66 stfld:uint32(uint32::m_value, ldloc:uint32[exp:uint32&](address), ldloc:int32[exp:uint32](var_0_02))
67 stfld:uint32(uint32::m_value, ldloc:uint32[exp:uint32&](address), ldloc:int32[exp:uint32](var_0_02))
68}
69
70 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
71 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
72 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
73 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
74 --- End of inner exception stack trace ---
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 92
76 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
77*/;
78 }
79
80 // Token: 0x060007C6 RID: 1990 RVA: 0x0001B308 File Offset: 0x00019508
81 internal static string IPv6AddressToString(ushort[] address, uint scopeId)
82 {
83 StringBuilder stringBuilder;
84 return StringBuilderCache.GetStringAndRelease(stringBuilder);
85 }
86
87 // Token: 0x060007C7 RID: 1991 RVA: 0x0001B31C File Offset: 0x0001951C
88 internal static bool IPv6AddressToString(ushort[] address, uint scopeId, Span<char> destination, [Out] int charsWritten)
89 {
90 StringBuilder stringBuilder;
91 int length = stringBuilder.Length;
92 StringBuilderCache.Release(stringBuilder);
93 int length2 = stringBuilder.Length;
94 int length3 = stringBuilder.Length;
96 StringBuilderCache.Release(stringBuilder);
97 return true;
98 }
99
100 // Token: 0x060007C8 RID: 1992 RVA: 0x0001B358 File Offset: 0x00019558
101 internal static StringBuilder IPv6AddressToStringHelper(ushort[] address, uint scopeId)
102 {
103 StringBuilder stringBuilder = StringBuilderCache.Acquire(65);
104 long num = 0L;
105 int length = stringBuilder.Length;
106 char c = stringBuilder[(int)num];
107 int num2 = 58;
108 StringBuilder stringBuilder2 = stringBuilder.Append((char)num2);
109 if (address == null)
110 {
112 return stringBuilder3;
113 }
114 int num3 = 37;
115 StringBuilder stringBuilder4 = stringBuilder.Append((char)num3);
116 return stringBuilder;
117 }
118
119 // Token: 0x060007C9 RID: 1993 RVA: 0x0001B3A8 File Offset: 0x000195A8
120 private unsafe static void FormatIPv4AddressNumber(int number, char* addressString, int offset)
121 {
122 int num = 1;
123 offset.m_value = num;
124 if (num == 0)
125 {
126 }
127 int num2 = 10;
128 int num3 = Math.DivRem(number, num2, offset);
129 addressString->m_value = (char)num;
130 while (num3 != 0)
131 {
132 }
133 }
134
135 // Token: 0x060007CA RID: 1994 RVA: 0x0001B3D8 File Offset: 0x000195D8
136 public static bool Ipv4StringToAddress(ReadOnlySpan<char> ipSpan, [Out] long address)
137 {
138 long num = 0L;
139 address.m_value = num;
140 return true;
141 }
142
143 // Token: 0x060007CB RID: 1995 RVA: 0x0001B3F0 File Offset: 0x000195F0
144 public unsafe static bool Ipv6StringToAddress(ReadOnlySpan<char> ipSpan, ushort* numbers, int numbersLength, [Out] uint scope)
145 {
146 /*
147An exception occurred when decompiling this method (060007CB)
148
149ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Boolean System.Net.IPAddressParser::Ipv6StringToAddress(System.ReadOnlySpan`1<System.Char>,System.UInt16*,System.Int32,System.UInt32)
150
151 ---> System.Exception: Basic block has to end with unconditional control flow.
152{
153 Block_0:
154 stloc:int64(var_7_0B, ldc.i4:int64(0))
155 stfld:uint32(uint32::m_value, ldloc:uint32[exp:uint32&](scope), ldloc:int64[exp:uint32](var_7_0B))
156}
157
158 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
159 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
160 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
161 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
162 --- End of inner exception stack trace ---
163 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
164 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
165*/;
166 }
167
168 // Token: 0x060007CC RID: 1996 RVA: 0x0001B414 File Offset: 0x00019614
169 private static void AppendSections(ushort[] address, int fromInclusive, int toExclusive, StringBuilder buffer)
170 {
171 int num = 1;
172 if (address != null)
173 {
175 return;
176 }
177 if (num != 0)
178 {
180 }
181 int num2 = 58;
182 StringBuilder stringBuilder = buffer.Append((char)num2);
183 StringBuilder stringBuilder2 = buffer.Append("::");
184 int num3 = 58;
185 StringBuilder stringBuilder3 = buffer.Append((char)num3);
186 }
187
188 // Token: 0x060007CD RID: 1997 RVA: 0x0001B464 File Offset: 0x00019664
189 private static void AppendHex(ushort value, StringBuilder buffer)
190 {
191 }
192
193 // Token: 0x060007CE RID: 1998 RVA: 0x00002050 File Offset: 0x00000250
194 private static uint ExtractIPv4Address(ushort[] address)
195 {
196 throw new global::Cpp2IlInjected.AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
197 }
198
199 // Token: 0x060007CF RID: 1999 RVA: 0x00002050 File Offset: 0x00000250
200 private static ushort Reverse(ushort number)
201 {
202 throw new global::Cpp2IlInjected.AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
203 }
204
205 // Token: 0x060007D0 RID: 2000 RVA: 0x0001B474 File Offset: 0x00019674
207 {
208 }
209
210 // Token: 0x04000646 RID: 1606
211 private const int MaxIPv4StringLength = 15;
212 }
213}
class f__AnonymousType0<< Count > j__TPar
static int DivRem(int a, int b, [Out] int result)
Definition Math.cs:44
static bool IPv6AddressToString(ushort[] address, uint scopeId, Span< char > destination, [Out] int charsWritten)
static unsafe bool Ipv6StringToAddress(ReadOnlySpan< char > ipSpan, ushort *numbers, int numbersLength, [Out] uint scope)
static void AppendSections(ushort[] address, int fromInclusive, int toExclusive, StringBuilder buffer)
static void AppendHex(ushort value, StringBuilder buffer)
static unsafe int IPv4AddressToStringHelper(uint address, char *addressString)
static bool Ipv4StringToAddress(ReadOnlySpan< char > ipSpan, [Out] long address)
static unsafe void FormatIPv4AddressNumber(int number, char *addressString, int offset)
static ushort Reverse(ushort number)
static string IPv4AddressToString(uint address)
static IPAddress Parse(ReadOnlySpan< char > ipSpan, bool tryParse)
static StringBuilder IPv6AddressToStringHelper(ushort[] address, uint scopeId)
static uint ExtractIPv4Address(ushort[] address)
static void IPv4AddressToString(uint address, StringBuilder destination)
static bool IPv4AddressToString(uint address, Span< char > formatted, [Out] int charsWritten)
static string IPv6AddressToString(ushort[] address, uint scopeId)
static string GetStringAndRelease(StringBuilder sb)
static void Release(StringBuilder sb)
static StringBuilder Acquire(int capacity=16)
StringBuilder Append(char value, int repeatCount)
static void ThrowArgumentOutOfRangeException()