I blew every yen I had on that book.

Literal

All-money [object-を] spend-[by-て] that book [object-を] buy-[past-った].

はたく ('to spend all of, lay out, knock out') is a vivid vernacular verb — originally 'to beat, to dust off' (as in はたき, 'feather duster'). Used idiomatically for 'blowing' money on something. The te-form はたいて chains the spending to the buying: 'spent all money and bought.' Highly colloquial.