Why is the subjunctive used in this sentence?

Pyrrhus, Fabricii virtutem admiratus, illi secreto quartam etiam regni sui partem obtulit si patriam desereret.

It’s the protasis of a conditional clause in indirect speech. It must be subjunctive.

Can we say: si patriam deserturus esset? I think it would be wrong but I don’t know why.

The sentence does not look like the usual form of indirect speech to me.

It’s subjunctive because it implicitly represents what Pyrrhus said to Fabricius: “I am offering you a quarter of my kingdom if you desert.” A speech act is implicit in obtulit.

I don’t think deserturus esset, representing a future indicative verb in direct speech, would necessarily be wrong, but see Allen & Greenough 468, 516.2.a, Note, and 516.2.f:

http://www.perseus.tufts.edu/hopper/text?doc=AG+468&fromdoc=Perseus%3Atext%3A1999.04.0001

http://www.perseus.tufts.edu/hopper/text?doc=AG+516&fromdoc=Perseus%3Atext%3A1999.04.0001

Is this sentence an example of what some refer to as informal indirect discourse?

Implied oratio obliqua

Ah yes, implied oratio obliqua. Thank you Constinus

“Pyrrhus, having admired the manly virtue of Fabricius, proffered to him in secret, even a fourth part of his realm, if he would desert his fatherland.”
[Note to the side: secreto is an adverbial use of an adjective to predicate an attribute to a person in the
specific context only. The text is not claiming that Fabricius is a secretive fellow as a matter of character but that he is secretive in this instance. Called by some “the adverbial use of an adjective as secondary predicate.”]

We are used to seeing the imperfect subjunctive in contrary-to-fact conditionals. However the imperfect subjunctive can also be used of a possible future event (one that could actually come to fruition) that is future to a past situation. From Allen and Greenough 516, f:
“A future conditional is frequently thrown back into past time, without implying that it is contrary to fact.” A&G give this example from Caesar:
non poterat, nisi decertare vellet
“He was not able, unless he wished to fight”.