Almost all organisms contain lectin a tye of protein that binds to certain carbohydrates. There are many types of lectin, some completely safe, some extremely toxic. Perhaps, the most well known is ricin obtained from the castor bean c/f the story of Georgi Markov, the Bulgarian dissident writer and journalist who died after he was attacked by a man with an umbrella rigged to inject a poison ricin pellet under Markov's skin.
Drying (of any substance) removes water and other liquid properties e.g natural oils, to produce a concentrate. So a dried bean would contain a more concentated level of protein than an undried one.
One particular lectin is called phytohaemaglutinin. Phyto - of a plant; haema - blood; glutinin - effectively a sticky binding agent as in gluten. Phytohaemaglutinin causes blood cells to bind or clump together.
Phytohaemaglutinin is found in the highest concentrations in uncooked red kidney beans and white kidney beans (cannellini) and it is also found in lower quantities in many other types of green beans and other common beans, as well as broad (fava) beans.
Measured in haemagglutinating units (hau), a raw red kidney bean may contain up to 70,000 hau, but this is reduced to between 200 and 400 hau when properly cooked. White kidney beans contain about a third of those levels, green and other common beans even less. Fava beans have levels of around 5-10% compared to the red kidney bean.