Originally Posted by
Wildbreath
yes, all values correct. and before 7.0 it works correct :\
seems they changed something
after getting a GUID pointer, i writed new GUID to this pointer and return true. before 7.0 it works
This is why i used blizzard functions to do this. It works 100% of the time.
Code:
public void FromString(string guid)
{
IntPtr unmanagedAddr = Marshal.AllocHGlobal(Marshal.SizeOf(this));
Marshal.StructureToPtr(this, unmanagedAddr, false);
Function<GetGUIDFromStringDelegate> internalFromString = Function<GetGUIDFromStringDelegate>.Create(Pointers64.Manager.GUIDFromString);
internalFromString.Execute(unmanagedAddr, Marshal.StringToHGlobalAnsi(guid), 0x80);
this = (WowGuid)Marshal.PtrToStructure(unmanagedAddr, typeof(WowGuid));
}
[UnmanagedFunctionPointer(CallingConvention.ThisCall)]
private delegate void GetGUIDFromStringDelegate(IntPtr ptr,IntPtr guid,int unk);
//C++ tostring is all i have old bot but same
int toString(char *pGuidString)
{
typedef int (__thiscall *t_ToString) ( DWORD_PTR* pGUID, char *pGuidString, int unk );
t_ToString ToString = reinterpret_cast<t_ToString>((DWORD_PTR)GetModuleHandle(NULL) + (WGUID_ToStringAddr - 0x140000000));
return ToString((DWORD_PTR*)this,pGuidString,0x80);
}
I don't have the offset anymore because I chenged the way my bot and lua work but this should solve your problem. These sigs should work on an old 6.x.x build x64 I think, maybe early 7.0 but i dont think so.
Code:
name="WGUID_FromString";
addr=FindBinary(0, SEARCH_DOWN,"48 89 5C 24 ? 48 89 6C 24 ? 48 89 74 24 ? 57 41 54 41 55 41 56 41 57 48 83 EC 20 33 C0 4C 8B E2 48 8B E9 48 89 41 08 48 89 01");
fprintf( hFile," \tinternal static readonly IntPtr %s = Wow.Memory.ImageBase + 0x%08X;\n", name, addr-0x140000000);
name="WGUID_ToString";
addr=FindBinary(0, SEARCH_DOWN,"48 89 74 24 ? 48 89 7C 24 ? 41 54 48 83 EC 20 41 8B F0 48 8B FA 4C 8B E1 45 85 C0");
fprintf( hFile," \tinternal static readonly IntPtr %s = Wow.Memory.ImageBase + 0x%08X;\n", name, addr-0x140000000);