IDA pro“这个”关键词
我想知道 IDA pro 伪 C++ 代码中“this”关键字的确切含义是什么。
假设我有一个函数调用:
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”参数?
I am wondering what the exact meaning of the 'this' keyword is in the IDA pro pseudo c++ code.
Lets say that I have a function call:
v2 = sub_100010B3((int)&v12, "QtGui4.dll");
Which call this function:
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;
}
Ok, so in the function we can see the definition 'int this' which according to the docs is a pointer to the object which is used to invoke the object. What I am wondering is how I can rewrite the function so that they will operate the same but do not need to pass the 'this' parameter?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
thiscall 意味着它是一个类成员函数,因此您需要将其重写为
The thiscall means it is a Class member function so you would want to rewrite it as