[DiscordArchive] Hey robinsch, have another question about vmt.
[DiscordArchive] Hey robinsch, have another question about vmt.
Archived author: Deamon • Posted: 2025-06-06T12:32:30.021000+00:00
Original source
`virtual table`'s intent is to have same class behave differently depending on what class has inherited this base class.
It's achieved by rewriting the `virtual table` pointer, which usually is at `0x0` offset of the class
Archived author: Deamon • Posted: 2025-06-06T12:33:27.880000+00:00
Original source
`virtual table` from descendent class would be similar to `base class` except the functions it overriden
Archived author: robinsch • Posted: 2025-06-06T12:33:43.718000+00:00
Original source
but we have multiple inheritance
Archived author: robinsch • Posted: 2025-06-06T12:33:52.644000+00:00
Original source
therefore there can be multiple vtables
Archived author: robinsch • Posted: 2025-06-06T12:34:16.549000+00:00
Original source
and thats exactly what you are seeing in `CSimpleFrame`
Archived author: Deamon • Posted: 2025-06-06T12:35:35.045000+00:00
Original source
Multimple inheritance is the same as having two objects as class fields
![[Image: image.png?ex=690c9653&is=690b44d3&hm=41f...357311975&]](https://cdn.discordapp.com/attachments/1086807686571642900/1380525780697616415/image.png?ex=690c9653&is=690b44d3&hm=41f6ebbce950805a67e7370f6df04943e3c8ff379624f4632cfa356357311975&)
![[Image: image.png?ex=690c9653&is=690b44d3&hm=7b5...ab3ca144a&]](https://cdn.discordapp.com/attachments/1086807686571642900/1380525781150863481/image.png?ex=690c9653&is=690b44d3&hm=7b5917fef86255aa2899982a29a53b13421b1807da736cdfe78b94cab3ca144a&)
Archived author: Deamon • Posted: 2025-06-06T12:36:35.122000+00:00
Original source
Anyway, from schlumpf's idb for WoD:
![[Image: image.png?ex=690c9653&is=690b44d3&hm=41f...357311975&]](https://cdn.discordapp.com/attachments/1086807686571642900/1380525780697616415/image.png?ex=690c9653&is=690b44d3&hm=41f6ebbce950805a67e7370f6df04943e3c8ff379624f4632cfa356357311975&)
![[Image: image.png?ex=690c9653&is=690b44d3&hm=7b5...ab3ca144a&]](https://cdn.discordapp.com/attachments/1086807686571642900/1380525781150863481/image.png?ex=690c9653&is=690b44d3&hm=7b5917fef86255aa2899982a29a53b13421b1807da736cdfe78b94cab3ca144a&)
![[Image: image.png?ex=690c9676&is=690b44f6&hm=981...df9e40bb7&]](https://cdn.discordapp.com/attachments/1086807686571642900/1380525927326547969/image.png?ex=690c9676&is=690b44f6&hm=981ed10f09028415be4de777b35555f8147a7b9ef5165dee3e786cedf9e40bb7&)
Archived author: Deamon • Posted: 2025-06-06T12:37:09.993000+00:00
Original source
![[Image: image.png?ex=690c9676&is=690b44f6&hm=981...df9e40bb7&]](https://cdn.discordapp.com/attachments/1086807686571642900/1380525927326547969/image.png?ex=690c9676&is=690b44f6&hm=981ed10f09028415be4de777b35555f8147a7b9ef5165dee3e786cedf9e40bb7&)
Archived author: robinsch • Posted: 2025-06-06T12:40:39.449000+00:00
Original source
for memory layout you can do it if you generate the vmt in IDA structs; but for reimplemtation you should not do that
Archived author: Deamon • Posted: 2025-06-06T12:42:50.907000+00:00
Original source
fair