我有以下由 Ghidra 反汇编的代码。它首先初始化特定类型(local_68)的局部变量,然后将其传递给构造函数。该变量似乎被初始化为特定的对象类型,即Game. 但是构造函数期望(根据反编译器)指向该对象的指针,即Game * this.
那么,在这种情况下是否有一种标准的方法来调用构造函数?在这种情况下应该有什么,对象还是指向它的指针?
我目前正在尝试查看什么会使程序运行,因为它目前正在失败。这可能是因为我设置构造函数的方式不对。
这是调用函数:
int main(int param_1,char **param_2,char **param_3)
{
int iVar1;
Game local_68 [96];
gladius::Game::Game(local_68);
iVar1 = gladius::Game::main(local_68,param_1,param_2,param_3);
gladius::Game::~Game(local_68);
return iVar1;
}
这是我感兴趣的构造函数:
Game * __thiscall gladius::Game::Game(Game *this)
{
*(undefined8 *)this = 0;
*(undefined8 *)(this + 8) = 0;
*(undefined8 *)(this + 0x10) = 0;
*(undefined8 *)(this + 0x18) = 0;
*(undefined8 *)(this + 0x20) = 0;
*(undefined8 *)(this + 0x28) = 0;
*(undefined8 *)(this + 0x30) = 0;
*(undefined8 *)(this + 0x38) = 0;
*(undefined8 *)(this + 0x40) = 0;
*(undefined8 *)(this + 0x48) = 0;
*(undefined8 *)(this + 0x50) = 0;
return this;
}