What I believe it is:
Magic Resistance = 1 - (1 - [Hero Base Magic Resistance]) * (1 - [Strength * 0.0008]) * (1 - [Any Magic Reduction Item/Ability 1]) * (1 - [Any Magic Reduction Item/Ability 2]) ... * (1 - [Any Magic Reduction Item/Ability 1 N]) * (1 + [Magic Increasing Item/Ability 1]) * (1 + [Magic Increasing Item/Ability 2]) ... * (1 + [Magic Increasing Item/Ability N])
Spell Amplification = (1 + [Intelligence * 0.0007] + [Magic Increasing Item/Ability 1] + [Magic Increasing Item/Ability 2] ... + [Magic Increasing Item/Ability N])
Damage taken in HP = Spell Damage * Spell Amplification * (1 - Magic Resistance)