{"type": "func", "start": 8830888, "end": 8831048, "name": "BN_CTX_free", "pseudocode": "// \n// BN_CTX_free from 0x86bfa8 to 0x86c048 (160 bytes)\n// \n// 80 xrefs:\n// > sub_7E0018 @ 0x7e00e8\n// > sub_7E01E0 @ 0x7e02b0\n// > sub_7E11C4 @ 0x7e127c\n// > sub_7E255C @ 0x7e2618\n// > sub_7E28B8 @ 0x7e2a40\n// > sub_7E28B8 @ 0x7e2ac4\n// > sub_7E2D78 @ 0x7e2e24\n// > EC_GROUP_new_by_curve_name @ 0x7e8154\n// > ec_key_simple_generate_key @ 0x7e8ec4\n// > ec_key_simple_check_key @ 0x7e90a0\n// > EC_KEY_set_public_key_affine_coordinates @ 0x7e953c\n// > EC_GROUP_cmp @ 0x7eb534\n// > EC_GROUP_cmp @ 0x7eb69c\n// > ec_precompute_mont_data @ 0x7eb934\n// > ec_wNAF_mul @ 0x7ebeac\n// > ec_wNAF_mul @ 0x7ebfc0\n// > ec_wNAF_mul @ 0x7ec090\n// > ec_wNAF_mul @ 0x7ec2fc\n// > ec_wNAF_mul @ 0x7ec6c8\n// > ec_wNAF_mul @ 0x7ec730\n// > ec_wNAF_precompute_mult @ 0x7ecc38\n// > ec_wNAF_precompute_mult @ 0x7ecd50\n// > ec_wNAF_precompute_mult @ 0x7ecef8\n// > ec_wNAF_precompute_mult @ 0x7ed07c\n// > ecdh_simple_compute_key @ 0x7ed7b4\n// > ossl_ecdsa_sign_setup @ 0x7edb88\n// > ossl_ecdsa_sign_sig @ 0x7ee244\n// > ossl_ecdsa_verify_sig @ 0x7eeb68\n// > ECPKParameters_print @ 0x7ef414\n// > ec_GFp_mont_group_set_curve @ 0x7efba4\n// > sub_7F0594 @ 0x7f1480\n// > sub_7F1BA0 @ 0x7f1cb0\n// > ec_GFp_simple_set_compressed_coordinates @ 0x7f22c4\n// > ec_GFp_simple_point2oct @ 0x7f26d8\n// > ec_GFp_simple_point2oct @ 0x7f28a0\n// > ec_GFp_simple_oct2point @ 0x7f2b74\n// > ec_GFp_simple_group_get_curve @ 0x7f2f60\n// > ec_GFp_simple_get_Jprojective_coordinates_GFp @ 0x7f304c\n// > ec_GFp_simple_group_check_discriminant @ 0x7f322c\n// > ec_GFp_simple_set_Jprojective_coordinates_GFp @ 0x7f342c\n// > ec_GFp_simple_point_get_affine_coordinates @ 0x7f36e0\n// > ec_GFp_simple_dbl @ 0x7f3964\n// > ec_GFp_simple_group_set_curve @ 0x7f3f78\n// > ec_GFp_simple_cmp @ 0x7f41a4\n// > ec_GFp_simple_add @ 0x7f4518\n// > ec_GFp_simple_is_on_curve @ 0x7f49d0\n// > ec_GFp_simple_make_affine @ 0x7f4c70\n// > ec_GFp_simple_points_make_affine @ 0x7f4d64\n// > ec_GFp_simple_points_make_affine @ 0x7f4dcc\n// > RSA_setup_blinding @ 0x82d4f4\n// > sub_82E210 @ 0x82e378\n// > sub_82E5F4 @ 0x82e730\n// > sub_82E968 @ 0x82ea44\n// > sub_82EE80 @ 0x82f158\n// > SRP_Calc_server_key @ 0x8369d4\n// > SRP_Calc_B @ 0x836b0c\n// > SRP_Calc_A @ 0x836de8\n// > SRP_Calc_client_key @ 0x836f30\n// > SRP_Verify_B_mod_N @ 0x83703c\n// > SRP_create_verifier_BN @ 0x8381f0\n// > DH_check @ 0x87f5d4\n// > DH_check_pub_key @ 0x87f7cc\n// > dsa_builtin_paramgen @ 0x880934\n// > dsa_builtin_paramgen2 @ 0x880df8\n// > ec_GF2m_simple_set_compressed_coordinates @ 0x888ebc\n// > ec_GF2m_simple_point2oct @ 0x889108\n// > ec_GF2m_simple_point2oct @ 0x8892ec\n// > ec_GF2m_simple_oct2point @ 0x8895f4\n// > ec_GF2m_simple_group_check_discriminant @ 0x889b8c\n// > ec_GF2m_simple_cmp @ 0x88a038\n// > ec_GF2m_simple_make_affine @ 0x88a1a4\n// > ec_GF2m_simple_is_on_curve @ 0x88a2a0\n// > ec_GF2m_simple_add @ 0x88a6c4\n// > RSA_generate_key_ex @ 0x8bfb24\n// > BN_is_prime_fasttest_ex @ 0x8cad24\n// > BN_generate_prime_ex @ 0x8cb30c\n// > DH_generate_parameters_ex @ 0x8d0a38\n// > DSA_generate_key @ 0x8d0f28\n// > ec_GF2m_simple_mul @ 0x8d19bc\n// > <???> @ 0x60a7c\n// \n// This function is hookable on this platform!\n// \n// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings\n// \n\nvoid __fastcall BN_CTX_free(void **a1)\n{\n  _DWORD *v2; // r4\n  bool v3; // zf\n  _DWORD *v4; // r5\n  _BYTE *v5; // r0\n  void *v6; // r0\n\n  if ( a1 )\n  {\n    CRYPTO_free(a1[5], (int)\"crypto/bn/bn_ctx.c\", 247);\n    v2 = *a1;\n    v3 = *a1 == nullptr;\n    a1[5] = nullptr;\n    if ( !v3 )\n    {\n      do\n      {\n        v4 = v2 + 80;\n        do\n        {\n          v5 = v2;\n          v3 = *v2 == 0;\n          v2 += 5;\n          if ( !v3 )\n            BN_clear_free(v5);\n        }\n        while ( v2 != v4 );\n        v6 = *a1;\n        a1[1] = *((void **)*a1 + 81);\n        CRYPTO_free(v6, (int)\"crypto/bn/bn_ctx.c\", 296);\n        v2 = a1[1];\n        *a1 = v2;\n      }\n      while ( v2 );\n    }\n    CRYPTO_free(a1, (int)\"crypto/bn/bn_ctx.c\", 178);\n  }\n}", "assembly": "; \n; BN_CTX_free from 0x86bfa8 to 0x86c048 (160 bytes)\n; \n; 80 xrefs:\n; > sub_7E0018 @ 0x7e00e8\n; > sub_7E01E0 @ 0x7e02b0\n; > sub_7E11C4 @ 0x7e127c\n; > sub_7E255C @ 0x7e2618\n; > sub_7E28B8 @ 0x7e2a40\n; > sub_7E28B8 @ 0x7e2ac4\n; > sub_7E2D78 @ 0x7e2e24\n; > EC_GROUP_new_by_curve_name @ 0x7e8154\n; > ec_key_simple_generate_key @ 0x7e8ec4\n; > ec_key_simple_check_key @ 0x7e90a0\n; > EC_KEY_set_public_key_affine_coordinates @ 0x7e953c\n; > EC_GROUP_cmp @ 0x7eb534\n; > EC_GROUP_cmp @ 0x7eb69c\n; > ec_precompute_mont_data @ 0x7eb934\n; > ec_wNAF_mul @ 0x7ebeac\n; > ec_wNAF_mul @ 0x7ebfc0\n; > ec_wNAF_mul @ 0x7ec090\n; > ec_wNAF_mul @ 0x7ec2fc\n; > ec_wNAF_mul @ 0x7ec6c8\n; > ec_wNAF_mul @ 0x7ec730\n; > ec_wNAF_precompute_mult @ 0x7ecc38\n; > ec_wNAF_precompute_mult @ 0x7ecd50\n; > ec_wNAF_precompute_mult @ 0x7ecef8\n; > ec_wNAF_precompute_mult @ 0x7ed07c\n; > ecdh_simple_compute_key @ 0x7ed7b4\n; > ossl_ecdsa_sign_setup @ 0x7edb88\n; > ossl_ecdsa_sign_sig @ 0x7ee244\n; > ossl_ecdsa_verify_sig @ 0x7eeb68\n; > ECPKParameters_print @ 0x7ef414\n; > ec_GFp_mont_group_set_curve @ 0x7efba4\n; > sub_7F0594 @ 0x7f1480\n; > sub_7F1BA0 @ 0x7f1cb0\n; > ec_GFp_simple_set_compressed_coordinates @ 0x7f22c4\n; > ec_GFp_simple_point2oct @ 0x7f26d8\n; > ec_GFp_simple_point2oct @ 0x7f28a0\n; > ec_GFp_simple_oct2point @ 0x7f2b74\n; > ec_GFp_simple_group_get_curve @ 0x7f2f60\n; > ec_GFp_simple_get_Jprojective_coordinates_GFp @ 0x7f304c\n; > ec_GFp_simple_group_check_discriminant @ 0x7f322c\n; > ec_GFp_simple_set_Jprojective_coordinates_GFp @ 0x7f342c\n; > ec_GFp_simple_point_get_affine_coordinates @ 0x7f36e0\n; > ec_GFp_simple_dbl @ 0x7f3964\n; > ec_GFp_simple_group_set_curve @ 0x7f3f78\n; > ec_GFp_simple_cmp @ 0x7f41a4\n; > ec_GFp_simple_add @ 0x7f4518\n; > ec_GFp_simple_is_on_curve @ 0x7f49d0\n; > ec_GFp_simple_make_affine @ 0x7f4c70\n; > ec_GFp_simple_points_make_affine @ 0x7f4d64\n; > ec_GFp_simple_points_make_affine @ 0x7f4dcc\n; > RSA_setup_blinding @ 0x82d4f4\n; > sub_82E210 @ 0x82e378\n; > sub_82E5F4 @ 0x82e730\n; > sub_82E968 @ 0x82ea44\n; > sub_82EE80 @ 0x82f158\n; > SRP_Calc_server_key @ 0x8369d4\n; > SRP_Calc_B @ 0x836b0c\n; > SRP_Calc_A @ 0x836de8\n; > SRP_Calc_client_key @ 0x836f30\n; > SRP_Verify_B_mod_N @ 0x83703c\n; > SRP_create_verifier_BN @ 0x8381f0\n; > DH_check @ 0x87f5d4\n; > DH_check_pub_key @ 0x87f7cc\n; > dsa_builtin_paramgen @ 0x880934\n; > dsa_builtin_paramgen2 @ 0x880df8\n; > ec_GF2m_simple_set_compressed_coordinates @ 0x888ebc\n; > ec_GF2m_simple_point2oct @ 0x889108\n; > ec_GF2m_simple_point2oct @ 0x8892ec\n; > ec_GF2m_simple_oct2point @ 0x8895f4\n; > ec_GF2m_simple_group_check_discriminant @ 0x889b8c\n; > ec_GF2m_simple_cmp @ 0x88a038\n; > ec_GF2m_simple_make_affine @ 0x88a1a4\n; > ec_GF2m_simple_is_on_curve @ 0x88a2a0\n; > ec_GF2m_simple_add @ 0x88a6c4\n; > RSA_generate_key_ex @ 0x8bfb24\n; > BN_is_prime_fasttest_ex @ 0x8cad24\n; > BN_generate_prime_ex @ 0x8cb30c\n; > DH_generate_parameters_ex @ 0x8d0a38\n; > DSA_generate_key @ 0x8d0f28\n; > ec_GF2m_simple_mul @ 0x8d19bc\n; > <???> @ 0x60a7c\n; \n; This function is hookable on this platform!\n; \n; Using BromaIDA 8.0.0 @ https:;github.com/Stazzical/BromaIDA\n; Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https:;github.com/geode-sdk/bindings\n; \n\nCMP             R0, #0                                                 ; +0x0, 0x86bfa8\nBXEQ            LR                                                     ; +0x4, 0x86bfac\nPUSH            {R3-R7,LR}                                             ; +0x8, 0x86bfb0\nLDR             R7, =(aCryptoBnBnCtxC - 0x86BFC4); \"crypto/bn/bn_ctx.c\" ; +0xc, 0x86bfb4\nMOV             R6, R0                                                 ; +0x10, 0x86bfb8\nADD             R7, PC, R7; \"crypto/bn/bn_ctx.c\"                       ; +0x14, 0x86bfbc\nLDR             R0, [R0,#0x14]                                         ; +0x18, 0x86bfc0\nMOV             R1, R7                                                 ; +0x1c, 0x86bfc4\nMOV             R2, #0xF7                                              ; +0x20, 0x86bfc8\nBL              CRYPTO_free                                            ; +0x24, 0x86bfcc\nLDR             R4, [R6]                                               ; +0x28, 0x86bfd0\nMOV             R3, #0                                                 ; +0x2c, 0x86bfd4\nCMP             R4, R3                                                 ; +0x30, 0x86bfd8\nSTR             R3, [R6,#0x14]                                         ; +0x34, 0x86bfdc\nBEQ             loc_86C030                                             ; +0x38, 0x86bfe0\nADD             R5, R4, #0x140                                         ; +0x3c, 0x86bfe4\nLDR             R3, [R4]                                               ; +0x40, 0x86bfe8\nMOV             R0, R4                                                 ; +0x44, 0x86bfec\nCMP             R3, #0                                                 ; +0x48, 0x86bff0\nADD             R4, R4, #0x14                                          ; +0x4c, 0x86bff4\nBEQ             loc_86C000                                             ; +0x50, 0x86bff8\nBL              BN_clear_free                                          ; +0x54, 0x86bffc\nCMP             R4, R5                                                 ; +0x58, 0x86c000\nBNE             loc_86BFE8                                             ; +0x5c, 0x86c004\nLDR             R0, [R6]                                               ; +0x60, 0x86c008\nMOV             R1, R7                                                 ; +0x64, 0x86c00c\nLDR             R3, [R0,#0x144]                                        ; +0x68, 0x86c010\nSTR             R3, [R6,#4]                                            ; +0x6c, 0x86c014\nMOV             R2, #0x128                                             ; +0x70, 0x86c018\nBL              CRYPTO_free                                            ; +0x74, 0x86c01c\nLDR             R4, [R6,#4]                                            ; +0x78, 0x86c020\nSTR             R4, [R6]                                               ; +0x7c, 0x86c024\nCMP             R4, #0                                                 ; +0x80, 0x86c028\nBNE             loc_86BFE4                                             ; +0x84, 0x86c02c\nLDR             R1, =(aCryptoBnBnCtxC - 0x86C040); \"crypto/bn/bn_ctx.c\" ; +0x88, 0x86c030\nMOV             R0, R6                                                 ; +0x8c, 0x86c034\nADD             R1, PC, R1; \"crypto/bn/bn_ctx.c\"                       ; +0x90, 0x86c038\nMOV             R2, #0xB2                                              ; +0x94, 0x86c03c\nPOP             {R3-R7,LR}                                             ; +0x98, 0x86c040\nB               CRYPTO_free                                            ; +0x9c, 0x86c044", "xrefs": ["sub_7E0018 @ 0x7e00e8", "sub_7E01E0 @ 0x7e02b0", "sub_7E11C4 @ 0x7e127c", "sub_7E255C @ 0x7e2618", "sub_7E28B8 @ 0x7e2a40", "sub_7E28B8 @ 0x7e2ac4", "sub_7E2D78 @ 0x7e2e24", "EC_GROUP_new_by_curve_name @ 0x7e8154", "ec_key_simple_generate_key @ 0x7e8ec4", "ec_key_simple_check_key @ 0x7e90a0", "EC_KEY_set_public_key_affine_coordinates @ 0x7e953c", "EC_GROUP_cmp @ 0x7eb534", "EC_GROUP_cmp @ 0x7eb69c", "ec_precompute_mont_data @ 0x7eb934", "ec_wNAF_mul @ 0x7ebeac", "ec_wNAF_mul @ 0x7ebfc0", "ec_wNAF_mul @ 0x7ec090", "ec_wNAF_mul @ 0x7ec2fc", "ec_wNAF_mul @ 0x7ec6c8", "ec_wNAF_mul @ 0x7ec730", "ec_wNAF_precompute_mult @ 0x7ecc38", "ec_wNAF_precompute_mult @ 0x7ecd50", "ec_wNAF_precompute_mult @ 0x7ecef8", "ec_wNAF_precompute_mult @ 0x7ed07c", "ecdh_simple_compute_key @ 0x7ed7b4", "ossl_ecdsa_sign_setup @ 0x7edb88", "ossl_ecdsa_sign_sig @ 0x7ee244", "ossl_ecdsa_verify_sig @ 0x7eeb68", "ECPKParameters_print @ 0x7ef414", "ec_GFp_mont_group_set_curve @ 0x7efba4", "sub_7F0594 @ 0x7f1480", "sub_7F1BA0 @ 0x7f1cb0", "ec_GFp_simple_set_compressed_coordinates @ 0x7f22c4", "ec_GFp_simple_point2oct @ 0x7f26d8", "ec_GFp_simple_point2oct @ 0x7f28a0", "ec_GFp_simple_oct2point @ 0x7f2b74", "ec_GFp_simple_group_get_curve @ 0x7f2f60", "ec_GFp_simple_get_Jprojective_coordinates_GFp @ 0x7f304c", "ec_GFp_simple_group_check_discriminant @ 0x7f322c", "ec_GFp_simple_set_Jprojective_coordinates_GFp @ 0x7f342c", "ec_GFp_simple_point_get_affine_coordinates @ 0x7f36e0", "ec_GFp_simple_dbl @ 0x7f3964", "ec_GFp_simple_group_set_curve @ 0x7f3f78", "ec_GFp_simple_cmp @ 0x7f41a4", "ec_GFp_simple_add @ 0x7f4518", "ec_GFp_simple_is_on_curve @ 0x7f49d0", "ec_GFp_simple_make_affine @ 0x7f4c70", "ec_GFp_simple_points_make_affine @ 0x7f4d64", "ec_GFp_simple_points_make_affine @ 0x7f4dcc", "RSA_setup_blinding @ 0x82d4f4", "sub_82E210 @ 0x82e378", "sub_82E5F4 @ 0x82e730", "sub_82E968 @ 0x82ea44", "sub_82EE80 @ 0x82f158", "SRP_Calc_server_key @ 0x8369d4", "SRP_Calc_B @ 0x836b0c", "SRP_Calc_A @ 0x836de8", "SRP_Calc_client_key @ 0x836f30", "SRP_Verify_B_mod_N @ 0x83703c", "SRP_create_verifier_BN @ 0x8381f0", "DH_check @ 0x87f5d4", "DH_check_pub_key @ 0x87f7cc", "dsa_builtin_paramgen @ 0x880934", "dsa_builtin_paramgen2 @ 0x880df8", "ec_GF2m_simple_set_compressed_coordinates @ 0x888ebc", "ec_GF2m_simple_point2oct @ 0x889108", "ec_GF2m_simple_point2oct @ 0x8892ec", "ec_GF2m_simple_oct2point @ 0x8895f4", "ec_GF2m_simple_group_check_discriminant @ 0x889b8c", "ec_GF2m_simple_cmp @ 0x88a038", "ec_GF2m_simple_make_affine @ 0x88a1a4", "ec_GF2m_simple_is_on_curve @ 0x88a2a0", "ec_GF2m_simple_add @ 0x88a6c4", "RSA_generate_key_ex @ 0x8bfb24", "BN_is_prime_fasttest_ex @ 0x8cad24", "BN_generate_prime_ex @ 0x8cb30c", "DH_generate_parameters_ex @ 0x8d0a38", "DSA_generate_key @ 0x8d0f28", "ec_GF2m_simple_mul @ 0x8d19bc", "<???> @ 0x60a7c"], "is_objc": false, "is_arm32": false, "is_arm64": false, "bida_info": "8.0.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings"}