开发者

IDA pro 'this' keyword

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 in开发者_StackOverflow社区voke 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?


The thiscall means it is a Class member function so you would want to rewrite it as

class MyClass {
   int sub_100010B3(const char* Str1);
};

MyClass::sub_100010B3(const char* Str1)
{
  // .. implementation
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜