Odd code in 24015 IsSpellKnown() menu

User Tag List

Results 1 to 2 of 2
  1. #1
    air999's Avatar Contributor
    Reputation
    131
    Join Date
    Nov 2014
    Posts
    102
    Thanks G/R
    9/62
    Trade Feedback
    0 (0%)
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Odd code in 24015 IsSpellKnown()

    Hello!

    I was diggin for InputControl structure and found some strange code in client 24015 both x32 and x64.

    I found in function IsSpellKnown, which called from:

    Code:
    Script_IsAutoRepeatSpell
    Script_IsUsableSpell
    Script_IsSpellKnown
    Script_IsSpellKnownOrOverridesKnown
    Script_GetSpellCharges
    Script_GetSpellInfo
    Script_GetSpellPowerCost
    Script_GetSpellAutocast
    Script_ToggleSpellAutocast
    Script_EnableSpellAutocast
    Script_DisableSpellAutocast
    GetSpellIDFromLua
    sub_8C2787
    some strange code:
    Code:
     off_10F3CE0 = (char *)xmemcpy + (((char *)off_10F3CE0 - (char *)xmemcpy) | 0x640000
        * (*(_DWORD *)(g_theGxDevicePtr + 0xE60) != *(_DWORD *)(g_theGxDevicePtr + 0xE64))));

    [g_theGxDevicePtr + 0xE60] is in fact mouse action incremental counter.
    [g_theGxDevicePtr + 0xE64] must be previous value, didn't actuallycheck

    this code calculate some value then mouse action counter don't equal previous.

    i found reference to off_10F3CE0 in NetClient::ClientConnectionAuthChallengeHandler()


    x32 0x8C3C28 not rebased
    Code:
    bool __cdecl IsSpellKnown(int a1, int a2)
    {
      bool result; // al@3
    
      off_10F3CE0 = (char *)xmemcpy  + (((char *)off_10F3CE0 - (char *)xmemcpy) | 0x640000
          * (*(_DWORD *)(g_theGxDevicePtr + 0xE60) != *(_DWORD *)(g_theGxDevicePtr + 0xE64))));
    
      if ( (CGSpellBook__FindSlotBySpellID(a1, a2) & 0x80000000) == 0 )
      {
        result = 1;
      }
      else if ( a2 )
      {
        result = CGPetInfo__FindSpellByID(a1) != 0;
      }
      else
      {
        result = sub_8C389E(a1);
      }
      return result;
    }
    x64 14078C030 not rebased
    Code:
    char __fastcall IsSpellKnown(unsigned int a1, int a2)
    {
      unsigned int v2; // ebx@1
      int v3; // esi@1
      __int64 v4; // rax@3
      char result; // al@3
    
      v2 = a1;
      v3 = a2;
      off_141560CA8 =(char *)xmemcpy + (((char *)off_141560CA8 - (char *)xmemcpy) | 0x640000
                    * (*((_DWORD *)g_theGxDevicePtr + 0xE64) != *((_DWORD *)g_theGxDevicePtr + 0xE68)));
    
      if ( sub_140787230(a1) >= 0 )
      {
        result = 1;
      }
      else if ( v3 )
      {
        LODWORD(v4) = sub_1408B1450(v2);
        result = v4 != 0;
      }
      else if ( v2 != 2641 || (unsigned int)dword_141922370 <= 0xA51 )
      {
        result = 0;
      }
      else
      {
        result = (*(_DWORD *)(qword_141922380 + 328) >> 17) & 1;
      }
      return result;
    }
    In current build 24461 there is no such code.

    So, my question is: it's detection vector or just my paranoia?

    Odd code in 24015 IsSpellKnown()
  2. Thanks squiggy, Torpedoes, tutrakan, DarkLinux (4 members gave Thanks to air999 for this useful post)
  3. #2
    Jadd's Avatar 🐸 Premium Seller
    Reputation
    1511
    Join Date
    May 2008
    Posts
    2,432
    Thanks G/R
    81/333
    Trade Feedback
    1 (100%)
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Yes, it is detection related and it has existed since some time after 7.1. Essentially the way it works is by checking the previous graphics refcount to the current refcount. The only time this is ever unequal is *during* a render, meaning it will set a flag in your client if the code is executed from rendering functions - most notably EndScene.

    As you're aware, the detection flag is only read within the auth challenge response, so you are only susceptible to a ban if you relog on the same client after being flagged.

    Before any wild speculation occurs, most bot developers I know (including the HB team) have been aware of it since it was introduced.

  4. Thanks squiggy, Torpedoes, tutrakan, air999, DarkLinux (5 members gave Thanks to Jadd for this useful post)

Similar Threads

  1. [code] 21 trojans coded in VB
    By YetiHunter in forum Programming
    Replies: 8
    Last Post: 10-04-2008, 11:04 AM
  2. Multiple Lines of code in /in... statement
    By eonduckem in forum WoW UI, Macros and Talent Specs
    Replies: 3
    Last Post: 09-05-2008, 11:41 AM
  3. [Help Thread] Coding in LavishScript
    By Apoc in forum World of Warcraft Bots and Programs
    Replies: 4
    Last Post: 02-19-2008, 02:35 PM
  4. WoW Color Hack WoW Color Hack (Use color-codes in text)
    By AlexM in forum World of Warcraft Bots and Programs
    Replies: 34
    Last Post: 08-24-2007, 12:42 PM
  5. Odd place in Hyjal
    By Dastor in forum World of Warcraft Exploration
    Replies: 23
    Last Post: 02-14-2007, 01:38 AM
All times are GMT -5. The time now is 02:32 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search