Looks like just the CMP instruction values for the corresponding characters.
In order to alter this to work for Umaro instead of Gogo, all the related CMP #$0D in 'section 2 and 3' should be changed to CMP #$0E, changed in the asm file here before you patch it. The CMP #$0D, while not Gogo's ID, is one after because it is actually saying to not allow anything after character 0C... so changing these to 0E broadens the range by 1 more and gets Umaro involved then.
For changing Relm's natural magic over to Edgar, same thing, look for the section in the code that does this and change the CMP #$08 to CMP #$04.
That's all you'll have to do is edit those values to another.
In order to alter this to work for Umaro instead of Gogo, all the related CMP #$0D in 'section 2 and 3' should be changed to CMP #$0E, changed in the asm file here before you patch it. The CMP #$0D, while not Gogo's ID, is one after because it is actually saying to not allow anything after character 0C... so changing these to 0E broadens the range by 1 more and gets Umaro involved then.
For changing Relm's natural magic over to Edgar, same thing, look for the section in the code that does this and change the CMP #$08 to CMP #$04.
That's all you'll have to do is edit those values to another.