【发布时间】:2010-12-25 07:12:40
【问题描述】:
我想知道“this”关键字在 IDA pro 伪 c++ 代码中的确切含义。
假设我有一个函数调用:
v2 = sub_100010B3((int)&v12, "QtGui4.dll");
调用这个函数:
int __thiscall sub_100010B3(int this, const char *Str1)
{
int result; // eax@2
int v3; // eax@4
int v4; // [sp+0h] [bp-8h]@1
int v5; // [sp+4h] [bp-4h]@1
v4 = this;
v5 = sub_10001090(this, 1);
if ( v5 )
{
while ( *(_DWORD *)(v5 + 16) )
{
v3 = sub_10001470(v4, *(_DWORD *)(v5 + 12));
if ( !stricmp(Str1, (const char *)v3) )
return v5;
v5 += 20;
}
result = 0;
}
else
{
result = 0;
}
return result;
}
好的,所以在函数中我们可以看到定义'int this',根据文档,它是一个指向用于调用对象的对象的指针。我想知道的是如何重写函数,使它们运行相同但不需要传递“this”参数?
【问题讨论】:
标签: c++ visual-studio-2008 decompiling ida