If I kill all NPCs, or simply kill the main NPCs who give me the main quests, which ending would come? Is there another ending as a genocidal leader, or are there only four endings?
If you kill all NPCs that you see or even just the main quest givers, this will lead to your infamy with the major factions going up, as your infamy with a specific faction will go up if you kill any NPC that is a member of that faction.
This will make you unable to have an ending that will side with one of these factions (see the "Beware the Wrath of Caesar!" side quest for Caesar's Legion and the "Don't Tread on the Bear" side quest for the NCR).
From the "Don't Tread on the Bear" article from The Vault wiki:
In the case of Mr. House, he can be killed, making you unable to side with him upon killing him.
This will lead to the only remaining ending available to you, the 'Independent' ending, where you will be siding with Yes Man, who cannot be killed and does not become hostile to you even if you attack him. The No Gods, No Masters quest will be the final main quest if you go for an 'Independent' ending.
From the "Yes Man" article at The Vault wiki (emphasis mine):
For the endings of specific NPCs or the minor factions, see the Fallout New Vegas endings article in the Vault wiki, and check for conditions where the NPC(s) are killed.