我的首个IDC, 呵呵,是在搞GameGuard用解释字符串用的.
#include
static main()
{
auto ea;
auto i;
auto uEcx;
auto uDx;
auto cLowLen;
auto cDl,cBl;
auto str;
str="";
ea=ScreenEA();
uEcx=Byte(ea)+Byte(ea)*2;
cLowLen=(0xff & (0xff & uEcx+0x65)) ^ Byte(ea+1);
//
Message("cLowLen: %8xrn",cLowLen);
// PatchByte(ea+1,cLowLen);
uEcx=uEcx+uEcx*2+3;
cDl=0xff &uEcx;
Message("cDl: %8xrn",cDl);
cBl=Byte(ea+2);
Message("cBl: %8xrn",cBl);
cDl=(cDl+0x65)&0xff;
Message("cDl: %8xrn",cDl);
cBl=(cBl^cDl)& 0xff;
Message("cBl: %8xrn",cBl);
uEcx=uEcx+1;
uDx=cBl|(cLowLen & 0xff) << 8;
Message("uDx %8xrn",uDx);
for( i=0; i< uDx; i++ ) {
uEcx=uEcx+uEcx*2;
cDl=0xff& uEcx;
cDl=cDl+0x65;
cBl=Byte(ea+i+3);
cBl=(cBl^cDl)&0xff;
Message("cBl: %crn",cBl);
uEcx=uEcx+1;
str=str+cBl;
}
Message("str %srn",str);
}
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/183469/viewspace-910214/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/183469/viewspace-910214/