[DiscordArchive] Hey robinsch, have another question about vmt.
[DiscordArchive] Hey robinsch, have another question about vmt.
Archived author: robinsch • Posted: 2025-06-06T12:20:17.927000+00:00
Original source
It depends on the compiler
Archived author: robinsch • Posted: 2025-06-06T12:20:28.991000+00:00
Original source
MSVC generates them at 0x0
Archived author: robinsch • Posted: 2025-06-06T12:22:05.127000+00:00
Original source
so if you have class B : class A and both have virtual functions and class A member size is 8 bytes then it's:
```B
class B : class A
{
A_VMT = 0x0;
A_Members = 0x4 -> 0xC
B_VMT = 0x10
B_Members = 0x14 -> ...
}
```
Archived author: Saty • Posted: 2025-06-06T12:22:10.473000+00:00
Original source
Shoot me a DM, am still learning myself about decompilation, but am happy to try figuring stuff out
Helps me having a focus.
Archived author: robinsch • Posted: 2025-06-06T12:22:44.286000+00:00
Original source
other compilers can generate other output tho
![[Image: image.png?ex=690c9348&is=690b41c8&hm=32e...ae8dab77c&]](https://cdn.discordapp.com/attachments/1086807686571642900/1380522514941480980/image.png?ex=690c9348&is=690b41c8&hm=32e2d3624bff8abc842e54340527090220da25a49a68eac1adfa491ae8dab77c&)
Archived author: Widget • Posted: 2025-06-06T12:23:36.480000+00:00
Original source
i did some searching and found this <:Hmm:1268990114672152638>
![[Image: image.png?ex=690c9348&is=690b41c8&hm=32e...ae8dab77c&]](https://cdn.discordapp.com/attachments/1086807686571642900/1380522514941480980/image.png?ex=690c9348&is=690b41c8&hm=32e2d3624bff8abc842e54340527090220da25a49a68eac1adfa491ae8dab77c&)
Archived author: Saty • Posted: 2025-06-06T12:24:14.680000+00:00
Original source
Huh interesting... so it might be that they are in some way ordered, but it may just as well be random where the VMTs are in a particular class?
Archived author: robinsch • Posted: 2025-06-06T12:24:32.747000+00:00
Original source
no ... they are always at the "start" of the class.
Archived author: Saty • Posted: 2025-06-06T12:29:52.555000+00:00
Original source
I might not understand the (this * X) offset chenanigans yet fully...
Like for me it seems pretty random, can barely make sense of it most of the time.
Like I assume they are either variables or pointers... but the order of them is quite hard to figure out.
Archived author: Deamon • Posted: 2025-06-06T12:30:53.564000+00:00
Original source
I would treat `this+8` as another object embedded into CSimpleFrame