Finding Chat Log with Cheat Engine

11/06/2013 14:33 Tilp#1
Hi guys,

I am creating a C# bot for FFXIV just for fun, but having some problems finding out how to pull the chat log text out of memory.

I used Cheat Engine to successfully find the base pointers for HP, MP and TP, but can't figure out how to go about finding the static basepointer to the address the chat log is stored at.

So far, I can easily find the dynamic section in memory where the log is stored. I haven't been able to find the static base-pointer though.

The end goal is to have a List<String> with the chat log entries stored.

Thanks a lot for any and all help.
11/06/2013 15:36 ​Tension#2
You have may need to find the print function for the chat and hook it to receive the string which gets printed into the chatbox. Then you can just call your function to log it.
11/06/2013 17:36 Tilp#3
Thanks a lot for the response. I am avoiding injecting any of my own assembly code and will initially stick to only reading memory.

That is due to two reasons:
1) I currently do not know how to hook
2) I want to avoid any tampering as the ban risk then comes into play

I figure I somehow have to find the static base pointer that points to the start of the chat log. That pointer most likely won't change on restart. So, I find the address of the first bit of chat log text by doing a string search. Then, i want to see what access / writes to that address, to track down the parent address (and eventually the base pointer). The problem however, is that with Cheat Engine, after you click "find out what accesses / writes to this address", you need to do something in-game that changes the value in order to populate the debug list with opcodes. But there is nothing you can do to change the value, as it is set when you log into the game and the welcome text shows up. I therefore find myself a bit lost here...

Any tips, thoughts, hints or instructions are greatly appreciated.
11/06/2013 18:48 ​Tension#4
If you don't want to hook the function, you could still create a extern hardware breakpoint to the function and read the EBP register for the parameter. But i don't know if it's possible with C#.
11/06/2013 19:12 Tilp#5
Thanks tension, could you perhaps provide some more specific details on what you suggested? I am not following you on exactly what to do.

Anyone have any thoughts on how to use Cheat Engine here, to find the base pointer?


Thanks a lot again,

Magnus

I found the attached instructions, but got confused by the indented section under step 5.

Does someone have this game installed and can help me figure it out?

I understand what the indented section says, but step 5 itself should find the base pointers, not sure why the indented part then says "The base pointers can be found by doing a new memory scan". Is it a typo there?

I think I am close, but messing it up somewhere.


Thanks again!
11/11/2013 14:17 [uLow]Beni#6
Are you sure, that it is really the first byte?
11/18/2013 15:34 Tilp#7
Quote:
Originally Posted by [uLow]Beni View Post
Are you sure, that it is really the first byte?
I think it works, but I have no clue how the author figured this out, and would love to know how to do this myself.

Also, any thoughts on how to save the log down from memory and represent it in C#? It basically has a starting address in memory, then fills in new addresses after that as new chat text is sent. Do I just scan the addresses all the way until I hit 0, and then compare it to what my array (for instance?) already contains, and just add in the new line as a new index in the array?


Thanks again,

Magnus