Not actually his "last name" (or "surname" as the translation has it). The names given here are in the Japanese order, so Kanie is his family name, and Ryosuke is his personal name. In Western order, his name would be Ryosuke Kanie.
しまった (shimatta) isn't really a swear word. It just means "oops"/"oh no"/"I failed"/"I accidentally did it". In a sense, it's the polar opposite of やった (yatta).