Any person subject to this code who, while in the hands of the enemy in time of war, does either of the following shall be punished as a court-martial may direct:
(1) For the purpose of securing favorable treatment by his or her captors acts without proper authority in a manner contrary to law, custom, or regulation, to the detriment of others of whatever nationality held by the enemy as civilian or military prisoners.
(2) While in a position of authority over such persons maltreats them without justifiable cause.