This invention provides a
data processing method, apparatus, electronic device, and storage medium. The method involves obtaining the overridden
function table of subclasses in the
executable file of an application. The subclasses inherit from a
base class in the
executable file. The overridden
function table includes the addresses of the original functions in the
base class that need to be replaced, the class name of the
base class, and the address of the target function used to replace the original functions. The method then determines the
virtual function table of the base class, which includes the addresses of functions in the base class. The method searches for the address of the original function in the base class's
virtual function table. Finally, the address of the target function replaces the address of the original function in the base class's
virtual function table. This avoids replacing the address of a function in the virtual
function table that should not have been replaced with the address of the target function, thus preventing replacement errors and preventing the application from calling the wrong function, ultimately preventing application runtime errors.