static void unhook_drbg(RAND_DRBG *drbg)
{
    HOOK_CTX *ctx = get_hook_ctx(drbg);
    drbg->get_entropy = ctx->get_entropy;
    CRYPTO_free_ex_data(CRYPTO_EX_INDEX_DRBG, drbg, &drbg->ex_data);
}
['static void unhook_drbg(RAND_DRBG *drbg)\n{\n    HOOK_CTX *ctx = get_hook_ctx(drbg);\n    drbg->get_entropy = ctx->get_entropy;\n    CRYPTO_free_ex_data(CRYPTO_EX_INDEX_DRBG, drbg, &drbg->ex_data);\n}', 'static HOOK_CTX *get_hook_ctx(RAND_DRBG *drbg)\n{\n    return (HOOK_CTX *)RAND_DRBG_get_ex_data(drbg, app_data_index);\n}', 'void *RAND_DRBG_get_ex_data(const RAND_DRBG *drbg, int idx)\n{\n    return CRYPTO_get_ex_data(&drbg->ex_data, idx);\n}', 'void *CRYPTO_get_ex_data(const CRYPTO_EX_DATA *ad, int idx)\n{\n    if (ad->sk == NULL || idx >= sk_void_num(ad->sk))\n        return NULL;\n    return sk_void_value(ad->sk, idx);\n}']