129 {
130 int num = 10;
131 long* ptr = stackalloc long[4];
133 bool flag = false;
134 int num3 = 0;
137 {
140 num = 10;
141 if (c == '0')
142 {
143 num = 8;
145 flag = true;
146 if (i < end)
147 {
149 if (c == 'x' || c == 'X')
150 {
151 num = 16;
153 flag = false;
154 }
155 }
156 }
158 {
160 int num4;
161 if ((num == 10 || num == 16) && '0' <= c && c <= '9')
162 {
163 num4 = c - 48;
164 }
165 else if (num == 8 && '0' <= c && c <= '7')
166 {
167 num4 = c - 48;
168 }
169 else if (num == 16 && 'a' <= c && c <= 'f')
170 {
171 num4 = c + 10 - 97;
172 }
173 else
174 {
175 if (num != 16 || 'A' > c || c > 'F')
176 {
177 break;
178 }
179 num4 = c + 10 - 65;
180 }
181 num2 = num2 * num + num4;
182 if (num2 > uint.MaxValue)
183 {
185 }
186 flag = true;
187 }
188 if (i >= end || name[i] != '.')
189 {
190 break;
191 }
192 if (num3 >= 3 || !flag || num2 > 255)
193 {
195 }
196 ptr[num3] = num2;
197 num3++;
198 flag = false;
199 }
200 if (!flag)
201 {
203 }
204 if (i < end)
205 {
206 char c;
207 if ((c = name[i]) != '/' && c != '\\' && (!notImplicitFile || (c != ':' && c != '?' && c != '#')))
208 {
210 }
212 }
213 ptr[num3] = num2;
214 switch (num3)
215 {
216 case 0:
217 if (*ptr > uint.MaxValue)
218 {
220 }
221 return *ptr;
222 case 1:
223 if (ptr[1] > 16777215)
224 {
226 }
227 return (*ptr << 24) | (ptr[1] & 0xFFFFFF);
228 case 2:
229 if (ptr[2] > 65535)
230 {
232 }
233 return (*ptr << 24) | ((ptr[1] & 0xFF) << 16) | (ptr[2] & 0xFFFF);
234 case 3:
235 if (ptr[3] > 255)
236 {
238 }
239 return (*ptr << 24) | ((ptr[1] & 0xFF) << 16) | ((ptr[2] & 0xFF) << 8) | (ptr[3] & 0xFF);
240 default:
242 }
243 }