What is this StandardFirmata_ModifiedAll code doing?

The idea behind Firmata is that you don't need to understand the sketch in order to be able to develop applications in Processing or VB or other languages that operate the Arduino as a dumb device.

I would like to understand what the code is doing so I can modify it and improve the GUI.

The code that you posted a snippet of does not display a GUI, so you are looking at the wrong code.