Detection of malicious scripting code through discriminant and adversary-aware API analysis