uroboros-diversification/src/analysis/share_lib_helper.py
def v_exp(self, e):
        """
        Check if PC relative expression and transform using labels
        :param e: expression
        :return: transformed expression if matching, original one otherwise
        """
        if isinstance(e, (Types.BinOP_PLUS, Types.BinOP_MINUS)):
            r1, addr = e
            if r1.upper() in self.curr_regs:
                addr = -addr if isinstance(e, Types.BinOP_MINUS) else addr
                des = self.gotaddr + addr
                s = self.check_sec(des)
                if s is not None:
                    self.label.append(des)
                    return Types.Label('S_' + dec_hex(des))
        return e

        Check if PC relative expression and transform using labels
        :param e: expression
        :return: transformed expression if matching, original one otherwise
        
Check if PC relative expression and transform using labels
Check if PC relative expression and transform using labels
def v_exp(self, e):
        if isinstance(e, (Types.BinOP_PLUS, Types.BinOP_MINUS)):
            r1, addr = e
            if r1.upper() in self.curr_regs:
                addr = -addr if isinstance(e, Types.BinOP_MINUS) else addr
                des = self.gotaddr + addr
                s = self.check_sec(des)
                if s is not None:
                    self.label.append(des)
                    return Types.Label('S_' + dec_hex(des))
        return e
def v_exp ( self , e ) : if isinstance ( e , ( Types . BinOP_PLUS , Types . BinOP_MINUS ) ) : r1 , addr = e if r1 . upper ( ) in self . curr_regs : addr = - addr if isinstance ( e , Types . BinOP_MINUS ) else addr des = self . gotaddr + addr s = self . check_sec ( des ) if s is not None : self . label . append ( des ) return Types . Label ( 'S_' + dec_hex ( des ) ) return e
Check if PC relative expression and transform using labels
Check if PC relative expression and transform using labels
"""
        Check if PC relative expression and transform using labels
        :param e: expression
        :return: transformed expression if matching, original one otherwise
        """
transformed expression if matching, original one otherwise
transformed expression if matching original one otherwise
self
e
None