node/lib/metasm/metasm/decompile.rb
# patches a set of exprs, replacing oldce by newce
patches a set of exprs, replacing oldce by newce
patches a set of exprs replacing oldce by newce
def ce_patch(exprs, oldce, newce)
		walk_ce(exprs) { |ce|
			case ce.op
			when :funcall
				ce.lexpr = newce if ce.lexpr == oldce
				ce.rexpr.each_with_index { |a, i| ce.rexpr[i] = newce if a == oldce }
			else
				ce.lexpr = newce if ce.lexpr == oldce
				ce.rexpr = newce if ce.rexpr == oldce
			end
		}
	end
def ce_patch ( exprs , oldce , newce ) walk_ce ( exprs ) { | ce | case ce . op when :funcall ce . lexpr = newce if ce . lexpr == oldce ce . rexpr . each_with_index { | a , i | ce . rexpr [ i ] = newce if a == oldce } else ce . lexpr = newce if ce . lexpr == oldce ce . rexpr = newce if ce . rexpr == oldce end } end
patches a set of exprs, replacing oldce by newce
patches a set of exprs replacing oldce by newce
exprs
oldce
newce