Hello,
To start, this is going to be a sort of complex intro to a simple question, but I feel it's necessary. I'm currently working on a memory editing project for Wow 1.12.1 5875, which eventually I'd like to turn into a bot however right now I'm just wrapping my head around all that goes into it.
So far, I wrote a class hierarchy to deal with wowobjects, am iterating through ObjectManager and am able to retrieve a good amount of information from NPCs, Gameobjects & Players. What I currently have in order to maximize visibility of what I know how to do/don't is essentially a crude "stat watcher", such as reporting when damage/healing is taken, rage/mana is used, new targets are selected, etc.
I've been looking at WiNiFiX's Fishbot recently trying to see what I understand and don't understand about it, and I eventually was able to implement his Lua DoString hook just to see if it worked. Now obviously, I don't want to just copy/paste code, I want to understand and write it; that's my only goal. So I've been watching a lot of videos on assembly, trying to wrap my head around it (which I've finally started to do, and I was actually able to understand what's going on in the code below for the most part) and all is well.
Here's a picture of the code I was referring to:
download.png
Now I have many questions about assembly still, by no means do I understand it fully, however my main question is this : do the 6 main general registers (edx, ecx, eax, esi etc.) have any rhyme or reason to when one is used over the other to store data? I haven't really been able to understand why, say, a value would be stored in eax over ecx, or esi over edi etc. Any information that anyone would be willing to provide which you think would help me learn assembly and the workings of memory editing/RE I will be grateful for. If it helps, I consider myself fairly intermediate-advanced in high-level programming such as Java/C# but I have spent far less time with lower level languages such as C++ or C, so really memory is something I have a juvenile understanding of. I apologize if this post is slightly all over the place, however I know there are some very knowledgeable people on here and finding resources to get started is difficult (took me a while and I feel blessed to be where I'm at already )
Thanks in advance.
EDIT: I found a really good page that goes over my question in detail. However, any info about the best ways to get started based on what I've already done are still appreciated.