No battle mechanic ever directly uses a Pokemon species's base stat. For example, this is the damage formula.
((2*level/5+2)*power*attack)/(50*defense)+2
In this formula, "attack" and "defense" represent the individual Pokemon's stats, after taking into account stuff like level, IVs, EVs, and natures as well as the species's base stats.
source
Foul play uses the same formula, except it uses the target's physical attack instead of the user's. It doesn't directly look at base stats. However, it does use the user's level in the damage calculation, so it will still do a lot of damage to a low-level target.
Also, I want to make sure you know that foul play damage is affected by the user's burns, abilities, and items, but affected by the target's stat modifiers from stuff like swords dance and intimidate.
source