for the past couple of weeks i was reversing a certain class to made some changes to it
well you know the changes has been working but yet bugged but that wasn't a problem while you dig deep into the class methods
while i was digging deep i stopped on special case of implementing some kind of an associative container as a class member holds 2 types of pointers in which i guess a sorted way[key, value], well we will get into it but let me first clarify some facts so you can get the picture in your mind by looking to this block of code
- the class member at offset 0x0374 which i assume it's std::n_map, why map not a hash_map dude? because the very following member at offset 0x380 was an inceamental int represents a ResObjId (AKA GDR_xxxx) of a CGWnd and that int member is the last member of this class so by subtract them it gives me the size of that weird member which is 0xC, well this could be either map or set, let's move on
- v9 should be the iterator but here it comes the weird thing, the offsets the follows it which in turn calls a vft methods as you might figured out, those functions as in there offsets are MoveGWnd *** dammit

- so MoveGWnd called from 2 different pointers as the size following the iterator(v9 + 16, v9 + 20), okay what is that could mean? well it could mean we have a paired key[index, ptr] && a paired mapped value [ptr, index]
- Okay sounds good where's the problem then? well i'll tell you, you see that check with v12, that's what i assumed it's the UINT8 index of this CGWnd which is v9 + 25? wait! what? 25? if it's a paired mapped value then it should be 24 not 25, yes i agree, so i maybe newbie or didn't see enough use case of maps, but i didn't see such this kind of sorted maps, i can't even tell it's a 2d maps cause it will need two loops
so did you guys experienced such case before?






