此函数的含义

问题描述 投票:0回答:1

我知道C,但是我不熟悉cpp和逆向工程。我开始阅读一些病毒。在其中一个中,我遇到了这种结构。

void __thiscall CBigInt(CBigInt *this)

{
  int local_8;

  *(undefined4 *)this = 1;
  local_8 = 0;
  while (local_8 < 0x23) {
    *(undefined4 *)(this + local_8 * 4 + 4) = 0;
    local_8 = local_8 + 1;
  }
  return;
}

我可以导出所有未定义的类型,它们是typedef unsigned char undefined;

typedef unsigned char    byte;
typedef unsigned char    dwfenc;
typedef unsigned int    dword;
typedef long long    longlong;
typedef unsigned char    uchar;
typedef unsigned int    uint;
typedef unsigned long    ulong;
typedef unsigned long long    ulonglong;
typedef unsigned char    undefined1;
typedef unsigned short    undefined2;
typedef unsigned int    undefined3;
typedef unsigned int    undefined4;
typedef unsigned long long    undefined5;
typedef unsigned long long    undefined6;
typedef unsigned long long    undefined7;
typedef unsigned long long    undefined8;
typedef unsigned short    ushort;
typedef unsigned short    word;
typedef struct __class_type_info __class_type_info, *P__class_type_info;

现在我只想创建一个如下所示的变量:


int main()
{
    CBigInt local_3fc [144];
    return 0;
}

然而,即使没有错误,我也没有错误声明该函数。您能解释一下吗?

c++ reverse-engineering
1个回答
0
投票

这是指向当前对象的指针,在这种情况下,这是您创建的CBigInt对象的指针,您的代码给了您错误,因为在c ++数组中只是指针,因此创建一个必须编写的144个CBigInts数组

int main()
{
    CBigInt* local_3fc [144];
    return 0;
}
© www.soinside.com 2019 - 2024. All rights reserved.