What is diabetes in the sense of what malfunctions?

Depends. Depends on the type. In type 1 the body makes antibodies against itself and eventually burns out and can't make insulin. In type 2 your body makes plenty of Insulin but has an inability to use it. It definatey is hereditary. In the case of type one it is a combination of the immune system and the panceeas. In type two it is more the liver pathways of utilization.