OD IDA 找到延迟代码,编码实现加速

    xiaoxiao2024-12-03  4

    1.准备工具 

    OD

    OllyDbg吾爱专版:http://download.csdn.net/detail/zang141588761/9602504

         IDA Pro v6.6英文版(稳定):http://download.csdn.net/detail/zang141588761/9602508

    2.找到加速地址

    Const SleepBase=$0041d6bd //加速 90,90,6A,01,90 //原速 EB,02,33,C9,51 NewSpeed:array[1..5] of byte=($90,$90,$6a,$1,$90); OldSpeed:array[1..5] of byte=($EB,$02,$33,$C9,$51); var readByte:DWORD; //终极加速 WriteProcessMemory(hprocess,Pointer(SleepBase),@NewSpeed,5,readByte);

    3.编码

    //常量定义 Const SleepBase=$0041d6bd; //加速 90,90,6A,01,90 //原速 EB,02,33,C9,51 var NewSpeed:array[1..5] of byte=($90,$90,$6a,$1,$90); OldSpeed:array[1..5] of byte=($EB,$02,$33,$C9,$51); Function addSpeed():integer; //终极加速 var  Gameh:HWND;  GamePid:DWORD;  Gamehprocess: THandle;  WriteByte:DWORD;    //实际写入字节数 begin   //获取游戏窗口句柄   Gameh:=findwindow(nil,'对对碰角色版');   //获取进程ID   GetWindowThreadprocessID(Gameh,GamePid);   //获取进程句柄    gamehProcess:=OpenProcess(windows.PROCESS_ALL_ACCESS,false,GamePid);    //根据坐位号码 读出相应棋盘数据   Writeprocessmemory(gamehProcess,Pointer(SleepBase)  ,@NewSpeed[1],5,  WriteByte);   result:=Writebyte; end;

    转载请注明原文地址: https://ju.6miu.com/read-1294229.html
    最新回复(0)