- 7


loc_0_401019: ; CODE XREF: main+15j

mov edx, [eax]

;

mov ecx, eax

jmp dword ptr [edx]

main endp

GetDERIVED_VTBL proc near ; CODE XREF: main+10p

push esi

mov esi, ecx

; ECX this

call SetPointToPure

; __purecall

; -

;

mov dword ptr [esi], offset DERIVED_VTBL

;

; , ( __purecall)

mov eax, esi

pop esi

retn

GetDERIVED_VTBL endp

DERIVED_DEMO proc near ; DATA XREF: .rdata:004050A8o

push offset aDerived ; "DERIVED\n"

call printf

pop ecx

retn

DERIVED_DEMO endp

SetPointToPure proc near ; CODE XREF: GetDERIVED_VTBL+3p

mov eax, ecx

mov dword ptr [eax], offset PureFunc

; [EAX] ( )

; - __purecall,

; -

; , __purecall ""

; ,

retn

SetPointToPure endp

DERIVED_VTBL dd offset DERIVED_DEMO ; DATA XREF: GetDERIVED_VTBL+8o

PureFunc dd offset __purecall ; DATA XREF: SetPointToPure+2o

; - __purecall. ,

;

27

:: . .