node/lib/metasm/samples/peldr.rb
# take another PeLdr and patch its IAT with functions from our @exports (eg our explicit export hooks)
take another PeLdr and patch its IAT with functions from our @exports
take another PeLdr and patch its IAT with functions from our @exports
def intercept_iat(ldr)
		ldr.pe.imports.to_a.each { |id|
			id.imports.each { |i|
				next if not @exports.include? i.name or not @eat_cb[i.name]
				ldr.hook_import(id.libname, i.name, @eat_cb[i.name])
			}
		}
	end
def intercept_iat ( ldr ) ldr . pe . imports . to_a . each { | id | id . imports . each { | i | next if not @exports . include? i . name or not @eat_cb [ i . name ] ldr . hook_import ( id . libname , i . name , @eat_cb [ i . name ] ) } } end
take another PeLdr and patch its IAT with functions from our @exports (eg our explicit export hooks)
take another PeLdr and patch its IAT with functions from our @exports ( eg our explicit export hooks )
ldr