agopoe吧 关注:35,982贴子:549,309

回复:【原创】教程贴,教大家写个不三方的C++dll辅助

取消只看楼主收藏回复

void equipmentHandle()//装备处理
{
int times = NULL;
int knapsack = *(int *)(knapsackAddress);
int beginBias = (*(int *)(knapsack + 88)) + 36;
for (int i = 0; i < 56; i++)
{
int equipmentPointer = *(int *)(beginBias + (i - 1) * 4);
if (equipmentPointer != 0)
{
int equipmentGrade = *(int *)(equipmentPointer + 352);
if (equipmentGrade == 0 || equipmentGrade == 1 || equipmentGrade == 2)
{
Send_SellCALL(i - 1 + 9);
Sleep(30);
times = times + 1;
}
}
}
if (times > 0)
{
Placard(L"装备已处理");
}
}


IP属地:江西33楼2017-05-14 01:00
回复
    void Pickup()//拾取
    {
    int Level1, Level2, begin, end, pointer, type, Horde;
    int Number = NULL;
    if (*(int *)((*(int *)peopleAddress) + 184) == 0)
    {
    return;
    }
    if (Number > 0)
    {
    return;
    }
    for (int i = 0; i < 2; i++)
    {
    Level1 = *(int *)peopleAddress;
    Level2 = *(int *)(Level1 + MapBias);
    if (Level2 == 0)
    {
    return;
    }
    begin = *(int *)(Level2 + 0xC0);
    end = *(int *)(Level2 + 0xC4);
    Number = (end - begin) / 4;
    for (int j = 0; j < Number; j++)
    {
    pointer = *(int *)(begin + 4 * j);
    type = *(int *)(pointer + TypeBias);
    Horde = *(int *)(pointer + HordeBias);
    if (pointer == Level1)
    {
    }
    if (Horde != 200)
    {
    }
    if (type == 289)
    {
    if (pointer != Level1)
    {
    Send_GroupPackageCALL(decryption(pointer + 156));
    }
    }
    }
    }
    Number = 0;
    }


    IP属地:江西34楼2017-05-14 01:00
    收起回复
      void finishTheChallenge()
      {
      Placard(L"挑战开始!");
      int targetAddress, Number, beginAddress, endAddress, Id, times;
      beginAddress = *(int *)challengeAddress;
      endAddress = *(int *)(challengeAddress + 4);
      Number = (endAddress - beginAddress) / 0xc;
      for (int i = 0; i < (Number < 18 ? Number : 18); i++) {
      targetAddress = *(int *)(beginAddress + i * 0xc);
      if (i == 0) {
      times = 15;
      }
      else if (i == 1) {
      times = 5;
      }
      else if (i == 2) {
      times = 3;
      }
      else if (i == 4) {
      times = 20;
      }
      else if (i == 8) {
      times = 15;
      }
      else {
      times = 1;
      }
      Id = *(int *)targetAddress;
      for (int k = 0; k < times; k++) {
      GroupPackageFinish(Id);
      }
      GroupPackageSubmit(Id);
      }
      for (int k = 0; k < 4; k++) {
      Send_BufferCall(700);
      Send_EncryptionCall(k, 4);
      Send_ContractAwardCall();
      Sleep(150);
      }
      Placard(L"挑战完成!");
      }


      IP属地:江西35楼2017-05-14 01:00
      回复
        void 一键称号()
        {
        Placard(L"卡称号开启中...等待完成");
        int 任务ID;
        for (int N = 0; N<(6800 - 6500); N++)
        {
        任务ID = 6501 + N - 1;
        Send_BufferCall(417);
        Send_EncryptionCall(任务ID, 4);
        Send_EncryptionCall(-1, 2);//-1为进程id
        Send_EncryptionCall(0, 2);
        Send_EncryptionCall(0, 2);
        Send_ContractAwardCall();
        Sleep(30);
        }
        for (int N = 0; N < 10; N++)
        {
        Send_BufferCall(417);
        Send_EncryptionCall(8900 + N - 1, 4);
        Send_EncryptionCall(-1, 2);//-1为进程id
        Send_EncryptionCall(0, 2);
        Send_EncryptionCall(0, 2);
        Send_ContractAwardCall();
        }
        Placard(L"卡称号已完成");
        }


        IP属地:江西36楼2017-05-14 01:01
        回复
          void FinishThePerDay()
          {
          Placard(L"每日开始!");
          GroupPackageAccept(3713);
          GroupPackageAccept(3714);
          GroupPackageAccept(3715);
          GroupPackageFinish(3713);
          GroupPackageFinish(3714);
          GroupPackageFinish(3715);
          GroupPackageFinish(3713);
          GroupPackageFinish(3714);
          GroupPackageFinish(3715);
          GroupPackageSubmit(3713);
          GroupPackageSubmit(3714);
          GroupPackageSubmit(3715);
          GroupPackageAccept(6688);
          GroupPackageAccept(6689);
          GroupPackageFinish(6688);
          GroupPackageFinish(6689);
          GroupPackageFinish(6688);
          GroupPackageFinish(6689);
          GroupPackageFinish(6688);
          GroupPackageFinish(6689);
          GroupPackageFinish(6689);
          GroupPackageFinish(6689);
          GroupPackageSubmit(6688);
          GroupPackageSubmit(6689);
          GroupPackageAccept(12831);
          FinishTheCALL(12831);
          GroupPackageSubmit(12831);
          GroupPackageAccept(4534);
          GroupPackageFinish(4534);
          GroupPackageSubmit(4534);
          GroupPackageAccept(4615);
          GroupPackageFinish(4615);
          GroupPackageSubmit(4615);
          GroupPackageAccept(4616);
          GroupPackageFinish(4616);
          GroupPackageSubmit(4616);
          GroupPackageAccept(4617);
          GroupPackageFinish(4617);
          GroupPackageSubmit(4617);
          GroupPackageAccept(4618);
          GroupPackageFinish(4618);
          GroupPackageSubmit(4618);
          GroupPackageAccept(4619);
          GroupPackageFinish(4619);
          GroupPackageSubmit(4619);
          GroupPackageAccept(4620);
          GroupPackageFinish(4620);
          GroupPackageSubmit(4620);
          GroupPackageAccept(1995);
          GroupPackageFinish(1995);
          GroupPackageSubmit(1995);
          GroupPackageAccept(1996);
          GroupPackageFinish(1996);
          GroupPackageSubmit(1996);
          GroupPackageAccept(1997);
          GroupPackageFinish(1997);
          GroupPackageSubmit(1997);
          GroupPackageAccept(1998);
          GroupPackageFinish(1998);
          GroupPackageSubmit(1998);
          GroupPackageAccept(1999);
          GroupPackageFinish(1999);
          GroupPackageSubmit(1999);
          GroupPackageAccept(2000);
          GroupPackageFinish(2000);
          GroupPackageSubmit(2000);
          GroupPackageAccept(2001);
          GroupPackageFinish(2001);
          GroupPackageSubmit(2001);
          Placard(L"每日完成!");
          }


          IP属地:江西37楼2017-05-14 01:01
          回复
            //////////////////////////////////////////////可以卡深渊任务先把别的任务放弃掉//////////////////////////////////////////////////////////
            void 完成主线()
            {
            int 地址, 目标基址, 任务数量, 首地址, 尾地址, 任务ID;
            地址 = *(int *)(任务基址);
            首地址 = *(int *)(地址 + 8);
            尾地址 = *(int *)(地址 + 12);
            任务数量 = (尾地址 - 首地址) / 4;
            for (int i = 0; i < 任务数量; i++) {
            目标基址 = *(int *)(首地址 + i * 4);
            任务ID = *(int *)(目标基址);
            FinishTheCALL(任务ID);
            }
            Placard(L"完成主线!");
            }


            IP属地:江西38楼2017-05-14 01:02
            回复
              ////////////////////////////////////////////////////////////////////////////////offlineThread//////////////////////////////////////////////////////////
              void trim()
              {
              超级加密(*(int *)((*(int *)peopleAddress) + 0x2CCC) + 0xC78, 300);//全属性强化
              //超级加密(*(int *)((*(int *)peopleAddress) + 0x2CCC) + 0x998, 2000);//移速
              //超级加密(*(int *)((*(int *)peopleAddress) + 0x2CCC) + 0x9A0, 1000);//攻速
              //超级加密(*(int *)((*(int *)peopleAddress) + 0x2CCC) + 0x9A8, 1000);//施放
              超级加密(*(int *)((*(int *)peopleAddress) + 0x2CCC) + 0x950, 1000);//回避率
              超级加密(*(int *)((*(int *)peopleAddress) + 0x2CCC) + 0x988, 15000);//回蓝
              超级加密(*(int *)((*(int *)peopleAddress) + 0x2CC8) + 0x618, 0);//武器耐久
              超级加密(*(int *)((*(int *)peopleAddress) + 0x2CCC) + 0x6A8, 888);//力量
              超级加密(*(int *)((*(int *)peopleAddress) + 0x2CCC) + 0x6B8, 888);//智力
              超级加密(*(int *)((*(int *)peopleAddress) + 0x2CCC) + 0xE78, 666);//独立
              }


              IP属地:江西39楼2017-05-14 01:02
              回复
                wchar_t* AnsiToUnicode(char *str)
                {
                DWORD dwNum = MultiByteToWideChar(CP_ACP, 0, str, -1, NULL, 0);
                wchar_t *pwText;
                pwText = new wchar_t[dwNum];
                if (!pwText)
                {
                delete[]pwText;
                }
                MultiByteToWideChar(CP_ACP, 0, str, -1, pwText, dwNum);
                return pwText;
                }
                const char* UnicodeToAnsi(LPCWSTR wstr)
                {
                if (!wstr)
                return NULL;
                int strleng = ::WideCharToMultiByte(CP_ACP, NULL, wstr, wcslen(wstr), NULL, 0, NULL, FALSE);
                char* str = new char[strleng + 1];
                ::WideCharToMultiByte(CP_ACP, NULL, wstr, wcslen(wstr), str, strleng, NULL, FALSE);
                str[strleng] = '\0';
                return str;
                }


                IP属地:江西40楼2017-05-14 01:02
                回复
                  ///////////////////////////////////////////超级技能/////////////////////////////////////
                  void SuperSkills()
                  {
                  //获取当前进程句柄
                  HANDLE hProcess = GetCurrentProcess();
                  int CodeAddr = *(int *)peopleAddress, AddrOffset;
                  int 技能等级 = 0, 属性等级 = 100;
                  byte P1[30];
                  const char* 技能名称;
                  //循环从0x3F00开始搜索到0x5000结束,每次加累加0x4
                  for (int i = 0x3F00; i <= 0x5000; i += 0x04)
                  {
                  memset(P1, 0, 30);//清空申请的缓存区
                  //人物基址加4
                  AddrOffset = *(int *)(CodeAddr + i);//0x3FA8
                  if (AddrOffset >= 0x400000 && AddrOffset <= 0x7ffeffff)
                  {
                  //人物基址加4加0x7C
                  AddrOffset = AddrOffset + 0x7C;
                  //三元运算符:是0x400000-0x7ffeffff之间的就执行AddrOffset = *(int *)AddrOffset否则就为NULL
                  AddrOffset > 0x400000 && AddrOffset < 0x7ffeffff ? AddrOffset = *(int *)AddrOffset : NULL;
                  //三元运算符:是0x400000-0x7ffeffff之间的就执行读取操作否就为NULL
                  AddrOffset > 0x400000 && AddrOffset < 0x7ffeffff ? ReadProcessMemory(hProcess, (LPCVOID)AddrOffset, P1, 30, NULL) : NULL;
                  技能名称 = UnicodeToAnsi((LPCWSTR)P1);//获取所有技能名称
                  if (strstr(技能名称, "强化 - ") || strstr(技能名称, "精通") || strstr(技能名称, "暴击") ||
                  strstr(技能名称, "背击") || strstr(技能名称, "奥义") || strstr(技能名称, "专精"))
                  {
                  //技能名称等于(技能名称.Find取前面相匹配的字符串)强化 -
                  AddrOffset = *(int *)(CodeAddr + i);
                  //解密(AddrOffset + 0xAB0)取技能等级
                  技能等级 = decryption(AddrOffset + 0xAB0);
                  //重新给技能等级赋值
                  技能等级 != 属性等级 ? 超级加密(AddrOffset + 0xBC4, 属性等级) : NULL;
                  }
                  }
                  }
                  }


                  IP属地:江西41楼2017-05-14 01:03
                  收起回复
                    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
                    int 设计图开关;
                    void 初始化设计图(){
                    if (设计图开关 == 0)
                    {
                    *(int *)(*(int *)(*(int *)(*(int *)(*(int *)(peopleAddress)+GoodsBar) + GoodsBarBias) + OneGoodsBar) + 0x488) = 0x100600;//设计图人偶偏移4a4
                    Placard(L"初始化设计图,使用物品栏1设计图");
                    设计图开关++;
                    }
                    else
                    {
                    *(int *)(*(int *)(*(int *)(*(int *)(*(int *)(peopleAddress)+GoodsBar) + GoodsBarBias) + OneGoodsBar) + 0x488) = 0x0;//设计图人偶偏移4a4怪物488
                    Placard(L"初始化设计图关");
                    设计图开关++;
                    设计图开关 = 0;
                    }
                    *(int *)(0x100600) = 110021;//设计图怪物代码110021战车64796高达
                    *(int *)(0x100604) = 85;//怪物最低等级
                    *(int *)(0x100608) = 85;//怪物最高等级
                    *(int *)(0x10060c) = 999999;//怪物存在时间
                    *(int *)(0x100410) = 1;//生效
                    }


                    IP属地:江西42楼2017-05-14 01:03
                    回复
                      ////////////////////////////////////易语言的搜索功能////////////////////////////////////////////
                      ///char *markCode 特征码
                      ///int 赋值 要改的代码
                      ///int 伤害 要改的伤害 不改伤害给0就行
                      void 字节搜索(char *markCode, int 赋值, int 伤害)
                      {
                      int len = strlen(markCode) / 2;
                      BYTE *字节数组 = new BYTE[len];
                      for (int i = 0; i < len; i++) {
                      char c[] = { markCode[i * 2], markCode[i * 2 + 1], '\0' };
                      字节数组[i] = (BYTE)::strtol(c, NULL, 16);
                      }
                      int 正确地址个数 = 0;
                      int 正确的地址[100] = { 0 };
                      SYSTEM_INFO sysInfo;
                      GetSystemInfo(&sysInfo);
                      int 起始地址 = 0x400000;
                      int 结束地址 = 0x7ffeffff;
                      MEMORY_BASIC_INFORMATION mbInfo = { 0 };
                      const SIZE_T BaseInfoLen = sizeof(MEMORY_BASIC_INFORMATION);
                      BYTE *lpBuf = new BYTE[1];
                      DWORD dwBufSize = 1;
                      for (int i = 起始地址; i < 结束地址;) {
                      VirtualQuery((LPVOID)i, &mbInfo, BaseInfoLen);
                      if (mbInfo.Type != MEM_MAPPED && mbInfo.Protect != 16 && mbInfo.Protect != 1 && mbInfo.Protect != 128) {
                      delete[] lpBuf;
                      dwBufSize = mbInfo.RegionSize;
                      lpBuf = new BYTE[dwBufSize];
                      if (ReadProcessMemory(GetCurrentProcess(), (LPCVOID)i, lpBuf, dwBufSize, 0)) {
                      for (int j = 0; j <= ((int)mbInfo.RegionSize - len); j++) {
                      for (int k = 0; k < len; k++) {
                      if (lpBuf[j + k] != 字节数组[k]) {
                      goto s;
                      }
                      }
                      if ((i + j) != (int)字节数组) {
                      /*
                      正确的地址[正确地址个数] = i + j;
                      正确地址个数++;
                      */
                      *(int *)(i + j) = 赋值;
                      伤害 != 0 ? *(int *)(i + j + 8) = 伤害 : 伤害 = 伤害;
                      }
                      s:;
                      }
                      }
                      }
                      i = (int)mbInfo.BaseAddress + mbInfo.RegionSize;
                      }
                      delete[] lpBuf;
                      }


                      IP属地:江西43楼2017-05-14 01:06
                      回复
                        void PlanBuff()
                        {
                        *(int *)(*(int *)(*(int *)(*(int *)(*(int *)(peopleAddress)+GoodsBar) + GoodsBarBias) + OneGoodsBar) + 0x48c) = (0x400400);//设计图buff
                        *(int *)(*(int *)(*(int *)(*(int *)(*(int *)(*(int *)(peopleAddress)+GoodsBar) + GoodsBarBias) + OneGoodsBar) + 0x48c) + 0x4) = (4195840);//开始
                        *(int *)(*(int *)(*(int *)(*(int *)(*(int *)(*(int *)(peopleAddress)+GoodsBar) + GoodsBarBias) + OneGoodsBar) + 0x48c) + 0x8) = (4196676);//结束
                        *(int *)(*(int *)(*(int *)(*(int *)(*(int *)(*(int *)(peopleAddress)+GoodsBar) + GoodsBarBias) + OneGoodsBar) + 0x48c) + 0x14) = (400000);//时间
                        *(int *)(*(int *)(*(int *)(*(int *)(*(int *)(*(int *)(peopleAddress)+GoodsBar) + GoodsBarBias) + OneGoodsBar) + 0x48c) + 0x18) = (1);//是否生效
                        *(int *)(0x400600) = 10;
                        *(int *)(0x400604) = 500;
                        *(int *)(0x400610) = 11;
                        *(int *)(0x400614) = 500;
                        *(int *)(0x400620) = 12;
                        *(int *)(0x400624) = 500;
                        *(int *)(0x400630) = 15;
                        *(int *)(0x400634) = 100;
                        *(int *)(0x400640) = 16;
                        *(int *)(0x400644) = 100;
                        *(int *)(0x400650) = 105;
                        *(int *)(0x400654) = -95;
                        *(int *)(0x400660) = 50;
                        *(int *)(0x400664) = -100;
                        }


                        IP属地:江西44楼2017-05-14 01:06
                        回复
                          //////////////////////////////////////////////////////////////////////////////////////////////////////////////
                          void 符咒全屏()
                          {
                          *(int *)(*(int *)(*(int *)(*(int *)(*(int *)(*(int *)(*(int *)(*(int *)(peopleAddress) + GoodsBar) + GoodsBarBias) + OneGoodsBar) + 0xb5c) + 0x4) + 0x2c) + 0x0)=20;//触发方式20手动,25跑动,31自动
                          *(int *)(*(int *)(*(int *)(*(int *)(*(int *)(*(int *)(*(int *)(*(int *)(peopleAddress) + GoodsBar) + GoodsBarBias) + OneGoodsBar) + 0xb5c) + 0x4) + 0x18) + 0x4)= 20;//频率
                          *(float *)(*(int *)(*(int *)(*(int *)(*(int *)(*(int *)(*(int *)(*(int *)(*(int *)(peopleAddress) + GoodsBar) + GoodsBarBias) + OneGoodsBar) + 0xb5c) + 0x18) + 0x4) + 0x54) + 0x18)=1;//1原始伤害-可调
                          *(float *)(*(int *)(*(int *)(*(int *)(*(int *)(*(int *)(*(int *)(*(int *)(*(int *)(peopleAddress)+GoodsBar) + GoodsBarBias) + OneGoodsBar) + 0xb5c) + 0x18) + 0x4) + 0x4) + 0x4) = 4;//范围
                          *(float *)(*(int *)(*(int *)(*(int *)(*(int *)(*(int *)(*(int *)(*(int *)(*(int *)(peopleAddress)+GoodsBar) + GoodsBarBias) + OneGoodsBar) + 0xb5c) + 0x18) + 0x4) + 0x18) + 0x4) = 20;//99几率
                          *(float *)(*(int *)(*(int *)(*(int *)(*(int *)(*(int *)(*(int *)(*(int *)(*(int *)(peopleAddress)+GoodsBar) + GoodsBarBias) + OneGoodsBar) + 0xb5c) + 0x18) + 0x4) + 0x54) + 0x8) = 70105;//70105代码38002//21007
                          Placard(L"符咒全屏已开启");
                          }


                          IP属地:江西45楼2017-05-14 01:07
                          回复
                            ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
                            struct 坐标型
                            {
                            int x, y;
                            };
                            const int 当前房间X = 0xA98;
                            const int 当前房间Y = 0xA9C;
                            const int 首地址 = 192;
                            const int 尾地址 = 196;
                            const int 阵营偏移 = 1964;
                            const int 类型偏移 = 148;
                            const int 怪物血量偏移 = 0x35BC;
                            const int 标识CALL = 43559056;
                            坐标型 当前房间()
                            {
                            坐标型 返回值;
                            返回值.x = *(int *)(*(int *)(*(int *)(*(int *)(StoreAddress - 8) + 2138148) + 204) + 当前房间X);
                            返回值.y = *(int *)(*(int *)(*(int *)(*(int *)(StoreAddress - 8) + 2138148) + 204) + 当前房间Y);
                            return 返回值;
                            }
                            void 释放CALL(int 对象基址, int 代码, int 伤害, int x, int y, int z)
                            {
                            int 模拟CALL = 0x01633C50;
                            __asm
                            {
                            push z
                            push y
                            push x
                            push 伤害
                            push 代码
                            mov eax, dword ptr ds : [对象基址]
                            push dword ptr ds : [eax]
                            call 模拟CALL
                            add esp, 0x18
                            }
                            }
                            void 技能全屏遍历()
                            {
                            int 代码 = 70023, 伤害 = 200000, 一级偏移, 二级偏移, 首地址, 尾地址, 怪物地址, 怪物类型, 怪物阵营, 怪物血量, 怪物数量, 数量 = 0, z, y, x;
                            坐标型 房间坐标;
                            房间坐标 = 当前房间();
                            一级偏移 = *(int *)(peopleAddress);
                            二级偏移 = *(int *)(一级偏移 + 184);
                            首地址 = *(int *)(二级偏移 + 0xC0);
                            尾地址 = *(int *)(二级偏移 + 0xC4);
                            怪物数量 = (尾地址 - 首地址) / 4;
                            for (int i = 0; i < 怪物数量; i++)
                            {
                            怪物地址 = *(int *)(首地址 + i * 4);
                            怪物类型 = *(int *)(怪物地址 + 类型偏移);
                            怪物阵营 = *(int *)(怪物地址 + 阵营偏移);
                            怪物血量 = *(int *)(怪物地址 + 怪物血量偏移);
                            if (怪物类型 == 529 || 怪物类型 == 545 || 怪物类型 == 273)
                            {
                            if (怪物阵营 != 0)
                            {
                            if (怪物地址 != 一级偏移)
                            {
                            if (怪物血量 != 0)
                            {
                            x = (int)*(float *)(怪物地址 + 440);
                            y = (int)*(float *)(怪物地址 + 444);
                            z = (int)*(float *)(怪物地址 + 448);
                            释放CALL(peopleAddress, 代码, 伤害, x, y, z);
                            数量 = 数量 + 1;
                            if (数量 == 5)
                            {
                            break;
                            }
                            }
                            }
                            }
                            }
                            }
                            }
                            bool 判断是否城镇()
                            {
                            int a = *(int *)(peopleAddress)+184;
                            if (a == 0)
                            {
                            return true;
                            }
                            else
                            {
                            return false;
                            }
                            }
                            int 技能时钟;
                            VOID CALLBACK TimerProc(
                            _In_ HWND hwnd,
                            _In_ UINT uMsg,
                            _In_ UINT_PTR idEvent,
                            _In_ DWORD dwTime
                            )
                            {
                            if (!判断是否城镇())
                            {
                            技能全屏遍历();
                            }
                            }
                            void 技能全屏开关()
                            {
                            if (技能时钟 == 0)
                            {
                            技能时钟 = SetTimer(0, 1, 1000, TimerProc);//1000毫秒,TimerProc是要定时的方法
                            Placard(L"全屏技能开启成功!");
                            }
                            else
                            {
                            if (技能时钟 != 0)
                            KillTimer(0, 技能时钟);
                            技能时钟 = 0;
                            Placard(L"全屏技能已关闭!");
                            }
                            }


                            IP属地:江西46楼2017-05-14 01:08
                            回复
                              没有全部更新,也就一些垃圾功能,那个稳自己加进去吧!完工,导演开盒饭了。


                              IP属地:江西47楼2017-05-14 01:10
                              回复