C#中闭包陷阱怎么还原。
using System.Media;using System.Net;
using System.Net.Security;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading;
using System.Timers;
using System.Web.Script.Serialization;
using System.Windows.Forms;
using Microsoft.Win32;
// Token: 0x02000059 RID: 89
internal partial class FormMain : Form
{
// Token: 0x06000312 RID: 786 RVA: 0x00040028 File Offset: 0x0003E228
private void method_113()
{
int num = 0;
int num2 = 0;
bool flag = false;
for (;;)
{
Thread.Sleep((num2 <= 0) ? (360000 * (Class11.class13_0.bool_0 ? 10 : 1)) : 60000);
try
{
FormMain.<>c__DisplayClass237_0 CS$<>8__locals1 = new FormMain.<>c__DisplayClass237_0();
CS$<>8__locals1.formMain_0 = this;
string value = Class11.class13_0.string_0;
DateTime dateTime;
bool flag3;
bool flag4;
bool flag2 = Class11.smethod_70().Method_O0I1L8O0(Class11.class13_0.string_0, out value, Class11.class13_0.string_1, Class11.class13_0.dateTime_0, out dateTime, out flag3, Class8.smethod_0(), out CS$<>8__locals1.string_0, out flag4);
if (!Class11.class13_0.string_0.Equals(value))
{
flag2 = false;
CS$<>8__locals1.string_0 = "非法授权!";
}
if (flag4)
{
num = 0;
Class11.class13_0.dateTime_0 = dateTime;
Class11.class13_0.bool_0 = flag3 || dateTime < DateTime.Now;
if (flag3)
{
Class11.class13_0.int_0 = 0;
}
}
if (!flag2)
{
Class11.class13_0.bool_2 = false;
Class11.class13_0.string_2 = CS$<>8__locals1.string_0;
base.Invoke(new Action(CS$<>8__locals1.method_0));
}
num2 = 0;
goto IL_217;
}
catch (Exception)
{
if (!Class11.smethod_9())
{
num++;
}
else if (Class11.Class14.smethod_0())
{
num++;
}
else if (num2 % 10 == 0)
{
if (Class11.Class14.smethod_1())
{
num = 0;
}
else
{
num++;
}
}
num2++;
goto IL_217;
}
finally
{
if (!Class11.class13_0.bool_0)
{
DateTime now = DateTime.Now;
if (num > 0)
{
Class11.smethod_5(out now);
if (now < DateTime.Now)
{
now = DateTime.Now;
}
}
if (Class11.class13_0.dateTime_0 < now)
{
Class11.class13_0.bool_0 = true;
Class11.class13_0.int_0 = 0;
}
}
base.Invoke(new Action(this.method_265));
}
goto IL_1AF;
IL_1F1:
Class11.smethod_42();
continue;
IL_1AF:
if (num > 2)
{
flag = true;
base.Invoke(new Action(this.method_266));
goto IL_1F1;
}
IL_1CA:
if (flag && num == 0 && !Class11.class13_0.bool_2)
{
flag = false;
base.Invoke(new Action(this.method_267));
goto IL_1F1;
}
goto IL_1F1;
IL_217:
if (flag)
{
goto IL_1CA;
}
goto IL_1AF;
}
}
}
我想问的是这种闭包陷阱如何还原。这个类一直找不到<>c__DisplayClass237_0。有的说是 dnSpy使用的ILSpy无法正常反编译 要用 dotPeek 或者ILspy 。结果还是 没有解决问题
页:
[1]