changing function wp_register

Use the following filter named register:

add_filter( 'register', 'wpse_96892_register_link' );

function wpse_96892_register_link( $link )
{
    if ( is_user_logged_in() )
        return $link;

    return str_replace(
        // search
        array (
            site_url('wp-login.php?action=register', 'login'),
            __('Register')
        ),
        // replacements
        array (
            site_url('/profile'),
            __('Profile Page')
        ),
        $link
    );
}

error code: 523