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
RequestStream.cs
Go to the documentation of this file.
1using System;
2using System.IO;
5
6namespace System.Net
7{
8 // Token: 0x0200026C RID: 620
9 internal class RequestStream : Stream
10 {
11 // Token: 0x060010A0 RID: 4256 RVA: 0x0003499C File Offset: 0x00032B9C
12 internal RequestStream(Stream stream, byte[] buffer, int offset, int length)
13 {
14 }
15
16 // Token: 0x060010A1 RID: 4257 RVA: 0x000349AC File Offset: 0x00032BAC
17 internal RequestStream(Stream stream, byte[] buffer, int offset, int length, long contentlength)
18 {
19 if (!true)
20 {
21 }
22 base..ctor();
28 }
29
30 // Token: 0x170003B9 RID: 953
31 // (get) Token: 0x060010A2 RID: 4258 RVA: 0x000349E8 File Offset: 0x00032BE8
32 public override bool CanRead
33 {
34 get
35 {
36 return true;
37 }
38 }
39
40 // Token: 0x170003BA RID: 954
41 // (get) Token: 0x060010A3 RID: 4259 RVA: 0x000349F8 File Offset: 0x00032BF8
42 public override bool CanSeek
43 {
44 get
45 {
46 }
47 }
48
49 // Token: 0x170003BB RID: 955
50 // (get) Token: 0x060010A4 RID: 4260 RVA: 0x00034A08 File Offset: 0x00032C08
51 public override bool CanWrite
52 {
53 get
54 {
55 }
56 }
57
58 // Token: 0x170003BC RID: 956
59 // (get) Token: 0x060010A5 RID: 4261 RVA: 0x00002050 File Offset: 0x00000250
60 public override long Length
61 {
62 get
63 {
64 throw new global::Cpp2IlInjected.AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
65 }
66 }
67
68 // Token: 0x170003BD RID: 957
69 // (get) Token: 0x060010A6 RID: 4262 RVA: 0x00002050 File Offset: 0x00000250
70 // (set) Token: 0x060010A7 RID: 4263 RVA: 0x00002050 File Offset: 0x00000250
71 public override long Position
72 {
73 get
74 {
75 throw new global::Cpp2IlInjected.AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
76 }
77 set
78 {
79 throw new global::Cpp2IlInjected.AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
80 }
81 }
82
83 // Token: 0x060010A8 RID: 4264 RVA: 0x00034A18 File Offset: 0x00032C18
84 public override void Close()
85 {
86 this.disposed = true;
87 }
88
89 // Token: 0x060010A9 RID: 4265 RVA: 0x00034A2C File Offset: 0x00032C2C
90 public override void Flush()
91 {
92 }
93
94 // Token: 0x060010AA RID: 4266 RVA: 0x00034A3C File Offset: 0x00032C3C
95 private int FillFromBuffer(byte[] buffer, int off, int count)
96 {
97 if (buffer != null)
98 {
99 long num = this.remaining_body;
100 if (num != 0L)
101 {
102 int num2 = this.length;
103 if (num2 != 0)
104 {
105 if (num == 0L)
106 {
107 }
108 int num3 = Math.Min(num2, count);
109 long num4 = this.remaining_body;
110 if (num == 0L)
111 {
112 }
113 byte[] array = this.buffer;
114 int num5 = this.offset;
115 long num7;
116 int num6 = Math.Min((int)num7, (int)num4);
117 if (num6 != 0)
118 {
119 byte[] array2 = this.buffer;
120 int num8 = this.offset;
122 int num9 = this.offset;
123 long num10 = this.remaining_body;
124 long num11 = this.remaining_body;
128 }
129 }
130 }
131 }
132 return "offset";
133 }
134
135 // Token: 0x060010AB RID: 4267 RVA: 0x00034AFC File Offset: 0x00032CFC
136 public override int Read([In] [Out] byte[] buffer, int offset, int count)
137 {
138 /*
139An exception occurred when decompiling this method (060010AB)
140
141ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Int32 System.Net.RequestStream::Read(System.Byte[],System.Int32,System.Int32)
142
143 ---> System.Exception: Basic block has to end with unconditional control flow.
144{
145 Block_0:
146 stloc:int32(var_0_11, call:int32(RequestStream::FillFromBuffer, ldloc:RequestStream(this), ldloc:uint8[](buffer), ldloc:int32(offset), ldloc:int32(count)))
147 stloc:Stream(var_1_18, ldfld:Stream(RequestStream::stream, ldloc:RequestStream(this)))
148 stloc:int64(var_2_1F, ldfld:int64(RequestStream::remaining_body, ldloc:RequestStream(this)))
149 stfld:int64(RequestStream::remaining_body, ldloc:RequestStream(this), ldloc:int64(var_2_1F))
150}
151
152 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
153 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
154 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
155 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
156 --- End of inner exception stack trace ---
157 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
158 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
159*/;
160 }
161
162 // Token: 0x060010AC RID: 4268 RVA: 0x00034B34 File Offset: 0x00032D34
163 public override IAsyncResult BeginRead(byte[] buffer, int offset, int count, AsyncCallback cback, object state)
164 {
165 /*
166An exception occurred when decompiling this method (060010AC)
167
168ICSharpCode.Decompiler.DecompilerException: Error decompiling System.IAsyncResult System.Net.RequestStream::BeginRead(System.Byte[],System.Int32,System.Int32,System.AsyncCallback,System.Object)
169
170 ---> System.Exception: Basic block has to end with unconditional control flow.
171{
172 IL_001E:
173 stloc:Stream(var_4_24, ldfld:Stream(RequestStream::stream, ldloc:RequestStream(this)))
174 stloc:int32(var_5_2D, call:int32(Math::Max, ldc.i4:int32(0), ldloc:int64[exp:int32](var_2_1A)))
175}
176
177 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
178 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
179 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
180 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
181 --- End of inner exception stack trace ---
182 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
183 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
184*/;
185 }
186
187 // Token: 0x060010AD RID: 4269 RVA: 0x00034B70 File Offset: 0x00032D70
188 public override int EndRead(IAsyncResult ares)
189 {
190 if (!this.disposed && ares != null)
191 {
192 Stream stream = this.stream;
193 long num = this.remaining_body;
195 }
196 throw new InvalidCastException();
197 }
198
199 // Token: 0x060010AE RID: 4270 RVA: 0x00002050 File Offset: 0x00000250
200 public override long Seek(long offset, SeekOrigin origin)
201 {
202 throw new global::Cpp2IlInjected.AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
203 }
204
205 // Token: 0x060010AF RID: 4271 RVA: 0x00002050 File Offset: 0x00000250
206 public override void SetLength(long value)
207 {
208 throw new global::Cpp2IlInjected.AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
209 }
210
211 // Token: 0x060010B0 RID: 4272 RVA: 0x00002050 File Offset: 0x00000250
212 public override void Write(byte[] buffer, int offset, int count)
213 {
214 throw new global::Cpp2IlInjected.AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
215 }
216
217 // Token: 0x060010B1 RID: 4273 RVA: 0x00002050 File Offset: 0x00000250
218 public override IAsyncResult BeginWrite(byte[] buffer, int offset, int count, AsyncCallback cback, object state)
219 {
220 throw new global::Cpp2IlInjected.AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
221 }
222
223 // Token: 0x060010B2 RID: 4274 RVA: 0x00002050 File Offset: 0x00000250
224 public override void EndWrite(IAsyncResult async_result)
225 {
226 throw new global::Cpp2IlInjected.AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
227 }
228
229 // Token: 0x04000D20 RID: 3360
230 private byte[] buffer;
231
232 // Token: 0x04000D21 RID: 3361
233 private int offset;
234
235 // Token: 0x04000D22 RID: 3362
236 private int length;
237
238 // Token: 0x04000D23 RID: 3363
239 private long remaining_body;
240
241 // Token: 0x04000D24 RID: 3364
242 private bool disposed;
243
244 // Token: 0x04000D25 RID: 3365
245 private Stream stream;
246 }
247}
class f__AnonymousType0<< Count > j__TPar
static readonly long
static void BlockCopy(Array src, int srcOffset, Array dst, int dstOffset, int count)
Definition Buffer.cs:60
static byte Min(byte val1, byte val2)
Definition Math.cs:152
override long Seek(long offset, SeekOrigin origin)
override int EndRead(IAsyncResult ares)
RequestStream(Stream stream, byte[] buffer, int offset, int length, long contentlength)
override void EndWrite(IAsyncResult async_result)
override int Read([In][Out] byte[] buffer, int offset, int count)
RequestStream(Stream stream, byte[] buffer, int offset, int length)
override void Write(byte[] buffer, int offset, int count)
int FillFromBuffer(byte[] buffer, int off, int count)
override IAsyncResult BeginRead(byte[] buffer, int offset, int count, AsyncCallback cback, object state)
override IAsyncResult BeginWrite(byte[] buffer, int offset, int count, AsyncCallback cback, object state)
override void SetLength(long value)