|
@@ -12,7 +12,6 @@ import itanium_demangler as demangler
|
|
|
from cle.backends.symbol import Symbol
|
|
|
|
|
|
from . import demangler_helpers as dh
|
|
|
-from .angr import VtableDisambiguator
|
|
|
|
|
|
if typing.TYPE_CHECKING:
|
|
|
from .validate import LinuxBinary
|
|
@@ -45,9 +44,8 @@ def reorder_vfns_windows_estimate(symbols: list[Symbol], start_pos) -> list[Symb
|
|
|
return output_symbols
|
|
|
|
|
|
|
|
|
-def get_windows_vtables_from(
|
|
|
- bin: "LinuxBinary", vtda: VtableDisambiguator, vt: Symbol
|
|
|
-) -> VTable:
|
|
|
+def get_windows_vtables_from(bin: "LinuxBinary", vt: Symbol) -> VTable:
|
|
|
+ vtda = bin.vtable_disambiguator
|
|
|
vt_typeinfo = bin.angr.loader.memory.unpack_word(vt.rebased_addr + 0x4)
|
|
|
|
|
|
vt_parent_spans = [1]
|
|
@@ -55,10 +53,10 @@ def get_windows_vtables_from(
|
|
|
vt_parent = bin.angr.loader.find_symbol(f"_ZTV{name}")
|
|
|
if not vt_parent:
|
|
|
continue
|
|
|
- vt_first, *_ = get_vtables_from_address(bin, vtda, vt_parent)
|
|
|
+ vt_first, *_ = get_vtables_from_address(bin, vt_parent)
|
|
|
vt_parent_spans.append(len(vt_first))
|
|
|
|
|
|
- vt_first, *vt_others = get_vtables_from_address(bin, vtda, vt)
|
|
|
+ vt_first, *vt_others = get_vtables_from_address(bin, vt)
|
|
|
thunk_fns = set()
|
|
|
for vt_other in vt_others:
|
|
|
for sym in vt_other:
|
|
@@ -90,9 +88,9 @@ def get_windows_vtables_from(
|
|
|
return vt_out
|
|
|
|
|
|
|
|
|
-def get_vtables_from_address(
|
|
|
- bin: "LinuxBinary", vtda: VtableDisambiguator, vt: Symbol
|
|
|
-) -> list[VTable]:
|
|
|
+def get_vtables_from_address(bin: "LinuxBinary", vt: Symbol) -> list[VTable]:
|
|
|
+ vtda = bin.vtable_disambiguator
|
|
|
+
|
|
|
# returns a list of vtables for each vtable present on the class
|
|
|
VTableFunction = collections.namedtuple("VTableFunction", "tblidx sym")
|
|
|
|