Addon who change / add some codes in existing files

Hi !

I have a modification who need to modifiy a php file in the xenforo library :)
The php file : library/XenForo/ControllerPublic/Member.php
So i want to create an addon because when i will update my xenforo the modification will be not here :(

Is it possible to create an addon who change the code without going into the php file ?
If Yes, please tell me how to do that :(