c函数hook问题

void qtregexp(sqlite3_context* ctx, int argc, sqlite3_value** argv)
{
QRegExp regex;
QString str1((const char*)sqlite3_value_text(argv[0]));
QString str2((const char*)sqlite3_value_text(argv[1]));

regex.setPattern(str1);
regex.setCaseSensitivity(Qt::CaseInsensitive);

bool b = str2.contains(regex);

if (b)
{
sqlite3_result_int(ctx, 1);
}
else
{
sqlite3_result_int(ctx, 0);
}
}

sqlite3 *sldb;
sqlite3_open(":memory:", &sldb);
Last step is a call to sqlite3_create_function, example:
sqlite3_create_function(sldb, “REGEXP”, 2, SQLITE_UTF8, NULL, &qtregexp, NULL, NULL);

上面是一个APP 中的代码例子
我们可以成功HOOK sqlite3_create_function ,然后插入代码在sqlite3_create_function前后,这是没问题的

上面的qtregexp 是不知道的,真正hook 的时候它只是一个函数地址,不知道是什么名称
但是这里我想要 HOOK qtregexp 不知道怎么实现,请各位大大解惑

论坛或微博搜索“hook sub”