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
Type3Message.cs
Go to the documentation of this file.
1using System;
2
4{
5 // Token: 0x02000041 RID: 65
6 public class Type3Message : MessageBase
7 {
8 // Token: 0x060001DE RID: 478 RVA: 0x000086C0 File Offset: 0x000068C0
10 {
11 if (!true)
12 {
13 }
14 base..ctor();
15 this._type = 3;
17 if (3 == 0)
18 {
19 }
20 if (!true)
21 {
22 }
23 this._level = NtlmAuthLevel.LM_and_NTLM_and_try_NTLMv2_Session;
24 byte[] nonce = type2.Nonce;
25 object obj;
26 if (obj != null)
27 {
28 if (obj != null)
29 {
31 if (obj != null)
32 {
33 goto IL_0041;
34 }
35 }
36 throw new InvalidCastException();
37 }
38 IL_0041:
39 string targetName = type2._targetName;
41 string machineName = Environment.MachineName;
42 this._host = machineName;
43 string userName = Environment.UserName;
44 this._username = userName;
45 this._flags = NtlmFlags.NegotiateNtlm | NtlmFlags.NegotiateAlwaysSign;
46 NtlmFlags flags = type2._flags;
47 if (33280 != 0)
48 {
50 return;
51 }
52 NtlmFlags flags2 = this._flags;
54 if (flags2 == (NtlmFlags)0)
55 {
56 }
57 NtlmFlags flags3 = this._flags;
59 }
60
61 // Token: 0x060001DF RID: 479 RVA: 0x0000878C File Offset: 0x0000698C
62 protected override void Finalize()
63 {
64 if (this._challenge != null)
65 {
66 }
67 if (this._lm != null)
68 {
69 }
70 if (this._nt != null)
71 {
72 }
73 base.Finalize();
74 }
75
76 // Token: 0x1700008B RID: 139
77 // (set) Token: 0x060001E0 RID: 480 RVA: 0x000087DC File Offset: 0x000069DC
78 public string Domain
79 {
80 set
81 {
82 bool flag = value == "";
83 NtlmFlags flags = this._flags;
85 this._flags = flags;
86 }
87 }
88
89 // Token: 0x1700008C RID: 140
90 // (set) Token: 0x060001E1 RID: 481 RVA: 0x0000880C File Offset: 0x00006A0C
91 public string Password
92 {
93 set
94 {
96 }
97 }
98
99 // Token: 0x1700008D RID: 141
100 // (set) Token: 0x060001E2 RID: 482 RVA: 0x00008820 File Offset: 0x00006A20
101 public string Username
102 {
103 set
104 {
106 }
107 }
108
109 // Token: 0x060001E3 RID: 483 RVA: 0x00008834 File Offset: 0x00006A34
110 protected override void Decode(byte[] message)
111 {
112 base.Decode(message);
113 }
114
115 // Token: 0x060001E4 RID: 484 RVA: 0x0000890C File Offset: 0x00006B0C
116 private string DecodeString(byte[] buffer, int offset, int len)
117 {
118 /*
119An exception occurred when decompiling this method (060001E4)
120
121ICSharpCode.Decompiler.DecompilerException: Error decompiling System.String Mono.Security.Protocol.Ntlm.Type3Message::DecodeString(System.Byte[],System.Int32,System.Int32)
122
123 ---> System.Exception: Basic block has to end with unconditional control flow.
124{
125 Block_0:
126 stloc:NtlmFlags(var_0_06, ldfld:NtlmFlags(MessageBase::_flags, ldloc:Type3Message[exp:MessageBase](this)))
127 stloc:Encoding(var_2_0E, callgetter:Encoding(Encoding::get_ASCII))
128 stloc:Encoding(var_3_14, callgetter:Encoding(Encoding::get_Unicode))
129}
130
131 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
132 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
133 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
134 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
135 --- End of inner exception stack trace ---
136 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
137 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
138*/;
139 }
140
141 // Token: 0x060001E5 RID: 485 RVA: 0x00008930 File Offset: 0x00006B30
142 private byte[] EncodeString(string text)
143 {
144 /*
145An exception occurred when decompiling this method (060001E5)
146
147ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Byte[] Mono.Security.Protocol.Ntlm.Type3Message::EncodeString(System.String)
148
149 ---> System.Exception: Basic block has to end with unconditional control flow.
150{
151 IL_0012:
152 stloc:Encoding(var_5_1C, callgetter:Encoding(Encoding::get_Unicode))
153}
154
155 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
156 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
157 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
158 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
159 --- End of inner exception stack trace ---
160 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
161 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
162*/;
163 }
164
165 // Token: 0x060001E6 RID: 486 RVA: 0x0000895C File Offset: 0x00006B5C
166 public override byte[] GetBytes()
167 {
168 string domain = this._domain;
169 byte[] array = this.EncodeString(domain);
170 string username = this._username;
171 byte[] array2 = this.EncodeString(username);
172 string host = this._host;
173 byte[] array3 = this.EncodeString(host);
174 Type2Message type = this._type2;
175 if (type != null)
176 {
177 NtlmAuthLevel level = this._level;
178 string domain2 = this._domain;
179 string username2 = this._username;
180 string password = this._password;
181 if (type == null)
182 {
183 goto IL_0081;
184 }
185 byte[] nonce = type._nonce;
186 }
187 if (this._level != NtlmAuthLevel.LM_and_NTLM)
188 {
189 throw new OutOfMemoryException();
190 }
191 string password2 = this._password;
192 byte[] challenge = this._challenge;
193 IL_0081:
194 byte[] array4 = base.PrepareMessage(42176280);
195 NtlmFlags flags = this._flags;
196 byte[] array5;
197 if (array5 != null)
198 {
199 }
200 return array4;
201 }
202
203 // Token: 0x040000EE RID: 238
205
206 // Token: 0x040000EF RID: 239
207 private byte[] _challenge;
208
209 // Token: 0x040000F0 RID: 240
210 private string _host;
211
212 // Token: 0x040000F1 RID: 241
213 private string _domain;
214
215 // Token: 0x040000F2 RID: 242
216 private string _username;
217
218 // Token: 0x040000F3 RID: 243
219 private string _password;
220
221 // Token: 0x040000F4 RID: 244
223
224 // Token: 0x040000F5 RID: 245
225 private byte[] _lm;
226
227 // Token: 0x040000F6 RID: 246
228 private byte[] _nt;
229 }
230}
class f__AnonymousType0<< Count > j__TPar
override void Decode(byte[] message)
string DecodeString(byte[] buffer, int offset, int len)
static string UserName
static string MachineName