Shanghai gangsters grapple with lust and loyalty on the eve of war with Japan as they try to navigate an alliance with the enemy’s army.