Drain the soaked beans and add to a pot. Cover with 2 inches cold water and add the garlic, onions, cumin, and sprinkle with salt and pepper. Leave to a simmer until the beans are tender and the liquid has turned into a thick sauce, 1 1/2 to 2 hours.
Melt the butter in a skillet and pour in the beans. Mash the beans (leave some texture) and cook over a medium heat, 3 or 4 minutes.