zoukankan      html  css  js  c++  java
  • 大富翁8 修改器

    这里使用之前分析出来的数据结构写一个简易的修改器。在写之前需要确认如下事情

    一、如何取得对象在内存中位置

    由于之前分析出来的两个变量gRichCardsTable、gRichDataInfo是全局的变量,它们的偏移在每个发布版本中是确定的

    我使用的版本偏移值:

    gRichDataInfo              0x231dac

    gRichCardsTable         0x231dbc

    二、如何修改Rich8的内存数据

    可以使用Windows的两个函数ReadProcessMemory、WriteProcessMemory来实现从Rich8进程中读取数据和写入数据。

    实现思路比较简单,就是

    通过ReadProcessMemory读取数据->界面显示

    取界面数据->通过WriteProcessMemory写入修改后的数据

    结构定义

    #pragma pack(1)

    struct RichUserCardItem
    {
        ULONG CardValue;      //卡片值
        ULONG Reserved1;
        ULONG Reserved2;
    };

    struct RichUserInfo
    {
        BYTE Reserved1[656];
        ULONG CashValue;      //现金
        ULONG SavingsValue;      //存储
        BYTE Reserved2[28];
        RichUserCardItem ArrayOfUserCard[8];//8个卡片
        ULONG Reserved3;
        ULONG Reserved4;
        ULONG Reserved5;
        ULONG CountOfUserCard;  //持有卡片的数量
        ULONG CouponValue;    //点券
    };

    struct RichDataInfo
    {
        RichUserInfo* UsersInfo;  //玩家数组指针
        ULONG Reserved1;
        ULONG Reserved2;
        ULONG UserTotalCount;    //玩家的数量
        BYTE Reserved3[28];
        ULONG IndexOfUserSelected; //当前玩家索引
    };

    struct RichCardInfo
    {
        ULONG* CardsTable;  //卡片表的指针
        ULONG Reserved1;
        ULONG Reserved2;
        ULONG CardTotalCount;  //卡片的个数
    };

    #pragma pack()

    下面是实现后的效果,试过是可以的。

    image

    挺简陋的,不过基本需要的功能都有了。

    卡片我没有把对应的名称显示出来,这里就用该工具修改后,把所有卡片对应的名称列出来吧。

    image

    我的Rich8文件richman8.dat的MD5值是13a19e617b0ebeb16b7214f4ce63be64。如果是其他的发布版本,可能对应的偏移不同

    下载文件Download

    文件的Hash值:

      MD5    db7259dae55187c29599ec0e85a8ef15

          SHA1  3a04160b9c25de7731abba6be25903d718709a4c

    申明:所有只是为了研究学习,如果因为修改而导致的问题自己负责

    添加修改器的代码下载,有兴趣的朋友可以下载Code

  • 相关阅读:
    【HDOJ】2267 How Many People Can Survive
    【HDOJ】2268 How To Use The Car
    【HDOJ】2266 How Many Equations Can You Find
    【POJ】2278 DNA Sequence
    【ZOJ】3430 Detect the Virus
    【HDOJ】2896 病毒侵袭
    求奇数的乘积
    平方和与立方和
    求数列的和
    水仙花数
  • 原文地址:https://www.cnblogs.com/Quincy/p/1936775.html
Copyright © 2011-2022 走看看