def _obtain_physical_offset(ctx): _pe = pe or ctx._params.pe _mem_off = mem_off(ctx) if callable(mem_off) else mem_off phy_off = pefileutils.obtain_physical_offset(_mem_off, pe=_pe) if phy_off is None: raise ConstructError('Unable to decode virtual address') return phy_off
def _obtain_physical_offset(ctx): _pe = pe or _get_pe(ctx) _mem_off = mem_off(ctx) if callable(mem_off) else mem_off phy_off = pefileutils.obtain_physical_offset(_mem_off, pe=_pe) if phy_off is None: raise ConstructError('Unable to decode virtual address') return phy_off
def _decode(self, obj, context, path): pe = self._pe or context._params.pe address = pefileutils.obtain_physical_offset(obj, pe=pe) if address is None: raise ConstructError('Unable to decode virtual address.') return address
def _decode(self, obj, context): pe = self._pe or _get_pe(context) address = pefileutils.obtain_physical_offset(obj, pe=pe) if address is None: raise ConstructError('Unable to decode virtual address.') return address