I observe that the original question was asked in the context of endurance, not range. As I recall, endurance is not at all affected by winds. Range is. Endurance is simply what is the greatest length of time the aircraft can remain airborne, going somewhere is not a part of that, so winds are not either.
Though leaning and fuel flow will factor into the endurance time, it is the airspeed which must be determined first, as it is a greater factor. You can lean at any airspeed, and leaning will increase your endurance, but not as much as the wrong airspeed will reduce it!
I'm sure that the protracted discussion about winds and leaning is important, and informative, but is it relevent to the original question?
But then, on the other hand, I've certainly been guilty of thread drift too!
Pilot DAR