Network: WoW Gold | WoW Accounts | MPS Games | FPSowned
MMOwned - World of Warcraft Exploits, Hacks, Bots and Guides
Homepage »      Register »      Hall of Fame »      Ranks And Awards »      Advertise »      Marketplace »
 
Sign up



Do you like this excellent information? Then Donate HERE to remove ads and support the MMOwned community.


Go Back   MMOwned - World of Warcraft Exploits, Hacks, Bots and Guides > World of Warcraft > Bots and Programs > WoW Memory Editing

WoW Memory Editing WoW Memory Editing for learning purposes only.
This section is more advanced than others on MMOwned Read the section specific rules, infractions will be given out if u break them!That is including the expectations! - If you don't meet them then don't post

Reply
 
LinkBack Thread Tools
  #1  
Old 07-20-2009
vulcanaoc is offline.
Master Sergeant
  
 
Join Date: Jul 2008
Posts: 102
Reputation: 22
Points: 1,222, Level: 2
Points: 1,222, Level: 2 Points: 1,222, Level: 2 Points: 1,222, Level: 2
Level up: 65%, 178 Points needed
Level up: 65% Level up: 65% Level up: 65%
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%

[Auction House] Retrieving Name of Auction Entry

This post is in reference to [Only registered and activated users can see links. ]


I converted this to C#, and it works just as well as Cypher's original. However, I want to be able to search the AuctionList for an auction entry based on name. After spending waaaay too long trying to figure out how to pull a name from each auction entry, I've decided to see if anyone else knows how I might be able to. (I'm stuck in a rut)

I'm guessing that maybe the ItemEntry value can be used to look up the item's name in some other structure.

Can anyone who knows more about WoW's item structure than I do give me some tips?
Reply With Quote


Donate to remove ads, get your "DONATOR title, and get access to the MMOwned community's elite Shoutbawx.

  #2  
Old 07-20-2009
vulcanaoc is offline.
Master Sergeant
  
 
Join Date: Jul 2008
Posts: 102
Reputation: 22
Points: 1,222, Level: 2
Points: 1,222, Level: 2 Points: 1,222, Level: 2 Points: 1,222, Level: 2
Level up: 65%, 178 Points needed
Level up: 65% Level up: 65% Level up: 65%
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%

Ok, Just took a look for pointers to 'Brain Hacker'. I then looked up the ItemEntry for the corresponding auction.

(These are not static addresses)
At 0CD0A360, there is a pointer to 'Brain Hacker'
At 0CD0A370, there is an integer holding the auction's ItemEntry.

I'll post any more relevant findings here..

[edit] Just checked this out for another entry, and the same holds true (add 0x10 to a certain pointer to the entry's name and bam! matching ItemEntry).

Last edited by vulcanaoc; 07-20-2009 at 03:41 PM.
Reply With Quote
  #3  
Old 07-20-2009
Nesox's Avatar
Nesox is offline.
MaiN's Biatch
Legendary User
  
 
Join Date: Mar 2007
Location: VirtualAllocEx
Posts: 1,115
Nominated 26 Times in 3 Posts
Nominated TOTM/W Award(s): 1
Reputation: 727
Points: 36,171, Level: 28
Points: 36,171, Level: 28 Points: 36,171, Level: 28 Points: 36,171, Level: 28
Level up: 95%, 129 Points needed
Level up: 95% Level up: 95% Level up: 95%
Activity: 14.1%
Activity: 14.1% Activity: 14.1% Activity: 14.1%

The entry equals itemid. you could use that to lookup the name not sure if ts possible with the DBC otherwise you could write à small wrapper that looks it up on wowhead
__________________
omg ive started a blog nao! what's wrong with MEH!? -> [Only registered and activated users can see links. ]
Reply With Quote
  #4  
Old 07-20-2009
Apoc's Avatar
Apoc is offline.
MMOwned WebDev
Legendary User
  
 
Join Date: Jan 2008
Posts: 1,915
Nominated 5 Times in 1 Post
Reputation: 1029
Points: 22,671, Level: 21
Points: 22,671, Level: 21 Points: 22,671, Level: 21 Points: 22,671, Level: 21
Level up: 17%, 1,329 Points needed
Level up: 17% Level up: 17% Level up: 17%
Activity: 35.7%
Activity: 35.7% Activity: 35.7% Activity: 35.7%

Sigh, use the item cache to look it up.

ItemCache_GetInfoBlockById = 0x00683910

Returns a pointer to a 'fairly' large struct.

Name is at 0x1E4 in that struct.

You can find the cache base address yourself. :P
__________________
[Only registered and activated users can see links. ]
Reply With Quote
  #5  
Old 07-20-2009
amadmonk's Avatar
amadmonk is offline.
Site Donator
  
 
Join Date: Apr 2008
Posts: 305
Reputation: 62
Points: 1,616, Level: 3
Points: 1,616, Level: 3 Points: 1,616, Level: 3 Points: 1,616, Level: 3
Level up: 31%, 484 Points needed
Level up: 31% Level up: 31% Level up: 31%
Activity: 1.9%
Activity: 1.9% Activity: 1.9% Activity: 1.9%

Also if you're OOP you can just read the appropriate DBC file. That's what I was doing with my packet reader. Probably the in-proc DBC is faster tho.
__________________
Don't believe everything you think.
Reply With Quote
  #6  
Old 07-20-2009
BoogieManTM's Avatar
BoogieManTM is offline.
Master Sergeant
  
 
Join Date: May 2008
Location: Under your bed
Posts: 97
Reputation: 17
Points: 555, Level: 1
Points: 555, Level: 1 Points: 555, Level: 1 Points: 555, Level: 1
Level up: 31%, 345 Points needed
Level up: 31% Level up: 31% Level up: 31%
Activity: 1.5%
Activity: 1.5% Activity: 1.5% Activity: 1.5%

Quote:
Originally Posted by amadmonk View Post
Also if you're OOP you can just read the appropriate DBC file. That's what I was doing with my packet reader. Probably the in-proc DBC is faster tho.
Pretty sure stuff like item names are not stored in the dbc's. The client queries the server on items it's never seen before, server responds with the large struct apoc mentioned (See below), which is then cached in WDB's for future reference (by version).


Here's the structure according to wcell:

Code:
public class ItemTemplate
    {
        public string Name { get; set; }

        public uint Id { get; set; }

        public ItemId ItemId { get; set; }

        public ItemClass Class { get; set; }

        public ItemSubClass SubClass { get; set; }

        public uint DisplayId { get; set; }

        public ItemQuality Quality { get; set; }

        public ItemFlags Flags { get; set; }

        public uint BuyPrice { get; set; }

        public uint SellPrice { get; set; }

        public InventorySlotType InventorySlotType { get; set; }

        public ClassMask RequiredClassMask { get; set; }

        public RaceMask RequiredRaceMask { get; set; }

        public uint Level { get; set; }

        public uint RequiredLevel { get; set; }

        public SkillId RequiredSkillId { get; set; }

        public uint RequiredSkillValue { get; set; }

        public SpellId RequiredProfessionId { get; set; }

        public uint RequiredPvPRank { get; set; }

        public uint UnknownRank { get; set; }

        public FactionId RequiredFactionId { get; set; }

        public StandingLevel RequiredFactionStanding { get; set; }

        public uint UniqueCount { get; set; }

        /// <summary>
        /// The size of a stack of this item.
        /// </summary>
        public uint MaxAmount { get; set; }

        public int ContainerSlots { get; set; }

        public StatModifier[] Mods { get; set; }

        public DamageInfo[] Damages { get; set; }

        public int[] Resistances { get; set; }

        public int AttackTime { get; set; }

        public ItemProjectileType ProjectileType { get; set; }

        public float RangeModifier { get; set; }

        public ItemBondType BondType { get; set; }

        public string Description { get; set; }

        public uint PageTextId { get; set; }

        public uint PageCount { get; set; }

        public PageMaterial PageMaterial { get; set; }

        /// <summary>
        /// The Id of the Quest that will be started
        /// when this Item is used.
        /// </summary>
        public uint QuestId { get; set; }

        public uint LockId { get; set; }

        public Material Material { get; set; }

        public SheathType SheathType { get; set; }

        public uint RandomPropertiesId { get; set; }

        public uint RandomSuffixId { get; set; }

        public uint BlockValue { get; set; }

        public ItemSetId SetId { get; set; }

        public int MaxDurability { get; set; }

        public ZoneId ZoneId { get; set; }

        public MapId MapId { get; set; }

        public ItemBagFamilyMask BagFamily { get; set; }

        public TotemCategory TotemCategory { get; set; }

        public GemSocketInfo[] Sockets { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public uint SocketBonusEnchantId { get; set; }

        public ItemEnchantmentEntry SocketBonusEnchant { get; set; }

        public uint GemPropertiesId { get; set; }

        public GemProperties GemProperties { get; set; }

        public int RequiredDisenchantingLevel { get; set; }

        public float ArmorModifier { get; set; }

        public int Duration { get; set; }

        public uint[] Spells { get; set; }

        #region Custom
        public InventorySlotMask InventorySlotMask { get; set; }

        public uint RandomSuffixFactor { get; set; }

        public uint RequiredSkill { get; set; }

        public ItemSubClassMask SubClassMask { get; set; }

        /// <summary>
        /// Spell to be casted when using this item
        /// </summary>
        public uint UseSpell { get; set; }

        /// <summary>
        /// Spell that is casted once and then consumes this Item (usually teaching formulars, patterns, designs etc)
        /// </summary>
        public uint TeachSpell { get; set; }

        /// <summary>
        /// Spell to be casted when equipping
        /// </summary>
        public uint EquipSpell { get; set; }

        /// <summary>
        /// Spell to be casted when being hit
        /// </summary>
        public uint HitSpell { get; set; }

        /// <summary>
        /// Spell to be casted when using Soulstone
        /// </summary>
        public uint SoulstoneSpell { get; set; }

        /// <summary>
        /// The ItemSet to which this Item belongs (if any)
        /// </summary>
        public uint ItemSet { get; set; }

        public uint RequiredFaction { get; set; }

        public uint RequiredProfession { get; set; }

        /// <summary>
        /// EquipmentSlots to which this item can be equipped
        /// </summary>
        public EquipmentSlot[] EquipmentSlots { get; set; }

        /// <summary>
        /// whether this is ammo
        /// </summary>
        public bool IsAmmo { get; set; }

        /// <summary>
        /// whether this is a bag (includes quivers)
        /// </summary>
        public bool IsBag { get; set; }

        /// <summary>
        /// whether this is a container (includes chests, clams, bags, quivers, etc.)
        /// </summary>
        public bool IsContainer { get; set; }

        /// <summary>
        /// whether this is a key
        /// </summary>
        public bool IsKey { get; set; }

        /// <summary>
        /// whether this can be stacked
        /// </summary>
        public bool IsStackable { get; set; }

        /// <summary>
        /// whether this is a weapon
        /// </summary>
        public bool IsWeapon { get; set; }

        /// <summary>
        /// whether this is a ranged weapon
        /// </summary>
        public bool IsRangedWeapon { get; set; }

        public bool IsThrowable { get; set; }

        /// <summary>
        /// whether this is a 2h weapon
        /// </summary>
        public bool IsTwoHandWeapon { get; set; }

        /// <summary>
        /// whether this teleports one home when using it
        /// </summary>
        public bool IsHearthStone { get; set; }

        /// <summary>
        /// The skill needed for this item, for armors, weapons, shields etc
        /// </summary>
        public SkillId ItemProfession { get; set; }

        /// <summary>
        /// whether this Item is an equippable Item and not a bag
        /// </summary>
        public bool IsInventory { get; set; }

        /// <summary>
        /// The Quest for which this Item needs to be collected
        /// </summary>
        public uint[] CollectQuests { get; set; }

        /// <summary>
        /// The Quest that will be started by this Item
        /// </summary>
        public uint StartQuest { get; set; }

        /// <summary>
        /// Whether this ItemTemplate has any sockets
        /// </summary>
        public bool HasSockets { get; set; }

        public bool ConsumesAmount;

        #endregion
    }
Reply With Quote
  #7  
Old 07-20-2009
ramey is offline.
Knight-Lieutenant
  
 
Join Date: Jan 2008
Posts: 275
Reputation: 17
Points: 1,542, Level: 3
Points: 1,542, Level: 3 Points: 1,542, Level: 3 Points: 1,542, Level: 3
Level up: 21%, 558 Points needed
Level up: 21% Level up: 21% Level up: 21%
Activity: 5.8%
Activity: 5.8% Activity: 5.8% Activity: 5.8%

You *could* do this with lua.

name, texture, count, quality, canUse, level,
minBid, minIncrement, buyoutPrice, bidAmount,
highBidder, owner, saleStatus = GetAuctionItemInfo("type", index);

[Only registered and activated users can see links. ]
Reply With Quote
  #8  
Old 07-20-2009
vulcanaoc is offline.
Master Sergeant
  
 
Join Date: Jul 2008
Posts: 102
Reputation: 22
Points: 1,222, Level: 2
Points: 1,222, Level: 2 Points: 1,222, Level: 2 Points: 1,222, Level: 2
Level up: 65%, 178 Points needed
Level up: 65% Level up: 65% Level up: 65%
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%

Quote:
Originally Posted by Apoc View Post
Sigh, use the item cache to look it up.

ItemCache_GetInfoBlockById = 0x00683910

Returns a pointer to a 'fairly' large struct.

Name is at 0x1E4 in that struct.

You can find the cache base address yourself. :P
So after looking into this, it seems that "ItemCache_GetInfoBlockById" is returning an address which always points to 0. The value at that address minus 0x18 holds the ItemEntry. This can be seen as the function returns.

Code:
pop     esi
pop     edi
add     eax, 18h
pop     ebx
pop     ebp
retn    14h
There's still no name anywhere to be found near any of these addresses. What gives?
Reply With Quote
  #9  
Old 07-20-2009
vulcanaoc is offline.
Master Sergeant
  
 
Join Date: Jul 2008
Posts: 102
Reputation: 22
Points: 1,222, Level: 2
Points: 1,222, Level: 2 Points: 1,222, Level: 2 Points: 1,222, Level: 2
Level up: 65%, 178 Points needed
Level up: 65% Level up: 65% Level up: 65%
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%

Ah, it seems it is offset +0x1F0 from the value that is returned (not 0x1E4 Apoc, so update your code), and +0x208 from the value that holds the ItemEntry.

Now to just begin reversing all of the ****ing arguments ItemCache_GetInfoBlockById is passed before I start calling it from my code.
Reply With Quote
  #10  
Old 07-20-2009
Apoc's Avatar
Apoc is offline.
MMOwned WebDev
Legendary User
  
 
Join Date: Jan 2008
Posts: 1,915
Nominated 5 Times in 1 Post
Reputation: 1029
Points: 22,671, Level: 21
Points: 22,671, Level: 21 Points: 22,671, Level: 21 Points: 22,671, Level: 21
Level up: 17%, 1,329 Points needed
Level up: 17% Level up: 17% Level up: 17%
Activity: 35.7%
Activity: 35.7% Activity: 35.7% Activity: 35.7%

Seems to be right to me. Works fine.

Also; the call is as follows:

Code:
/// <summary>
        /// Typedef for the virtual DbCache_GetInfoBlockById func
        /// </summary>
        /// <param name="instance">'this' needs to be the specific cache type pointer</param>
        /// <param name="index">The index to search</param>
        /// <param name="a3">Pass 0</param>
        /// <param name="a4">Pass 0</param>
        /// <param name="a5">Pass 0</param>
        /// <param name="a6">Pass 0</param>
        /// <returns>A pointer to an info block (struct) depending on the type of cache, and function pointer/cache pointer.</returns>
        [UnmanagedFunctionPointer(CallingConvention.ThisCall)]
        private delegate IntPtr GetInfoBlockByIdDelegate(IntPtr instance, int index, int a3, int a4, int a5, int a6);
The last 4 params can be passed 0. (As are passed by 90% of the functions anyway.)
__________________
[Only registered and activated users can see links. ]
Reply With Quote
  #11  
Old 07-20-2009
vulcanaoc is offline.
Master Sergeant
  
 
Join Date: Jul 2008
Posts: 102
Reputation: 22
Points: 1,222, Level: 2
Points: 1,222, Level: 2 Points: 1,222, Level: 2 Points: 1,222, Level: 2
Level up: 65%, 178 Points needed
Level up: 65% Level up: 65% Level up: 65%
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%

Quote:
Originally Posted by Apoc View Post
Seems to be right to me. Works fine.

Also; the call is as follows:

Code:
/// <summary>
        /// Typedef for the virtual DbCache_GetInfoBlockById func
        /// </summary>
        /// <param name="instance">'this' needs to be the specific cache type pointer</param>
        /// <param name="index">The index to search</param>
        /// <param name="a3">Pass 0</param>
        /// <param name="a4">Pass 0</param>
        /// <param name="a5">Pass 0</param>
        /// <param name="a6">Pass 0</param>
        /// <returns>A pointer to an info block (struct) depending on the type of cache, and function pointer/cache pointer.</returns>
        [UnmanagedFunctionPointer(CallingConvention.ThisCall)]
        private delegate IntPtr GetInfoBlockByIdDelegate(IntPtr instance, int index, int a3, int a4, int a5, int a6);
The last 4 params can be passed 0. (As are passed by 90% of the functions anyway.)
That is strange.. I'll try both I guess. Anyway, way to go with the delegate as a function pointer. That is pure win.

Edit: Is the 'this' value for the item cache 0113EBF0?

Last edited by vulcanaoc; 07-20-2009 at 09:55 PM.
Reply With Quote
  #12  
Old 07-20-2009
Apoc's Avatar
Apoc is offline.
MMOwned WebDev
Legendary User
  
 
Join Date: Jan 2008
Posts: 1,915
Nominated 5 Times in 1 Post
Reputation: 1029
Points: 22,671, Level: 21
Points: 22,671, Level: 21 Points: 22,671, Level: 21 Points: 22,671, Level: 21
Level up: 17%, 1,329 Points needed
Level up: 17% Level up: 17% Level up: 17%
Activity: 35.7%
Activity: 35.7% Activity: 35.7% Activity: 35.7%

Quote:
Originally Posted by vulcanaoc View Post
That is strange.. I'll try both I guess. Anyway, way to go with the delegate as a function pointer. That is pure win.

Edit: Is the 'this' value for the item cache 0113EBF0?
You can thank jjaa for proving it worked right.

I just started wrapping things with it.

Also; I have no idea. I grab the cache pointers at runtime.
__________________
[Only registered and activated users can see links. ]
Reply With Quote
  #13  
Old 07-21-2009
vulcanaoc is offline.
Master Sergeant
  
 
Join Date: Jul 2008
Posts: 102
Reputation: 22
Points: 1,222, Level: 2
Points: 1,222, Level: 2 Points: 1,222, Level: 2 Points: 1,222, Level: 2
Level up: 65%, 178 Points needed
Level up: 65% Level up: 65% Level up: 65%
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%

Quote:
Originally Posted by Apoc View Post
You can thank jjaa for proving it worked right.

I just started wrapping things with it.

Also; I have no idea. I grab the cache pointers at runtime.
I'm curious, are you in-process or out-of-process?

I imagine calling functions from WoW using delegates while out-of-process would require a lot of code magic... in-process seems like it would be easier.
Reply With Quote
  #14  
Old 07-21-2009
Cypher's Avatar
Cypher is offline.
Kynox's sister's pimp
Legendary User
  
 
Join Date: Apr 2006
Location: ntdll.dll
Posts: 4,185
Nominated 63 Times in 4 Posts
Nominated TOTM/W Award(s): 1
Reputation: 1085
Points: 55,512, Level: 35
Points: 55,512, Level: 35 Points: 55,512, Level: 35 Points: 55,512, Level: 35
Level up: 14%, 3,188 Points needed
Level up: 14% Level up: 14% Level up: 14%
Activity: 43.9%
Activity: 43.9% Activity: 43.9% Activity: 43.9%

Item cache lookup with entry ID. Apoc has it right.
__________________
[Only registered and activated users can see links. ] Back online!

"Science is interesting, and if you don't agree you can **** off."
[Only registered and activated users can see links. ]

"I can write very coherent things when I try that sound very good" -- Styles
Reply With Quote
  #15  
Old 07-21-2009
jjaa's Avatar
jjaa is offline.
Contributor
  
 
Join Date: Dec 2006
Location: 0x005FCB40
Posts: 398
Reputation: 164
Points: 2,932, Level: 5
Points: 2,932, Level: 5 Points: 2,932, Level: 5 Points: 2,932, Level: 5
Level up: 17%, 668 Points needed
Level up: 17% Level up: 17% Level up: 17%
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%

Quote:
Originally Posted by vulcanaoc View Post
I'm curious, are you in-process or out-of-process?

I imagine calling functions from WoW using delegates while out-of-process would require a lot of code magic... in-process seems like it would be easier.


In-process, if you’re out-of-process, and the project is private. You lose lots of functionality for no good reason.
__________________

Thank You Scrubs, 2001 - 2009

Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are On



All times are GMT -4. The time now is 05:46 AM.




Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.1

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493