That form is used by the core user/editadvanced.php, so you could approach things as follows:
- create a (local) plugin with your new/modified editadvanced_form class
- override the core user/editadvanced.php by using custom script injection (see https://docs.moodle.org/dev/Local_plugins#Custom_script_injection)
- call the new/modified editadvanced_form class from the custom user/editadvanced.php
More generally, it would probably be helpful to take a look at https://docs.moodle.org/dev/Local_plugins