-
Member
GetObjectByGuid 2.4.3 signatures vs 3.3.5 signature.
When decompiling GetObjectByGuid in 2.4.3 (@0x0046B610):
Code:
int __cdecl GetObjectByGuid(int a1, int a2, int a3)
{
int result; // eax@2
if ( !*(_DWORD *)(*(_DWORD *)(__readfsdword(44) + 4 * TlsIndex) + 8)
|| (result = sub_46B520(a1, a2)) != 0 && !(a3 & *(_DWORD *)(*(_DWORD *)(result + 8) + 8)) )
{
result = 0;
}
return result;
}
This is 3.3.5a (@x004D4DB0):
Code:
int __cdecl GetObjectByGuid(__int64 a1, int a2)
{
int v2; // ecx@1
int result; // eax@3
__int64 v4; // [sp+0h] [bp-8h]@3
v2 = *(_DWORD *)(*(_DWORD *)(__readfsdword(44) + 4 * TlsIndex) + 8);
if ( !v2
|| !a1
|| (v4 = a1, (result = sub_4D4BB0(v2, a1, (int)&v4)) != 0) && !(a2 & *(_DWORD *)(*(_DWORD *)(result + 8) + 8)) )
{
result = 0;
}
return result;
}
It seems like in 3.3.5a, I can simply pass ulong to the function, and get the object. Why is the function parameter for 2.4.3, showing 2 ints, and not an int64? Here's a call to this function:
sbCFlCW.png
Are these 2 separate types, or is this just decompiler fun not realizing it's a ulong?
-
That looks like the decompiler messing up yeah, should be same ulong guid as usual.
-
Member
It shouldn't matter how you pass it, the cleanup of the stack will be the same number of bytes.
-
Member
Yeah, I realize that now. I was getting memory read errors, but it was because I was trying to setup vtable calls on 3.3.5a offsets (To get the name of the object). I can enumerate objects now, and retried guids/type out of memory now, but I'm completely stumped on how to find the vtable pointing to GetObjectName (Which happened to be basePtr + 54 in 3.3.5a), which doesn't appear to be the case in 2.4.3. Still trudging through this, but if you could give me any pointers, I would be greatly appreciated.
-
Hard to help you without knowing how much you understand and what you have already tried. Are you aware of how the different object types work and how descriptors work etc?
There is a lot of old info on these builds in this forum, nothing has changed since back then so it should all still be relevant, a quick search points to this question and answers:
https://www.ownedcore.com/forums/wor...ml#post3431704 (2.4.3 Offsets & Pointers)
That thread also has a whole bunch of info on the build.
If you're asking for how to find things in general then that's a whole topic on its own, but for many things in WoW you can always start digging in the lua for a function there that might lead you where you want, like the guy asking the question in the above linked thread.
-
Post Thanks / Like - 1 Thanks
squiggy (1 members gave Thanks to h42 for this useful post)
-
Member
Yeah, I've read all those threads forwards and backwards. I'll post a more detailed post in the future, if I'm still stuck. Thanks for some direction.