Refactor some macros to ropgadget_funcs.h