node/lib/metasm/metasm/decompile.rb
# revert the unaliasing namechange of vars where no alias subsists
revert the unaliasing namechange of vars where no alias subsists
revert the unaliasing namechange of vars where no alias subsists
def simplify_varname_noalias(scope)
		names = scope.symbol.keys
		names.delete_if { |k|
			next if not b = k[/^(.*)_a\d+$/, 1]
			next if scope.symbol[k].stackoff.to_i > 0
			if not names.find { |n| n != k and (n == b or n[/^(.*)_a\d+$/, 1] == b) }
				scope.symbol[b] = scope.symbol.delete(k)
				scope.symbol[b].name = b
			end
		}
	end
def simplify_varname_noalias ( scope ) names = scope . symbol . keys names . delete_if { | k | next if not b = k [ / ^(.*)_a \d +$ / , 1 ] next if scope . symbol [ k ] . stackoff . to_i > 0 if not names . find { | n | n != k and ( n == b or n [ / ^(.*)_a \d +$ / , 1 ] == b ) } scope . symbol [ b ] = scope . symbol . delete ( k ) scope . symbol [ b ] . name = b end } end
revert the unaliasing namechange of vars where no alias subsists
revert the unaliasing namechange of vars where no alias subsists
scope