Answer: the weird structure is of uncertain function- possibly an ant mimic, or maybe a spiny defense- and is made from a greatly enlarged pronotum, which is the plate on the thorax just behind the head. The bug’s true abdomen is visible under the wings.