2

TL;博士;

我需要在 ac# 可执行文件中注入一些 NOOP 来证明这一点。我没有来源。

我最近想知道是否存在 PS3 模拟器。有几个网站声称存在一个,但基本上它们都是诈骗软件,并将您重定向到添加页面,告诉您需要填写特别优惠才能下载东西。

下面是使用 Visual Studio 2010 中的 ILDisassem 反汇编的一段代码。基本上,如果您点击“是”,它会打开一个 Web 浏览器,指向下面的垃圾邮件链接。如果你碰到其他任何东西,应用程序就会关闭。

.method private instance void  Form1_Load(object sender,
                                          class [mscorlib]System.EventArgs e) cil managed noinlining nooptimization
{
  // Code size       91 (0x5b)
  .maxstack  3
  .locals init (valuetype [Microsoft.VisualBasic]Microsoft.VisualBasic.MsgBoxResult V_0)
  IL_0000:  ldc.i4     0x3e8
  IL_0005:  call       void [mscorlib]System.Threading.Thread::Sleep(int32)
  IL_000a:  ldstr      "New Version of PS3 Emulator is Available , Would Y"
  + "ou Like to Download it Now \? "
  IL_000f:  ldc.i4.s   68
  IL_0011:  ldstr      "Version 1.9.6 Available"
  IL_0016:  call       valuetype [Microsoft.VisualBasic]Microsoft.VisualBasic.MsgBoxResult [Microsoft.VisualBasic]Microsoft.VisualBasic.Interaction::MsgBox(object,
                                                                                                                                                            valuetype [Microsoft.VisualBasic]Microsoft.VisualBasic.MsgBoxStyle,
                                                                                                                                                            object)
  IL_001b:  ldc.i4.2
  IL_001c:  sub
  IL_001d:  switch     ( 
                        IL_0055,
                        IL_005a,
                        IL_005a,
                        IL_005a,
                        IL_003c,
                        IL_004e)
  IL_003a:  br.s       IL_005a
  IL_003c:  ldstr      "http://www.fileice.net/download.php\?file=3xi3w"
  IL_0041:  call       class [System]System.Diagnostics.Process [System]System.Diagnostics.Process::Start(string)
  IL_0046:  pop
  IL_0047:  call       void [Microsoft.VisualBasic]Microsoft.VisualBasic.CompilerServices.ProjectData::EndApp()
  IL_004c:  br.s       IL_005a
  IL_004e:  call       void [Microsoft.VisualBasic]Microsoft.VisualBasic.CompilerServices.ProjectData::EndApp()
  IL_0053:  br.s       IL_005a
  IL_0055:  call       void [Microsoft.VisualBasic]Microsoft.VisualBasic.CompilerServices.ProjectData::EndApp()
  IL_005a:  ret
} // end of method Form1::Form1_Load

我的问题是,如何EndApp()用 Noops 替换这些行?

4

2 回答 2

1

IL 不像机器代码,你必须用 nops 覆盖指令。它基本上是需要重新编译和构建的源代码。因此,基本上您不必执行任何操作,只需删除 EndApp() 行并重建即可。

于 2013-06-24T04:02:25.480 回答
1

这可以通过Reflector / JustDecompile + Reflexil轻松完成。它将为您处理整个反编译和重新编译。

您还可以使用ildasmilasm反编译代码,使用您喜欢的编辑器对其进行更改,然后再次重新编译。如果 il 代码被混淆,而 ildasm 可能拒绝使用它(SupressIldasmAttribute),或者可能生成不可编译的代码(奇怪的变量/方法名称等),这可能会导致一些问题

于 2013-06-24T04:05:58.500 回答