It uses the target's Attack stat to calculate damage, as opposed to the user's Attack stat. The target's Attack stat modifier is incorporated into damage calculation. With the exception of the Attack stat and Attack stat modifier, all other factors affecting damage calculation, including the item, Ability, type, and status ailment of the user of Foul Play, are incorporated as normal. If the user has the ability Huge Power or Pure Power, Foul Play will be calculated with double the target's attack stat.
As this states,Foul Play uses the base attack stat of the Pokemon.So,if Aegislash is in its blade forme,it will use the base attack stat of that form,If it is in Shield Forme,it will use that forms attack stat.
Hope I helped!