{"type": "func", "start": 11013472, "end": 11013600, "name": "BN_CTX_end", "pseudocode": "// \n// BN_CTX_end from 0xa80d60 to 0xa80de0 (128 bytes)\n// \n// 94 xrefs:\n// > BN_mod_mul_montgomery @ 0x9ea194\n// > BN_from_montgomery @ 0x9ea28c\n// > BN_MONT_CTX_set @ 0x9ea494\n// > BN_mul @ 0x9ebcbc\n// > BN_sqr @ 0x9ed22c\n// > sub_9F4C18 @ 0x9f4ce0\n// > EC_KEY_set_public_key_affine_coordinates @ 0x9fe134\n// > EC_GROUP_cmp @ 0xa0012c\n// > EC_GROUP_cmp @ 0xa00294\n// > ec_wNAF_precompute_mult @ 0xa01830\n// > ec_wNAF_precompute_mult @ 0xa01948\n// > ec_wNAF_precompute_mult @ 0xa01c70\n// > ecdh_simple_compute_key @ 0xa023ac\n// > ossl_ecdsa_verify_sig @ 0xa03760\n// > sub_A05194 @ 0xa06074\n// > sub_A067A0 @ 0xa068a8\n// > ec_GFp_simple_set_compressed_coordinates @ 0xa06ebc\n// > ec_GFp_simple_point2oct @ 0xa07464\n// > ec_GFp_simple_point2oct @ 0xa07500\n// > ec_GFp_simple_oct2point @ 0xa0776c\n// > ec_GFp_simple_group_check_discriminant @ 0xa07e24\n// > ec_GFp_simple_point_get_affine_coordinates @ 0xa082d8\n// > ec_GFp_simple_dbl @ 0xa0855c\n// > ec_GFp_simple_group_set_curve @ 0xa08b70\n// > ec_GFp_simple_cmp @ 0xa08d9c\n// > ec_GFp_simple_add @ 0xa09090\n// > ec_GFp_simple_add @ 0xa09110\n// > ec_GFp_simple_is_on_curve @ 0xa095c8\n// > ec_GFp_simple_make_affine @ 0xa09868\n// > ec_GFp_simple_points_make_affine @ 0xa0995c\n// > ec_GFp_simple_points_make_affine @ 0xa099c4\n// > RSA_setup_blinding @ 0xa420e4\n// > RSA_setup_blinding @ 0xa42224\n// > RSA_setup_blinding @ 0xa422f0\n// > sub_A429B0 @ 0xa42d5c\n// > sub_A42E10 @ 0xa42fc4\n// > sub_A431F4 @ 0xa43378\n// > sub_A43568 @ 0xa4363c\n// > sub_A43A80 @ 0xa43d50\n// > BN_div @ 0xa81054\n// > BN_div @ 0xa81428\n// > BN_exp @ 0xa8184c\n// > BN_mod_exp_recp @ 0xa81a44\n// > BN_mod_exp_mont_consttime @ 0xa81f2c\n// > BN_mod_exp_mont @ 0xa825fc\n// > BN_mod_exp_mont_word @ 0xa82d34\n// > BN_mod_exp_simple @ 0xa82fe8\n// > BN_mod_exp2_mont @ 0xa83690\n// > BN_gcd @ 0xa83b64\n// > int_bn_mod_inverse @ 0xa83f4c\n// > BN_kronecker @ 0xa84ba4\n// > BN_kronecker @ 0xa84d78\n// > BN_mod_mul @ 0xa84fbc\n// > BN_reciprocal @ 0xa85f3c\n// > BN_div_recp @ 0xa85fc4\n// > BN_div_recp @ 0xa86138\n// > BN_mod_mul_reciprocal @ 0xa86234\n// > BN_mod_sqrt @ 0xa8635c\n// > DH_check @ 0xa941cc\n// > DH_check_pub_key @ 0xa943c4\n// > dsa_builtin_paramgen @ 0xa9552c\n// > dsa_builtin_paramgen2 @ 0xa959f0\n// > ec_GF2m_simple_set_compressed_coordinates @ 0xa9dab4\n// > ec_GF2m_simple_point2oct @ 0xa9deb0\n// > ec_GF2m_simple_point2oct @ 0xa9df4c\n// > ec_GF2m_simple_oct2point @ 0xa9e1ec\n// > ec_GF2m_simple_group_check_discriminant @ 0xa9e784\n// > ec_GF2m_simple_cmp @ 0xa9ec30\n// > ec_GF2m_simple_make_affine @ 0xa9ed9c\n// > ec_GF2m_simple_is_on_curve @ 0xa9ee98\n// > ec_GF2m_simple_add @ 0xa9f2bc\n// > RSA_generate_key_ex @ 0xad4af4\n// > BN_GF2m_mod_sqr_arr @ 0xade5ec\n// > BN_GF2m_mod_mul_arr @ 0xade79c\n// > BN_GF2m_mod_exp_arr @ 0xade83c\n// > BN_GF2m_mod_sqrt_arr @ 0xade960\n// > BN_GF2m_mod_solve_quad_arr @ 0xadea18\n// > BN_GF2m_mod_inv @ 0xadef00\n// > BN_GF2m_mod_div @ 0xadf398\n// > BN_GF2m_mod_inv_arr @ 0xadf7d8\n// > BN_GF2m_mod_div_arr @ 0xadf84c\n// > BN_is_prime_fasttest_ex @ 0xadfa48\n// > bn_probable_prime_dh_coprime @ 0xadfeb0\n// > bn_probable_prime_dh @ 0xadffcc\n// > BN_generate_prime_ex @ 0xae02bc\n// > BN_generate_prime_ex @ 0xae02dc\n// > BN_generate_prime_ex @ 0xae075c\n// > DH_generate_parameters_ex @ 0xae5a30\n// > sub_AE6010 @ 0xae613c\n// > sub_AE6010 @ 0xae6304\n// > sub_AE6010 @ 0xae6404\n// > sub_AE6010 @ 0xae651c\n// > sub_AE6010 @ 0xae6920\n// > <???> @ 0x797bc\n// \n// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!\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 12:08:49 +0000\n// \n\n_DWORD *__fastcall BN_CTX_end(_DWORD *result)\n{\n  int v1; // r3\n  int v2; // r1\n  int v3; // r3\n  unsigned int v4; // r2\n  unsigned int v5; // r12\n  int v6; // r3\n  unsigned int v7; // r2\n  int v8; // r1\n  int v9; // r3\n  bool v10; // zf\n\n  v1 = result[9];\n  if ( v1 )\n  {\n    result[9] = v1 - 1;\n  }\n  else\n  {\n    v2 = result[5];\n    v3 = result[6] - 1;\n    result[6] = v3;\n    v4 = result[8];\n    v5 = *(_DWORD *)(v2 + 4 * v3);\n    if ( v4 > v5 )\n    {\n      v6 = result[3];\n      v7 = v4 - v5;\n      v8 = v6 - v7;\n      result[3] = v6 - v7;\n      v9 = ((_BYTE)v6 - 1) & 0xF;\n      while ( v7-- != 0 )\n      {\n        v10 = v9 == 0;\n        if ( !v9 )\n          v8 = result[1];\n        --v9;\n        if ( v10 )\n        {\n          v8 = *(_DWORD *)(v8 + 320);\n          v9 = 15;\n          result[1] = v8;\n        }\n      }\n    }\n    result[8] = v5;\n    result[10] = 0;\n  }\n  return result;\n}", "assembly": "; \n; BN_CTX_end from 0xa80d60 to 0xa80de0 (128 bytes)\n; \n; 94 xrefs:\n; > BN_mod_mul_montgomery @ 0x9ea194\n; > BN_from_montgomery @ 0x9ea28c\n; > BN_MONT_CTX_set @ 0x9ea494\n; > BN_mul @ 0x9ebcbc\n; > BN_sqr @ 0x9ed22c\n; > sub_9F4C18 @ 0x9f4ce0\n; > EC_KEY_set_public_key_affine_coordinates @ 0x9fe134\n; > EC_GROUP_cmp @ 0xa0012c\n; > EC_GROUP_cmp @ 0xa00294\n; > ec_wNAF_precompute_mult @ 0xa01830\n; > ec_wNAF_precompute_mult @ 0xa01948\n; > ec_wNAF_precompute_mult @ 0xa01c70\n; > ecdh_simple_compute_key @ 0xa023ac\n; > ossl_ecdsa_verify_sig @ 0xa03760\n; > sub_A05194 @ 0xa06074\n; > sub_A067A0 @ 0xa068a8\n; > ec_GFp_simple_set_compressed_coordinates @ 0xa06ebc\n; > ec_GFp_simple_point2oct @ 0xa07464\n; > ec_GFp_simple_point2oct @ 0xa07500\n; > ec_GFp_simple_oct2point @ 0xa0776c\n; > ec_GFp_simple_group_check_discriminant @ 0xa07e24\n; > ec_GFp_simple_point_get_affine_coordinates @ 0xa082d8\n; > ec_GFp_simple_dbl @ 0xa0855c\n; > ec_GFp_simple_group_set_curve @ 0xa08b70\n; > ec_GFp_simple_cmp @ 0xa08d9c\n; > ec_GFp_simple_add @ 0xa09090\n; > ec_GFp_simple_add @ 0xa09110\n; > ec_GFp_simple_is_on_curve @ 0xa095c8\n; > ec_GFp_simple_make_affine @ 0xa09868\n; > ec_GFp_simple_points_make_affine @ 0xa0995c\n; > ec_GFp_simple_points_make_affine @ 0xa099c4\n; > RSA_setup_blinding @ 0xa420e4\n; > RSA_setup_blinding @ 0xa42224\n; > RSA_setup_blinding @ 0xa422f0\n; > sub_A429B0 @ 0xa42d5c\n; > sub_A42E10 @ 0xa42fc4\n; > sub_A431F4 @ 0xa43378\n; > sub_A43568 @ 0xa4363c\n; > sub_A43A80 @ 0xa43d50\n; > BN_div @ 0xa81054\n; > BN_div @ 0xa81428\n; > BN_exp @ 0xa8184c\n; > BN_mod_exp_recp @ 0xa81a44\n; > BN_mod_exp_mont_consttime @ 0xa81f2c\n; > BN_mod_exp_mont @ 0xa825fc\n; > BN_mod_exp_mont_word @ 0xa82d34\n; > BN_mod_exp_simple @ 0xa82fe8\n; > BN_mod_exp2_mont @ 0xa83690\n; > BN_gcd @ 0xa83b64\n; > int_bn_mod_inverse @ 0xa83f4c\n; > BN_kronecker @ 0xa84ba4\n; > BN_kronecker @ 0xa84d78\n; > BN_mod_mul @ 0xa84fbc\n; > BN_reciprocal @ 0xa85f3c\n; > BN_div_recp @ 0xa85fc4\n; > BN_div_recp @ 0xa86138\n; > BN_mod_mul_reciprocal @ 0xa86234\n; > BN_mod_sqrt @ 0xa8635c\n; > DH_check @ 0xa941cc\n; > DH_check_pub_key @ 0xa943c4\n; > dsa_builtin_paramgen @ 0xa9552c\n; > dsa_builtin_paramgen2 @ 0xa959f0\n; > ec_GF2m_simple_set_compressed_coordinates @ 0xa9dab4\n; > ec_GF2m_simple_point2oct @ 0xa9deb0\n; > ec_GF2m_simple_point2oct @ 0xa9df4c\n; > ec_GF2m_simple_oct2point @ 0xa9e1ec\n; > ec_GF2m_simple_group_check_discriminant @ 0xa9e784\n; > ec_GF2m_simple_cmp @ 0xa9ec30\n; > ec_GF2m_simple_make_affine @ 0xa9ed9c\n; > ec_GF2m_simple_is_on_curve @ 0xa9ee98\n; > ec_GF2m_simple_add @ 0xa9f2bc\n; > RSA_generate_key_ex @ 0xad4af4\n; > BN_GF2m_mod_sqr_arr @ 0xade5ec\n; > BN_GF2m_mod_mul_arr @ 0xade79c\n; > BN_GF2m_mod_exp_arr @ 0xade83c\n; > BN_GF2m_mod_sqrt_arr @ 0xade960\n; > BN_GF2m_mod_solve_quad_arr @ 0xadea18\n; > BN_GF2m_mod_inv @ 0xadef00\n; > BN_GF2m_mod_div @ 0xadf398\n; > BN_GF2m_mod_inv_arr @ 0xadf7d8\n; > BN_GF2m_mod_div_arr @ 0xadf84c\n; > BN_is_prime_fasttest_ex @ 0xadfa48\n; > bn_probable_prime_dh_coprime @ 0xadfeb0\n; > bn_probable_prime_dh @ 0xadffcc\n; > BN_generate_prime_ex @ 0xae02bc\n; > BN_generate_prime_ex @ 0xae02dc\n; > BN_generate_prime_ex @ 0xae075c\n; > DH_generate_parameters_ex @ 0xae5a30\n; > sub_AE6010 @ 0xae613c\n; > sub_AE6010 @ 0xae6304\n; > sub_AE6010 @ 0xae6404\n; > sub_AE6010 @ 0xae651c\n; > sub_AE6010 @ 0xae6920\n; > <???> @ 0x797bc\n; \n; This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!\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 12:08:49 +0000\n; \nLDR             R3, [R0,#0x24]                                         ; +0x0, 0xa80d60\nCMP             R3, #0                                                 ; +0x4, 0xa80d64\nSUBNE           R3, R3, #1                                             ; +0x8, 0xa80d68\nSTRNE           R3, [R0,#0x24]                                         ; +0xc, 0xa80d6c\nBXNE            LR                                                     ; +0x10, 0xa80d70\nLDR             R3, [R0,#0x18]                                         ; +0x14, 0xa80d74\nLDR             R1, [R0,#0x14]                                         ; +0x18, 0xa80d78\nSUB             R3, R3, #1                                             ; +0x1c, 0xa80d7c\nSTR             R3, [R0,#0x18]                                         ; +0x20, 0xa80d80\nLDR             R2, [R0,#0x20]                                         ; +0x24, 0xa80d84\nLDR             R12, [R1,R3,LSL#2]                                     ; +0x28, 0xa80d88\nCMP             R2, R12                                                ; +0x2c, 0xa80d8c\nBLS             loc_A80DD0                                             ; +0x30, 0xa80d90\nLDR             R3, [R0,#0xC]                                          ; +0x34, 0xa80d94\nRSB             R2, R12, R2                                            ; +0x38, 0xa80d98\nRSB             R1, R2, R3                                             ; +0x3c, 0xa80d9c\nSUB             R3, R3, #1                                             ; +0x40, 0xa80da0\nSTR             R1, [R0,#0xC]                                          ; +0x44, 0xa80da4\nAND             R3, R3, #0xF                                           ; +0x48, 0xa80da8\nB               loc_A80DC8                                             ; +0x4c, 0xa80dac\nCMP             R3, #0                                                 ; +0x50, 0xa80db0\nLDREQ           R1, [R0,#4]                                            ; +0x54, 0xa80db4\nSUB             R3, R3, #1                                             ; +0x58, 0xa80db8\nLDREQ           R1, [R1,#0x140]                                        ; +0x5c, 0xa80dbc\nMOVEQ           R3, #0xF                                               ; +0x60, 0xa80dc0\nSTREQ           R1, [R0,#4]                                            ; +0x64, 0xa80dc4\nSUBS            R2, R2, #1                                             ; +0x68, 0xa80dc8\nBCS             loc_A80DB0                                             ; +0x6c, 0xa80dcc\nMOV             R3, #0                                                 ; +0x70, 0xa80dd0\nSTR             R12, [R0,#0x20]                                        ; +0x74, 0xa80dd4\nSTR             R3, [R0,#0x28]                                         ; +0x78, 0xa80dd8\nBX              LR                                                     ; +0x7c, 0xa80ddc", "xrefs": ["BN_mod_mul_montgomery @ 0x9ea194", "BN_from_montgomery @ 0x9ea28c", "BN_MONT_CTX_set @ 0x9ea494", "BN_mul @ 0x9ebcbc", "BN_sqr @ 0x9ed22c", "sub_9F4C18 @ 0x9f4ce0", "EC_KEY_set_public_key_affine_coordinates @ 0x9fe134", "EC_GROUP_cmp @ 0xa0012c", "EC_GROUP_cmp @ 0xa00294", "ec_wNAF_precompute_mult @ 0xa01830", "ec_wNAF_precompute_mult @ 0xa01948", "ec_wNAF_precompute_mult @ 0xa01c70", "ecdh_simple_compute_key @ 0xa023ac", "ossl_ecdsa_verify_sig @ 0xa03760", "sub_A05194 @ 0xa06074", "sub_A067A0 @ 0xa068a8", "ec_GFp_simple_set_compressed_coordinates @ 0xa06ebc", "ec_GFp_simple_point2oct @ 0xa07464", "ec_GFp_simple_point2oct @ 0xa07500", "ec_GFp_simple_oct2point @ 0xa0776c", "ec_GFp_simple_group_check_discriminant @ 0xa07e24", "ec_GFp_simple_point_get_affine_coordinates @ 0xa082d8", "ec_GFp_simple_dbl @ 0xa0855c", "ec_GFp_simple_group_set_curve @ 0xa08b70", "ec_GFp_simple_cmp @ 0xa08d9c", "ec_GFp_simple_add @ 0xa09090", "ec_GFp_simple_add @ 0xa09110", "ec_GFp_simple_is_on_curve @ 0xa095c8", "ec_GFp_simple_make_affine @ 0xa09868", "ec_GFp_simple_points_make_affine @ 0xa0995c", "ec_GFp_simple_points_make_affine @ 0xa099c4", "RSA_setup_blinding @ 0xa420e4", "RSA_setup_blinding @ 0xa42224", "RSA_setup_blinding @ 0xa422f0", "sub_A429B0 @ 0xa42d5c", "sub_A42E10 @ 0xa42fc4", "sub_A431F4 @ 0xa43378", "sub_A43568 @ 0xa4363c", "sub_A43A80 @ 0xa43d50", "BN_div @ 0xa81054", "BN_div @ 0xa81428", "BN_exp @ 0xa8184c", "BN_mod_exp_recp @ 0xa81a44", "BN_mod_exp_mont_consttime @ 0xa81f2c", "BN_mod_exp_mont @ 0xa825fc", "BN_mod_exp_mont_word @ 0xa82d34", "BN_mod_exp_simple @ 0xa82fe8", "BN_mod_exp2_mont @ 0xa83690", "BN_gcd @ 0xa83b64", "int_bn_mod_inverse @ 0xa83f4c", "BN_kronecker @ 0xa84ba4", "BN_kronecker @ 0xa84d78", "BN_mod_mul @ 0xa84fbc", "BN_reciprocal @ 0xa85f3c", "BN_div_recp @ 0xa85fc4", "BN_div_recp @ 0xa86138", "BN_mod_mul_reciprocal @ 0xa86234", "BN_mod_sqrt @ 0xa8635c", "DH_check @ 0xa941cc", "DH_check_pub_key @ 0xa943c4", "dsa_builtin_paramgen @ 0xa9552c", "dsa_builtin_paramgen2 @ 0xa959f0", "ec_GF2m_simple_set_compressed_coordinates @ 0xa9dab4", "ec_GF2m_simple_point2oct @ 0xa9deb0", "ec_GF2m_simple_point2oct @ 0xa9df4c", "ec_GF2m_simple_oct2point @ 0xa9e1ec", "ec_GF2m_simple_group_check_discriminant @ 0xa9e784", "ec_GF2m_simple_cmp @ 0xa9ec30", "ec_GF2m_simple_make_affine @ 0xa9ed9c", "ec_GF2m_simple_is_on_curve @ 0xa9ee98", "ec_GF2m_simple_add @ 0xa9f2bc", "RSA_generate_key_ex @ 0xad4af4", "BN_GF2m_mod_sqr_arr @ 0xade5ec", "BN_GF2m_mod_mul_arr @ 0xade79c", "BN_GF2m_mod_exp_arr @ 0xade83c", "BN_GF2m_mod_sqrt_arr @ 0xade960", "BN_GF2m_mod_solve_quad_arr @ 0xadea18", "BN_GF2m_mod_inv @ 0xadef00", "BN_GF2m_mod_div @ 0xadf398", "BN_GF2m_mod_inv_arr @ 0xadf7d8", "BN_GF2m_mod_div_arr @ 0xadf84c", "BN_is_prime_fasttest_ex @ 0xadfa48", "bn_probable_prime_dh_coprime @ 0xadfeb0", "bn_probable_prime_dh @ 0xadffcc", "BN_generate_prime_ex @ 0xae02bc", "BN_generate_prime_ex @ 0xae02dc", "BN_generate_prime_ex @ 0xae075c", "DH_generate_parameters_ex @ 0xae5a30", "sub_AE6010 @ 0xae613c", "sub_AE6010 @ 0xae6304", "sub_AE6010 @ 0xae6404", "sub_AE6010 @ 0xae651c", "sub_AE6010 @ 0xae6920", "<???> @ 0x797bc"], "is_objc": false, "is_32_bit": true, "is_64_bit": false, "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"}