There is currently no way to detect damage before reduction, except if all the reductions are done by you.
The other clunky but possible way, is to centralize bonus attack and armor, ie. green values, with BonusMod library or another similar. Why? because those libraries have "GetUnitBonus" functions. Retrieving attack damage becomes white (damage functions, don't know if on heroes it accounts for primary attribute bonus damage tho, in which case you also count that stat) plus green (get bonus custom functions). In regards of armor you don't even need such mechanism, as the new get armor function returns total armor (white plus green) except in one, functional case. The method is still clunky because, if you're using the also clunky WC3 armor type system (ie. siege v/s fortified) you will need to take unto account those previous damage reduction percentages. Positive and Negative armor formulas then have to be taken unto account to get your ending damage reduction percentage. But all this armor type data is always modifable and accessible (game constants).
With all this data, attack and armor, you can safely get damage "done" (not really done). The tradeoff is that all "green" values have to use the AddUnitBonus functions. This specially terrible for auras i guess, as those are a staple among hero abilities, and you will need to trigger them yourself.
For the problem at hand, a not so ambitious way could be, 1. creating and determining an absolute fighting of a particular hero ("engaging unit"), based primarily on it's level, skills leveled and items acquired (all these easily accessible events), basically an integer attached to each unit that is engagable, and 2. determining it's relative fightning power against a particular unit. If engagable units are regular creeps that don't level or have dynamic effectiveness, then this value could be just another integer, based on the unit type id of the creep (rawcode) measured against the unit type id of the hero. A hashtable can be used here. To determine if engaging proceeds or not then relative value is substracted from the absolute fighting power of the engaging unit, ie.
1. Antonidas (rawcode of 'AAAA') has an absolute fighting power of 1000 (i would use an unit indexer here plus a regular integer array, IE. FIGHTING_POWER[GetUnitId(Antonidas)]), and starts fighting against 2 bandits.
2. Bandits (rawcode of 'BBBB') and Antonidas have a relative fighting power of 10 (Hashtable['AAAA']['BBBB'] = 10), so the overall engaging power of Antonidas, it's own relative fighting power is 980.
3. Antonidas proceeds to beat the crap out of the bandits because 980 means direct engage.
Cons: this a very mechanic way of achieving this, data heavy and arbitrary. But with experience and testing on it's side, it can be tinkered well enough.