{"type": "func", "start": 17381864, "end": 17382052, "name": "BN_CTX_free", "pseudocode": "// \n// BN_CTX_free from 0x10939e8 to 0x1093aa4 (188 bytes)\n// \n// 85 xrefs:\n// > sub_1005B4C @ 0x1005c14\n// > sub_1005CF0 @ 0x1005db4\n// > sub_1005CF0 @ 0x1005e54\n// > sub_1005CF0 @ 0x1005e88\n// > sub_1006DA8 @ 0x1006e64\n// > sub_1008178 @ 0x1008244\n// > sub_1008488 @ 0x10085ec\n// > sub_1008488 @ 0x1008680\n// > sub_10088DC @ 0x100897c\n// > EC_GROUP_new_by_curve_name @ 0x100d5fc\n// > ec_key_simple_generate_key @ 0x100e210\n// > ec_key_simple_check_key @ 0x100e3d8\n// > EC_KEY_set_public_key_affine_coordinates @ 0x100e800\n// > EC_GROUP_cmp @ 0x10106ac\n// > EC_GROUP_cmp @ 0x1010800\n// > ec_precompute_mont_data @ 0x1010a80\n// > ec_precompute_mont_data @ 0x1010aac\n// > ec_precompute_mont_data @ 0x1010acc\n// > ec_wNAF_mul @ 0x1011048\n// > ec_wNAF_mul @ 0x1011188\n// > ec_wNAF_mul @ 0x1011240\n// > ec_wNAF_mul @ 0x101143c\n// > ec_wNAF_mul @ 0x10119dc\n// > ec_wNAF_mul @ 0x1011a4c\n// > ec_wNAF_precompute_mult @ 0x1011bf4\n// > ec_wNAF_precompute_mult @ 0x1011d24\n// > ec_wNAF_precompute_mult @ 0x1011e94\n// > ec_wNAF_precompute_mult @ 0x1011f64\n// > ec_wNAF_precompute_mult @ 0x1012014\n// > ecdh_simple_compute_key @ 0x10126f8\n// > ossl_ecdsa_sign_setup @ 0x1012a90\n// > ossl_ecdsa_sign_sig @ 0x10130a4\n// > ossl_ecdsa_verify_sig @ 0x10138b0\n// > ECPKParameters_print @ 0x1014074\n// > ec_GFp_mont_group_set_curve @ 0x101478c\n// > sub_10150E8 @ 0x1015e70\n// > sub_10163C0 @ 0x10164b4\n// > ec_GFp_simple_set_compressed_coordinates @ 0x10169a8\n// > ec_GFp_simple_point2oct @ 0x1016d64\n// > ec_GFp_simple_point2oct @ 0x1016f68\n// > ec_GFp_simple_oct2point @ 0x1017288\n// > ec_GFp_simple_group_get_curve @ 0x1017640\n// > ec_GFp_simple_get_Jprojective_coordinates_GFp @ 0x1017730\n// > ec_GFp_simple_group_check_discriminant @ 0x10178fc\n// > ec_GFp_simple_set_Jprojective_coordinates_GFp @ 0x1017ae0\n// > ec_GFp_simple_point_get_affine_coordinates @ 0x1017ce4\n// > ec_GFp_simple_dbl @ 0x1017fc8\n// > ec_GFp_simple_group_set_curve @ 0x1018574\n// > ec_GFp_simple_cmp @ 0x10187b0\n// > ec_GFp_simple_add @ 0x1018ab4\n// > ec_GFp_simple_is_on_curve @ 0x1018f68\n// > ec_GFp_simple_make_affine @ 0x10191dc\n// > ec_GFp_simple_points_make_affine @ 0x10192cc\n// > ec_GFp_simple_points_make_affine @ 0x1019348\n// > RSA_setup_blinding @ 0x1051dc4\n// > sub_1052B04 @ 0x1052c84\n// > sub_1052E9C @ 0x1052ffc\n// > sub_1053210 @ 0x1053308\n// > sub_10536BC @ 0x1053860\n// > SRP_Calc_server_key @ 0x105c920\n// > SRP_Calc_B @ 0x105ca68\n// > SRP_Calc_A @ 0x105cd4c\n// > SRP_Calc_client_key @ 0x105ce38\n// > SRP_Verify_B_mod_N @ 0x105cfac\n// > SRP_create_verifier_BN @ 0x105e46c\n// > DH_check @ 0x10a7b40\n// > DH_check_pub_key @ 0x10a7d44\n// > dsa_builtin_paramgen @ 0x10a8ebc\n// > dsa_builtin_paramgen2 @ 0x10a9604\n// > ec_GF2m_simple_set_compressed_coordinates @ 0x10b09d0\n// > ec_GF2m_simple_point2oct @ 0x10b0c1c\n// > ec_GF2m_simple_point2oct @ 0x10b0e24\n// > ec_GF2m_simple_oct2point @ 0x10b1194\n// > ec_GF2m_simple_group_check_discriminant @ 0x10b1724\n// > ec_GF2m_simple_cmp @ 0x10b1c10\n// > ec_GF2m_simple_make_affine @ 0x10b1dc0\n// > ec_GF2m_simple_is_on_curve @ 0x10b1ebc\n// > ec_GF2m_simple_add @ 0x10b22a8\n// > RSA_generate_key_ex @ 0x10e8b4c\n// > BN_is_prime_fasttest_ex @ 0x10f5210\n// > BN_generate_prime_ex @ 0x10f57e8\n// > DH_generate_parameters_ex @ 0x10fa658\n// > DSA_generate_key @ 0x10fab44\n// > ec_GF2m_simple_mul @ 0x10fb564\n// > <???> @ 0x5e180\n// \n// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!\n// \n// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n// Generated at Fri, 27 Nov 2026 13:17:22 +0000\n// \n\nvoid __fastcall BN_CTX_free(void **a1)\n{\n  __int64 *v2; // x19\n  __int64 *v3; // x20\n  __int64 v4; // x2\n  __int64 *v5; // x0\n  void *v6; // x0\n\n  if ( a1 )\n  {\n    CRYPTO_free(a1[4], (__int64)\"crypto/bn/bn_ctx.c\", 247);\n    v2 = (__int64 *)*a1;\n    for ( a1[4] = nullptr; v2; *a1 = v2 )\n    {\n      v3 = v2 + 48;\n      do\n      {\n        v4 = *v2;\n        v5 = v2;\n        v2 += 3;\n        if ( v4 )\n          BN_clear_free(v5);\n      }\n      while ( v2 != v3 );\n      v6 = *a1;\n      a1[1] = *((void **)*a1 + 49);\n      CRYPTO_free(v6, (__int64)\"crypto/bn/bn_ctx.c\", 296);\n      v2 = (__int64 *)a1[1];\n    }\n    CRYPTO_free(a1, (__int64)\"crypto/bn/bn_ctx.c\", 178);\n  }\n}", "assembly": "; \n; BN_CTX_free from 0x10939e8 to 0x1093aa4 (188 bytes)\n; \n; 85 xrefs:\n; > sub_1005B4C @ 0x1005c14\n; > sub_1005CF0 @ 0x1005db4\n; > sub_1005CF0 @ 0x1005e54\n; > sub_1005CF0 @ 0x1005e88\n; > sub_1006DA8 @ 0x1006e64\n; > sub_1008178 @ 0x1008244\n; > sub_1008488 @ 0x10085ec\n; > sub_1008488 @ 0x1008680\n; > sub_10088DC @ 0x100897c\n; > EC_GROUP_new_by_curve_name @ 0x100d5fc\n; > ec_key_simple_generate_key @ 0x100e210\n; > ec_key_simple_check_key @ 0x100e3d8\n; > EC_KEY_set_public_key_affine_coordinates @ 0x100e800\n; > EC_GROUP_cmp @ 0x10106ac\n; > EC_GROUP_cmp @ 0x1010800\n; > ec_precompute_mont_data @ 0x1010a80\n; > ec_precompute_mont_data @ 0x1010aac\n; > ec_precompute_mont_data @ 0x1010acc\n; > ec_wNAF_mul @ 0x1011048\n; > ec_wNAF_mul @ 0x1011188\n; > ec_wNAF_mul @ 0x1011240\n; > ec_wNAF_mul @ 0x101143c\n; > ec_wNAF_mul @ 0x10119dc\n; > ec_wNAF_mul @ 0x1011a4c\n; > ec_wNAF_precompute_mult @ 0x1011bf4\n; > ec_wNAF_precompute_mult @ 0x1011d24\n; > ec_wNAF_precompute_mult @ 0x1011e94\n; > ec_wNAF_precompute_mult @ 0x1011f64\n; > ec_wNAF_precompute_mult @ 0x1012014\n; > ecdh_simple_compute_key @ 0x10126f8\n; > ossl_ecdsa_sign_setup @ 0x1012a90\n; > ossl_ecdsa_sign_sig @ 0x10130a4\n; > ossl_ecdsa_verify_sig @ 0x10138b0\n; > ECPKParameters_print @ 0x1014074\n; > ec_GFp_mont_group_set_curve @ 0x101478c\n; > sub_10150E8 @ 0x1015e70\n; > sub_10163C0 @ 0x10164b4\n; > ec_GFp_simple_set_compressed_coordinates @ 0x10169a8\n; > ec_GFp_simple_point2oct @ 0x1016d64\n; > ec_GFp_simple_point2oct @ 0x1016f68\n; > ec_GFp_simple_oct2point @ 0x1017288\n; > ec_GFp_simple_group_get_curve @ 0x1017640\n; > ec_GFp_simple_get_Jprojective_coordinates_GFp @ 0x1017730\n; > ec_GFp_simple_group_check_discriminant @ 0x10178fc\n; > ec_GFp_simple_set_Jprojective_coordinates_GFp @ 0x1017ae0\n; > ec_GFp_simple_point_get_affine_coordinates @ 0x1017ce4\n; > ec_GFp_simple_dbl @ 0x1017fc8\n; > ec_GFp_simple_group_set_curve @ 0x1018574\n; > ec_GFp_simple_cmp @ 0x10187b0\n; > ec_GFp_simple_add @ 0x1018ab4\n; > ec_GFp_simple_is_on_curve @ 0x1018f68\n; > ec_GFp_simple_make_affine @ 0x10191dc\n; > ec_GFp_simple_points_make_affine @ 0x10192cc\n; > ec_GFp_simple_points_make_affine @ 0x1019348\n; > RSA_setup_blinding @ 0x1051dc4\n; > sub_1052B04 @ 0x1052c84\n; > sub_1052E9C @ 0x1052ffc\n; > sub_1053210 @ 0x1053308\n; > sub_10536BC @ 0x1053860\n; > SRP_Calc_server_key @ 0x105c920\n; > SRP_Calc_B @ 0x105ca68\n; > SRP_Calc_A @ 0x105cd4c\n; > SRP_Calc_client_key @ 0x105ce38\n; > SRP_Verify_B_mod_N @ 0x105cfac\n; > SRP_create_verifier_BN @ 0x105e46c\n; > DH_check @ 0x10a7b40\n; > DH_check_pub_key @ 0x10a7d44\n; > dsa_builtin_paramgen @ 0x10a8ebc\n; > dsa_builtin_paramgen2 @ 0x10a9604\n; > ec_GF2m_simple_set_compressed_coordinates @ 0x10b09d0\n; > ec_GF2m_simple_point2oct @ 0x10b0c1c\n; > ec_GF2m_simple_point2oct @ 0x10b0e24\n; > ec_GF2m_simple_oct2point @ 0x10b1194\n; > ec_GF2m_simple_group_check_discriminant @ 0x10b1724\n; > ec_GF2m_simple_cmp @ 0x10b1c10\n; > ec_GF2m_simple_make_affine @ 0x10b1dc0\n; > ec_GF2m_simple_is_on_curve @ 0x10b1ebc\n; > ec_GF2m_simple_add @ 0x10b22a8\n; > RSA_generate_key_ex @ 0x10e8b4c\n; > BN_is_prime_fasttest_ex @ 0x10f5210\n; > BN_generate_prime_ex @ 0x10f57e8\n; > DH_generate_parameters_ex @ 0x10fa658\n; > DSA_generate_key @ 0x10fab44\n; > ec_GF2m_simple_mul @ 0x10fb564\n; > <???> @ 0x5e180\n; \n; This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!\n; \n; Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n; Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n; Generated at Fri, 27 Nov 2026 13:17:22 +0000\n; \nSTP             X29, X30, [SP,#var_40]!                                ; +0x0, 0x10939e8\nMOV             X29, SP                                                ; +0x4, 0x10939ec\nSTP             X19, X20, [SP,#0x40+var_30]                            ; +0x8, 0x10939f0\nSTP             X21, X22, [SP,#0x40+var_20]                            ; +0xc, 0x10939f4\nSTR             X23, [SP,#0x40+var_10]                                 ; +0x10, 0x10939f8\nCBZ             X0, loc_1093A90                                        ; +0x14, 0x10939fc\nMOV             X21, X0                                                ; +0x18, 0x1093a00\nADRP            X23, #aCryptoBnBnCtxC@PAGE; \"crypto/bn/bn_ctx.c\"       ; +0x1c, 0x1093a04\nLDR             X0, [X0,#0x20]                                         ; +0x20, 0x1093a08\nADD             X1, X23, #aCryptoBnBnCtxC@PAGEOFF; \"crypto/bn/bn_ctx.c\" ; +0x24, 0x1093a0c\nMOV             W2, #0xF7                                              ; +0x28, 0x1093a10\nMOV             X22, X1                                                ; +0x2c, 0x1093a14\nBL              CRYPTO_free                                            ; +0x30, 0x1093a18\nLDR             X19, [X21]                                             ; +0x34, 0x1093a1c\nSTR             XZR, [X21,#0x20]                                       ; +0x38, 0x1093a20\nCBZ             X19, loc_1093A70                                       ; +0x3c, 0x1093a24\nADD             X20, X19, #0x180                                       ; +0x40, 0x1093a28\nLDR             X2, [X19]                                              ; +0x44, 0x1093a2c\nMOV             X0, X19                                                ; +0x48, 0x1093a30\nADD             X19, X19, #0x18                                        ; +0x4c, 0x1093a34\nCBZ             X2, loc_1093A40                                        ; +0x50, 0x1093a38\nBL              BN_clear_free                                          ; +0x54, 0x1093a3c\nCMP             X19, X20                                               ; +0x58, 0x1093a40\nB.NE            loc_1093A2C                                            ; +0x5c, 0x1093a44\nLDR             X3, [X21]                                              ; +0x60, 0x1093a48\nMOV             X1, X22                                                ; +0x64, 0x1093a4c\nMOV             W2, #0x128                                             ; +0x68, 0x1093a50\nMOV             X0, X3                                                 ; +0x6c, 0x1093a54\nLDR             X3, [X3,#0x188]                                        ; +0x70, 0x1093a58\nSTR             X3, [X21,#8]                                           ; +0x74, 0x1093a5c\nBL              CRYPTO_free                                            ; +0x78, 0x1093a60\nLDR             X19, [X21,#8]                                          ; +0x7c, 0x1093a64\nSTR             X19, [X21]                                             ; +0x80, 0x1093a68\nCBNZ            X19, loc_1093A28                                       ; +0x84, 0x1093a6c\nMOV             X0, X21                                                ; +0x88, 0x1093a70\nADD             X1, X23, #aCryptoBnBnCtxC@PAGEOFF; \"crypto/bn/bn_ctx.c\" ; +0x8c, 0x1093a74\nLDP             X19, X20, [SP,#0x40+var_30]                            ; +0x90, 0x1093a78\nLDP             X21, X22, [SP,#0x40+var_20]                            ; +0x94, 0x1093a7c\nLDR             X23, [SP,#0x40+var_10]                                 ; +0x98, 0x1093a80\nMOV             W2, #0xB2                                              ; +0x9c, 0x1093a84\nLDP             X29, X30, [SP+0x40+var_40],#0x40                       ; +0xa0, 0x1093a88\nB               CRYPTO_free                                            ; +0xa4, 0x1093a8c\nLDP             X19, X20, [SP,#0x40+var_30]                            ; +0xa8, 0x1093a90\nLDP             X21, X22, [SP,#0x40+var_20]                            ; +0xac, 0x1093a94\nLDR             X23, [SP,#0x40+var_10]                                 ; +0xb0, 0x1093a98\nLDP             X29, X30, [SP+0x40+var_40],#0x40                       ; +0xb4, 0x1093a9c\nRET                                                                    ; +0xb8, 0x1093aa0", "xrefs": ["sub_1005B4C @ 0x1005c14", "sub_1005CF0 @ 0x1005db4", "sub_1005CF0 @ 0x1005e54", "sub_1005CF0 @ 0x1005e88", "sub_1006DA8 @ 0x1006e64", "sub_1008178 @ 0x1008244", "sub_1008488 @ 0x10085ec", "sub_1008488 @ 0x1008680", "sub_10088DC @ 0x100897c", "EC_GROUP_new_by_curve_name @ 0x100d5fc", "ec_key_simple_generate_key @ 0x100e210", "ec_key_simple_check_key @ 0x100e3d8", "EC_KEY_set_public_key_affine_coordinates @ 0x100e800", "EC_GROUP_cmp @ 0x10106ac", "EC_GROUP_cmp @ 0x1010800", "ec_precompute_mont_data @ 0x1010a80", "ec_precompute_mont_data @ 0x1010aac", "ec_precompute_mont_data @ 0x1010acc", "ec_wNAF_mul @ 0x1011048", "ec_wNAF_mul @ 0x1011188", "ec_wNAF_mul @ 0x1011240", "ec_wNAF_mul @ 0x101143c", "ec_wNAF_mul @ 0x10119dc", "ec_wNAF_mul @ 0x1011a4c", "ec_wNAF_precompute_mult @ 0x1011bf4", "ec_wNAF_precompute_mult @ 0x1011d24", "ec_wNAF_precompute_mult @ 0x1011e94", "ec_wNAF_precompute_mult @ 0x1011f64", "ec_wNAF_precompute_mult @ 0x1012014", "ecdh_simple_compute_key @ 0x10126f8", "ossl_ecdsa_sign_setup @ 0x1012a90", "ossl_ecdsa_sign_sig @ 0x10130a4", "ossl_ecdsa_verify_sig @ 0x10138b0", "ECPKParameters_print @ 0x1014074", "ec_GFp_mont_group_set_curve @ 0x101478c", "sub_10150E8 @ 0x1015e70", "sub_10163C0 @ 0x10164b4", "ec_GFp_simple_set_compressed_coordinates @ 0x10169a8", "ec_GFp_simple_point2oct @ 0x1016d64", "ec_GFp_simple_point2oct @ 0x1016f68", "ec_GFp_simple_oct2point @ 0x1017288", "ec_GFp_simple_group_get_curve @ 0x1017640", "ec_GFp_simple_get_Jprojective_coordinates_GFp @ 0x1017730", "ec_GFp_simple_group_check_discriminant @ 0x10178fc", "ec_GFp_simple_set_Jprojective_coordinates_GFp @ 0x1017ae0", "ec_GFp_simple_point_get_affine_coordinates @ 0x1017ce4", "ec_GFp_simple_dbl @ 0x1017fc8", "ec_GFp_simple_group_set_curve @ 0x1018574", "ec_GFp_simple_cmp @ 0x10187b0", "ec_GFp_simple_add @ 0x1018ab4", "ec_GFp_simple_is_on_curve @ 0x1018f68", "ec_GFp_simple_make_affine @ 0x10191dc", "ec_GFp_simple_points_make_affine @ 0x10192cc", "ec_GFp_simple_points_make_affine @ 0x1019348", "RSA_setup_blinding @ 0x1051dc4", "sub_1052B04 @ 0x1052c84", "sub_1052E9C @ 0x1052ffc", "sub_1053210 @ 0x1053308", "sub_10536BC @ 0x1053860", "SRP_Calc_server_key @ 0x105c920", "SRP_Calc_B @ 0x105ca68", "SRP_Calc_A @ 0x105cd4c", "SRP_Calc_client_key @ 0x105ce38", "SRP_Verify_B_mod_N @ 0x105cfac", "SRP_create_verifier_BN @ 0x105e46c", "DH_check @ 0x10a7b40", "DH_check_pub_key @ 0x10a7d44", "dsa_builtin_paramgen @ 0x10a8ebc", "dsa_builtin_paramgen2 @ 0x10a9604", "ec_GF2m_simple_set_compressed_coordinates @ 0x10b09d0", "ec_GF2m_simple_point2oct @ 0x10b0c1c", "ec_GF2m_simple_point2oct @ 0x10b0e24", "ec_GF2m_simple_oct2point @ 0x10b1194", "ec_GF2m_simple_group_check_discriminant @ 0x10b1724", "ec_GF2m_simple_cmp @ 0x10b1c10", "ec_GF2m_simple_make_affine @ 0x10b1dc0", "ec_GF2m_simple_is_on_curve @ 0x10b1ebc", "ec_GF2m_simple_add @ 0x10b22a8", "RSA_generate_key_ex @ 0x10e8b4c", "BN_is_prime_fasttest_ex @ 0x10f5210", "BN_generate_prime_ex @ 0x10f57e8", "DH_generate_parameters_ex @ 0x10fa658", "DSA_generate_key @ 0x10fab44", "ec_GF2m_simple_mul @ 0x10fb564", "<???> @ 0x5e180"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "arm", "bida_info": "8.3.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings"}