- 17


; ! , ,

; ( )

; ""

lea ecx, [ebp+var_4] ; base

; this ( )

call BASE_DEMO

; ! ,

; !

lea ecx, [ebp+var_4] ; base

; this

base

call BASE_DEMO_2

; . ? !

; , ,

lea ecx, [ebp+var_4] ; base

; this

demo_3

call BASE_DEMO_3

; (. )

; ,

lea ecx, [ebp+var_8] ; derived

call GetDERIVED_VTBL ; d[0]=*DERIVED_VTBL

lea ecx, [ebp+var_8] ; derived

call DERIVED_DEMO

; ...

lea ecx, [ebp+var_8] ; derived

call DERIVED_DEMO_2

;

...

lea ecx, [ebp+var_8] ; derived

call BASE_DEMO_3_

; ! this DERIVED,

; BASE!!! , BASE

mov esp, ebp

pop ebp

retn

main endp

BASE_DEMO proc near ; CODE XREF: main+11p

; demo BASE

push offset aBase ; "BASE\n"

call printf

pop ecx

retn

BASE_DEMO endp

BASE_DEMO_2 proc near ; CODE XREF: main+19p

; demo_2 BASE

push offset aBaseDemo2 ; "BASE DEMO 2\n"

call printf

pop ecx

retn

BASE_DEMO_2 endp

BASE_DEMO_3 proc near ; CODE XREF: main+21p