uroboros-diversification/src/analysis/reassemble_symbol_get.py
def process(self):
        """
        Traverse instruction list and insert generated S_ labels in the correct positions
        """
        do_update = lambda s,n: s if n in s else s + '\n' + n
        des1 = self.clean_sort(self.des)
        i = 0; j = 0
        while True:
            if j == len(des1) or i == len(self.locs):
                break
            # if i == len(self.locs)-1 and j == len(des1)-1:
            #    raise Exception("undefined des list")
            lh = self.locs[i]
            dh = des1[j]
            if dh == lh.loc_addr:
                lhs = 'S_' + dec_hex(lh.loc_addr)
                if ELF_utils.elf_arm() and not isinstance(self.instr_list[i][0], Types.InlineData):
                    lhs = '.thumb_func\n' + lhs
                label = do_update(lh.loc_label, lhs + ' : ')
                self.locs[i].loc_label = label
                j += 1
            elif dh < lh.loc_addr:
                i -= 1
                j += 1
            i += 1

        Traverse instruction list and insert generated S_ labels in the correct positions
        
Traverse instruction list and insert generated S_ labels in the correct positions
Traverse instruction list and insert generated S_ labels in the correct positions
def process(self):
        do_update = lambda s,n: s if n in s else s + '\n' + n
        des1 = self.clean_sort(self.des)
        i = 0; j = 0
        while True:
            if j == len(des1) or i == len(self.locs):
                break
            lh = self.locs[i]
            dh = des1[j]
            if dh == lh.loc_addr:
                lhs = 'S_' + dec_hex(lh.loc_addr)
                if ELF_utils.elf_arm() and not isinstance(self.instr_list[i][0], Types.InlineData):
                    lhs = '.thumb_func\n' + lhs
                label = do_update(lh.loc_label, lhs + ' : ')
                self.locs[i].loc_label = label
                j += 1
            elif dh < lh.loc_addr:
                i -= 1
                j += 1
            i += 1
def process ( self ) : do_update = lambda s , n : s if n in s else s + '\n' + n des1 = self . clean_sort ( self . des ) i = 0 ; j = 0 while True : if j == len ( des1 ) or i == len ( self . locs ) : break lh = self . locs [ i ] dh = des1 [ j ] if dh == lh . loc_addr : lhs = 'S_' + dec_hex ( lh . loc_addr ) if ELF_utils . elf_arm ( ) and not isinstance ( self . instr_list [ i ] [ 0 ] , Types . InlineData ) : lhs = '.thumb_func\n' + lhs label = do_update ( lh . loc_label , lhs + ' : ' ) self . locs [ i ] . loc_label = label j += 1 elif dh < lh . loc_addr : i -= 1 j += 1 i += 1
Traverse instruction list and insert generated S_ labels in the correct positions
Traverse instruction list and insert generated S_ labels in the correct positions
"""
        Traverse instruction list and insert generated S_ labels in the correct positions
        """ # if i == len(self.locs)-1 and j == len(des1)-1: #    raise Exception("undefined des list")
self