无法为mov eax生成操作码A1,[STATIC_ADDRESS]

时间:2014-10-26 07:00:51

标签: visual-c++ inline-assembly mov

这是我想用内联汇编程序重新创建的操作码:

004863AF - A1 2C66C700           - mov eax,[00C7662C]

到目前为止,我已尝试过以下方法:

void __declspec(naked) SelectTarget(int MobID)
{
    __asm
    {
        mov eax, dword ptr [0x00C7662C]
        mov eax, [0x00C7662C]
        mov eax, 0x00C7662C
        mov eax, 00C7662Ch
        //...
    }
}

这就是结果:

    XyPW.SelectTarget - B8 2C66C700           - mov eax,00C7662C
    XyPW.SelectTarget+5- B8 2C66C700           - mov eax,00C7662C
    XyPW.SelectTarget+A- B8 2C66C700           - mov eax,00C7662C
    XyPW.SelectTarget+F- B8 2C66C700           - mov eax,00C7662C

虽然可以通过mov eax, [eax]跟随它来轻松修复,但我想:

  1. 了解为什么B8 mov正在生成
  2. 了解如何正确生成A1 mov

0 个答案:

没有答案