Hello,
Code:
wow.WriteASCIIString(varName, variable);
wow.Asm.AddLine("mov ecx, {0}", player.BaseAddress);
wow.Asm.AddLine("push {0}", -1);
wow.Asm.AddLine("push {0}", varName);
wow.Asm.AddLine("call {0}", (uint)wow.MainModule.BaseAddress + (uint)Offsets.eWowFunctions.FrameScript__GetLocalizedText);
wow.Asm.AddLine("mov dword [{0}], eax", returnValue);
Simply try putting return value into variable with some name, like myVariable=SomeFunction(). Then you create string with that variable name you need to get value from (ASCII encoded) and call FrameScript__GetLocalizedText with 3 params you can see above. It returns you a pointer to a string with UTF encoding that you can simply read and get your return value.
Offset for FrameScript__GetLocalizedText is 0x43C230+(wow main module adress).
Btw reading UTF string can be done something like this:
Code:
byte[] bytes = wow.ReadBytes(wow.ReadUInt(returnValue), 0x50);
string decodedBytes = Encoding.UTF8.GetString(bytes);
sResult = decodedBytes.Split('\0')[0];