首页
社区
课程
招聘
[旧帖] [讨论]XX游戏数据结构 多级指针 已解决 0.00雪花
发表于: 2009-9-27 12:11 3939

[旧帖] [讨论]XX游戏数据结构 多级指针 已解决 0.00雪花

2009-9-27 12:11
3939
//------------------------------------------------------------------------------包裹结构
type
  PPackageName=^TPackageName;
  TPackageName=record
  Name:array[0..15]of AnsiString;
end;

type
  PPackageInfo1=^TPackageInfo1;
  TPackageInfo1=record
  Hold:array [1..$14]of Byte;          //$14     //保留    +78+14+0
  Info:PPackageName;
end;

type
  PPackageInfo2=^TPackageInfo2;
  TPackageInfo2=record
  Hold:array [1..$8]of Byte;           //$8     //保留      +84+8+0
  Info:PPackageName;
end;

type     //每一格的信息
  PPackageStruct=^TPackageStruct;
  TPackageStruct=record
  Hold:array [1..$1C]of Byte;          //$1C     //保留    //这里有点诡异  不知为啥 会少4字节 所以下面还是 $1C
  Pos:DWORD;                           //+$1c    在包裹中的位置
  Num:DWORD;                           //+$20    数量
  Hold1:array [1..$C]of Byte;          //+$2c    //保留
  id:DWORD;                            //+$30    ID
  Hold2:array [1..$28]of Byte;         //+$58    //保留
  RwGoods:DWORD;                       //+$5C    为1 任务物品
  Hold3:array [1..$18]of Byte;         //+$74    //保留
  Point1:PPackageInfo1;                //+$78    PName
  Hold4:array [1..$8]of Byte;          //+$80    //保留
  Point2:PPackageInfo2;                //+$84    PName
end;

type     //包裹数组
  PStruct=^TStruct;
  TStruct=record
  Index:array [0..32]of PPackageStruct;
end;

type
  PPackage=^TPackage;
  TPackage=record
  Hold:array [1..$144]of Byte;         //$144      //保留
  Struct:PStruct;
end;
//------------------------------------------------------------------------------包裹结构

// 添加个按钮
var
  Base:Pointer;                        //基址(准确说是结构指针)
  Pint:Pointer;                        //用于判断
  Package:PPackage;                    //指向结构首地址
  id,Index:DWORD;                      //物品ID 跟包裹索引
  Name:string;                         //名称
begin
  MessageBox(0,'','',0);                                                         //方便在OD中找到位置
  Index:=StrToInt(FrmMain.Edit2.Text);
  Base:= Pointer($01456364);                                                     //基址
  Package:=Pointer(Base^);                                                       //获取结构地址
  id:=Package.Struct.Index[Index].id;                                            //索引中包裹的ID
  Pint:=@Package.Struct.Index[Index].Point1;
  if dword(Pint^)=1 then                                                         //取该地址的标志
    Name:=PChar(@Package.Struct.Index[Index].Point2.Info.Name)                   //如果为1  用第二种结构获取名称
  else
    Name:=PChar(@Package.Struct.Index[Index].Point1.Info.Name);
  ShowMessage(IntToStr(dword(Pint^)));
  ShowMessage(Name);
end;

//[[[[01456364]+144]+i*4]+30]==id      //物品ID
{
if  [[[[01456364]+144]+i*4]+78]= 1 then
  [[[[01456364]+144]+i*4]+84]+8]==name
else
  [[[[01456364]+144]+i*4]+78]+14]==name;
}

求解  结构中第一个如果是数组,为啥缺少4字节?

[课程]FART 脱壳王!加量不加价!FART作者讲授!

收藏
免费 0
支持
分享
最新回复 (6)
雪    币: 33
活跃值: (11)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
2
XX = ???
2009-9-27 14:53
0
雪    币: 201
活跃值: (10)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
3
xx = ZX2?
2009-9-27 15:19
0
雪    币: 284
活跃值: (16)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
4
完全不懂,膜拜兔子。
2009-9-27 18:09
0
雪    币: 272
活跃值: (10)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
5
004520F6  |.  6A 00         push    0                                ; /Style = MB_OK|MB_APPLMODAL
004520F8  |.  68 94214500   push    00452194                         ; |Title = ""
004520FD  |.  68 94214500   push    00452194                         ; |Text = ""
00452102  |.  6A 00         push    0                                ; |hOwner = NULL
00452104  |.  E8 AF44FBFF   call    <jmp.&user32.MessageBoxA>        ; \MessageBoxA
00452109  |.  B8 64634501   mov     eax, 1456364
0045210E  |.  8B18          mov     ebx, dword ptr [eax]
00452110  |.  8B83 44010000 mov     eax, dword ptr [ebx+144]
00452116  |.  8B3CB0        mov     edi, dword ptr [eax+esi*4]
00452119  |.  8D47 78       lea     eax, dword ptr [edi+78]
0045211C  |.  8945 FC       mov     dword ptr [ebp-4], eax
0045211F  |.  8B45 FC       mov     eax, dword ptr [ebp-4]
00452122  |.  8338 01       cmp     dword ptr [eax], 1
00452125  |.  75 13         jnz     short 0045213A
00452127  |.  8D45 F8       lea     eax, dword ptr [ebp-8]
0045212A  |.  8B97 84000000 mov     edx, dword ptr [edi+84]
00452130  |.  8B52 08       mov     edx, dword ptr [edx+8]
00452133  |.  E8 0C1FFBFF   call    00404044
00452138  |.  EB 0E         jmp     short 00452148
0045213A  |>  8D45 F8       lea     eax, dword ptr [ebp-8]
0045213D  |.  8B57 78       mov     edx, dword ptr [edi+78]
00452140  |.  8B52 14       mov     edx, dword ptr [edx+14]
00452143  |.  E8 FC1EFBFF   call    00404044
00452148  |>  8B45 FC       mov     eax, dword ptr [ebp-4]
0045214B  |.  8B00          mov     eax, dword ptr [eax]

郁闷没人理   
以上是新建个工程添加的代码  
麻烦有兴趣的 大牛解答下
2009-9-27 20:16
0
雪    币: 117
活跃值: (20)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
jdt
6
xx=khan???
2009-9-28 08:43
0
雪    币: 67
活跃值: (66)
能力值: ( LV7,RANK:100 )
在线值:
发帖
回帖
粉丝
7
可能是对象数组, 差的那4字节是保存虚函数表的.
2009-9-28 21:59
0
游客
登录 | 注册 方可回帖
返回
//