Hello,
before anything, I hope this has not been asked before.
I'm trying to use VMT and I don't know why it's not working.
Here is the code I'm running.
Code:
private uint getCurMgr()
{
uint gclientconnection = SMemory.ReadUInt(wowHandle, 0x12705B0);
uint scurmgr = SMemory.ReadUInt(wowHandle, gclientconnection + 0x2d94);
uint curobj = SMemory.ReadUInt(wowHandle, scurmgr + 0xAC);
return curobj;
}
Code:
suspendMainThread(dwProcessId);
uint codecave = AllocateMemory(wowHandle);
uint VMT = ReadUInt(wowHandle, objAddress);
uint result = 0;
Asm.Clear();
Asm.AddLine("FS mov eax, [0x2C]");
Asm.AddLine("mov eax, [eax]");
Asm.AddLine("add eax, 0x8");
Asm.AddLine("mov dword [eax], {0}", new object[] { getCurMgr() });
Asm.AddLine("mov ecx, {0}", new object[] { objAddress });
Asm.AddLine("call {0}", new object[] { ReadUInt(wowHandle ,VMT + method) }) ;
Asm.AddLine("retn");
objAddress is the player Ptr ( [[[0x12D4EA8] + 0x34] + 0x24]
method is 51 * 4 ( VMT_GetName ? )