|
@@ -2,6 +2,7 @@
|
|
|
|
|
|
import collections
|
|
|
import dataclasses
|
|
|
+import functools
|
|
|
import itertools
|
|
|
import operator
|
|
|
from typing import Iterable, NamedTuple
|
|
@@ -243,6 +244,7 @@ class VtableDisambiguator(angr.Analysis):
|
|
|
return super_vtsym
|
|
|
return self.superclass_map[vtsym][-1]
|
|
|
|
|
|
+ @functools.cache
|
|
|
def get_vfptrs_from_table(self, vtsym: Symbol) -> list[list[int]]:
|
|
|
# returns a list of addresses for each vtable present on the class
|
|
|
class VTableFunction(NamedTuple):
|
|
@@ -285,6 +287,7 @@ class VtableDisambiguator(angr.Analysis):
|
|
|
)
|
|
|
]
|
|
|
|
|
|
+ @functools.cache
|
|
|
def get_windows_vtables_from(self, vt: Symbol) -> VTable:
|
|
|
vt_parent_spans = [0]
|
|
|
for vt_parent in reversed(self.superclass_map[vt]):
|
|
@@ -329,6 +332,7 @@ class VtableDisambiguator(angr.Analysis):
|
|
|
return fnsym
|
|
|
return None
|
|
|
|
|
|
+ @functools.cache
|
|
|
def get_vtables_from_address(self, vt: Symbol) -> list[VTable]:
|
|
|
# returns a list of vtables for each vtable present on the class
|
|
|
@dataclasses.dataclass
|