Hey guys,
I recently started to reverse engineer gw2 myself. But I am a bit stuck and I was hoping for some advice I first want to tell you what I found out and I was hoping you guys could correct me if I got something wrong. If you could give me some tips in what direction I shall looking more into, I would highly appreciate it. Also I am kind of new to all this (coming from a developer standpoint), so I also would love to know more tools, plugins, features, ... I should have a look at
So let me get started.
assert() function
Most of the strings in the binary are part of an “assert()” function with some debug information. This is a gret source to figure out certain passed parameters/variables as well as in what file this function was defined. My question is, most of those functions are probably class methods. Can I most of the time assume that the first parameter (probably on the stack) is the this pointer to the object this method belongs to? If so, how can I get from there to the corresponding vtable?
RTTI and vtables
I found an old gw2 beta torrent where the gw2.exe was still compiled with RTTI. On OpenRCE I found a “ClassInformer” (
) plugin to gather the RTTI and vtable information.
With this it is pretty cool to reverse engineer the class hirarchy structure, as well class functions. Though it’s the first time doing this, and I still haven’t understood completly how vtables are corresponding to classes and how you guys find these pointers to other objects (for example “chcontext+38h = charakter + 44h = agent + 1ch = world” - ). As far as I understand, what you can see on this screenshot is the virtual function table. Which means there are no information about the attributes, right? Can I search the memory for objects pointing to the vtable information, to find the objects in memory and then reverse engineer the attributes?
Class hirarchy, ChContext and pointers
I have read a lot of Threads here and I often find class hirarchies like the following - “ChContext->Character->Agent->World->EntityInWorld->Speed” (). How did you guys figure out those class names and hirarchies? And how did you find the offsets? Were you looking for the memory address with CheatEngine and then did a pointer scan? I was not able to get those pointer paths myself. Any tips for the pointer scan settings or common pitfalls?
It seems like ChContext is the “base” class and from there you can get to all important information. But I can’t find any refernce to ChContext. But there exists a View::CContext. Is this the same?
Also I see WorldViewInt::CContext, View::Context, WorldMapModel::CContext, WvwClient::CContext, … and many more. How do they differ? Or are they basically the same, and it just depends on if you are currently in PVE, WvW, …
Based on a comment in an autoupdater source () I found the following function and address in the current build. Is this the ChContext/CContext? If so, why can’t I follow the many pointer examples like: ChContext+38h -> Charakter + 44h …
How did you guys find this function in the first place? With pointer scans in CheatEngine? Or did you find it statically?
Would appreciate any input
I would love even more to chat with somebody about it. Would be really cool if somebody could share some experience and information with me.
Thank you very much in advance,
kind regards,
RevEngRazer
Here is the link to another project I am working on, so you can estimate my skill level: