Thank you for the robust reply!
I understand what you have said - I've actually spent the last hour stepping upward from the WSASend call that is constantly spamming status updates to the server. This has usually been my method of last resort haha. It's typically easier for me to find a value in memory, like the quantity on an item stack, put a memory breakpoint on it, and then locate the code that sends a "split stack" packet. Or work with currency values in the trade window, etc. My experience with many games has been that the packet handler is looping and possibly in its own thread, which is initialized when the client starts up, and may not actually connect back to that higher level function I'm looking for. Not saying this is the case with SWTOR btw. I will work more on it tomorrow.
What I HAVE been able to do is scrape strings out of the client as they are presented, so I can pick up names of directx textures, players in the social window, chat text, and any entered text.
I've also figured out what my
actual coordinates are LOL; I have an active detour in the code that reads and displays them as I run around. The coordinates they show on the map are actually multiplied by a value to obscure the internal xyz of the 3D objects, no doubt to prevent teleports and speedhacks, among other things. I've not been able to teleport my toon yet, but I was able to accidentally teleport some objects in the zone while trying. Local to just my client I'm sure.
As far as bannings go, I guess I've been lucky because I've not had a problem. I inject a dll and I run a debugger ( though an obscure debugger that no longer works on MOST hardware configurations HAH ). I actually didn't start working on it until early access though, so maybe they have other concerns atm. One thing I wouldn't mind learning how to do in the future is mask a module so that it cannot be enumerated after its injected.
Anyway, yes, the higher level function that takes a buffer and maybe a packet length as a parameter is the holy grail here, but I can't say many games have it all so neat. The games which are a bitch are the ones that encrypt each piece of data AS its being appended to the buffer. I don't know which kind of game this is yet.
Another technique is to find a function that does something relatively infrequent, call it, and just hijack the packet on the way out. This is what I did for WoW. There is a function for looting an item and it takes a single parameter, which is the slot number of the thing you want to loot. I'd call it from my dll and pass it slot 250, which is absurd, no container would have that many items, detect that in a separate hook thats looking at the outgoing packets, and then overwrite the buffer with whatever data I had queued. That works pretty well too, and you don't have to worry about gumming anything up or screwing up a counter, as the native function should clean up after itself.