in the midst of desperation spread by the darkness fraught with fear, there appeared oriflammes of knights, waving against the harsh and merciless storms
The expression in bold refers to knights or there appeared oriflammes of knights or oriflammes of knights ?
I mean, in this sentence and context ,
1.)is the action of waving related to knights as in "knights who wave against the hursh and merciless stroms" which is meaningless to me ?
2.) related to the oriflammes of knights as in oriflammes which is waving?
3.)is the mentioned expression in bold present participle which explains whole sentence it follows, meaning that oriflammes of knights appeared while waving. ?