Enemy NPCs don't "pathfind" per se. When in combat, they simply translate directly towards the target position. I assume that you only deal with melee enemies
I find that the easiest way to do a reliable check, is to perform a simulation on what would happen if you attacked the enemy from the tested position. For such a simulation, each step would perform following checks:
- Is the currently simulated position equal to the target (in this case the player's) position; if so, this is not a safespot
- Is the player able to attack the currently simulated position? (Requires: Player range distance, region clipping graph & projectile masks); if so, this is a possible safespot
- Is the next position towards the target blocked in both directions? (Requires: Region clipping graph, Checking positions of other NPCs)