{"type": "func", "start": 11013200, "end": 11013456, "name": "BN_CTX_start", "pseudocode": "// \n// BN_CTX_start from 0xa80c50 to 0xa80d50 (256 bytes)\n// \n// 82 xrefs:\n// > BN_mod_mul_montgomery @ 0x9ea158\n// > BN_from_montgomery @ 0x9ea250\n// > BN_MONT_CTX_set @ 0x9ea390\n// > BN_mul @ 0x9ebb6c\n// > BN_sqr @ 0x9ed1fc\n// > sub_9F4C18 @ 0x9f4c4c\n// > EC_KEY_set_public_key_affine_coordinates @ 0x9fe0c4\n// > EC_GROUP_cmp @ 0xa000a8\n// > ec_wNAF_precompute_mult @ 0xa017e0\n// > ecdh_simple_compute_key @ 0xa0224c\n// > ossl_ecdsa_verify_sig @ 0xa036dc\n// > sub_A05194 @ 0xa052a8\n// > sub_A067A0 @ 0xa06830\n// > ec_GFp_simple_set_compressed_coordinates @ 0xa06e5c\n// > ec_GFp_simple_point2oct @ 0xa07394\n// > ec_GFp_simple_oct2point @ 0xa076f4\n// > ec_GFp_simple_group_check_discriminant @ 0xa07dac\n// > ec_GFp_simple_point_get_affine_coordinates @ 0xa081ac\n// > ec_GFp_simple_dbl @ 0xa084e4\n// > ec_GFp_simple_group_set_curve @ 0xa08a30\n// > ec_GFp_simple_cmp @ 0xa08c90\n// > ec_GFp_simple_add @ 0xa08f6c\n// > ec_GFp_simple_is_on_curve @ 0xa09540\n// > ec_GFp_simple_make_affine @ 0xa09820\n// > ec_GFp_simple_points_make_affine @ 0xa09928\n// > RSA_setup_blinding @ 0xa4205c\n// > RSA_setup_blinding @ 0xa421d4\n// > sub_A429B0 @ 0xa429cc\n// > sub_A42E10 @ 0xa42e68\n// > sub_A431F4 @ 0xa4324c\n// > sub_A43568 @ 0xa4358c\n// > sub_A43A80 @ 0xa43aa4\n// > BN_div @ 0xa80ffc\n// > BN_exp @ 0xa81818\n// > BN_mod_exp_recp @ 0xa819b8\n// > BN_mod_exp_mont_consttime @ 0xa81db4\n// > BN_mod_exp_mont @ 0xa8249c\n// > BN_mod_exp_mont_word @ 0xa82a80\n// > BN_mod_exp_simple @ 0xa82f90\n// > BN_mod_exp2_mont @ 0xa83370\n// > BN_gcd @ 0xa83b2c\n// > int_bn_mod_inverse @ 0xa83d40\n// > int_bn_mod_inverse @ 0xa83f94\n// > BN_kronecker @ 0xa84b6c\n// > BN_mod_mul @ 0xa84f68\n// > BN_reciprocal @ 0xa85ef4\n// > BN_div_recp @ 0xa85f70\n// > BN_mod_mul_reciprocal @ 0xa861d4\n// > BN_mod_sqrt @ 0xa86380\n// > DH_check @ 0xa94110\n// > DH_check_pub_key @ 0xa94398\n// > dsa_builtin_paramgen @ 0xa94f04\n// > dsa_builtin_paramgen2 @ 0xa958b0\n// > ec_GF2m_simple_set_compressed_coordinates @ 0xa9da54\n// > ec_GF2m_simple_point2oct @ 0xa9ddc4\n// > ec_GF2m_simple_oct2point @ 0xa9e168\n// > ec_GF2m_simple_group_check_discriminant @ 0xa9e754\n// > ec_GF2m_simple_cmp @ 0xa9ebcc\n// > ec_GF2m_simple_make_affine @ 0xa9ed54\n// > ec_GF2m_simple_is_on_curve @ 0xa9ee5c\n// > ec_GF2m_simple_add @ 0xa9efe8\n// > RSA_generate_key_ex @ 0xad4984\n// > BN_GF2m_mod_sqr_arr @ 0xade4e4\n// > BN_GF2m_mod_mul_arr @ 0xade630\n// > BN_GF2m_mod_exp_arr @ 0xade80c\n// > BN_GF2m_mod_sqrt_arr @ 0xade930\n// > BN_GF2m_mod_solve_quad_arr @ 0xade9cc\n// > BN_GF2m_mod_inv @ 0xadee88\n// > BN_GF2m_mod_div @ 0xadf364\n// > BN_GF2m_mod_inv_arr @ 0xadf7a8\n// > BN_GF2m_mod_div_arr @ 0xadf81c\n// > BN_is_prime_fasttest_ex @ 0xadf9b4\n// > bn_probable_prime_dh_coprime @ 0xadfe1c\n// > bn_probable_prime_dh @ 0xadff94\n// > BN_generate_prime_ex @ 0xae01f0\n// > BN_generate_prime_ex @ 0xae0278\n// > DH_generate_parameters_ex @ 0xae58e0\n// > sub_AE6010 @ 0xae60a0\n// > sub_AE6010 @ 0xae62a4\n// > sub_AE6010 @ 0xae640c\n// > sub_AE6010 @ 0xae6674\n// > <???> @ 0x7978c\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\nvoid __fastcall BN_CTX_start(int a1)\n{\n  unsigned int v1; // r8\n  int v2; // r3\n  int v3; // r3\n  int v5; // r5\n  _DWORD *v6; // r1\n  void *v7; // r0\n  _DWORD *v8; // r0\n  _DWORD *v9; // r7\n  int v10; // r2\n\n  v2 = *(_DWORD *)(a1 + 36);\n  if ( v2 || *(_DWORD *)(a1 + 40) )\n  {\n    *(_DWORD *)(a1 + 36) = v2 + 1;\n    return;\n  }\n  v3 = *(_DWORD *)(a1 + 24);\n  v5 = *(_DWORD *)(a1 + 32);\n  if ( v3 != *(_DWORD *)(a1 + 28) )\n  {\n    v6 = *(_DWORD **)(a1 + 20);\nLABEL_6:\n    *(_DWORD *)(a1 + 24) = v3 + 1;\n    v6[v3] = v5;\n    return;\n  }\n  if ( v3 )\n  {\n    v1 = (unsigned int)(3 * v3) >> 1;\n    v7 = (void *)(4 * v1);\n  }\n  else\n  {\n    v7 = &dword_80;\n  }\n  if ( !v3 )\n    v1 = 32;\n  v8 = CRYPTO_malloc(v7, (int)\"crypto/bn/bn_ctx.c\", 258);\n  v9 = v8;\n  if ( v8 )\n  {\n    v10 = *(_DWORD *)(a1 + 24);\n    if ( v10 )\n      memcpy(v8, *(const void **)(a1 + 20), 4 * v10);\n    CRYPTO_free(*(void **)(a1 + 20), (int)\"crypto/bn/bn_ctx.c\", 263);\n    v3 = *(_DWORD *)(a1 + 24);\n    v6 = v9;\n    *(_DWORD *)(a1 + 20) = v9;\n    *(_DWORD *)(a1 + 28) = v1;\n    goto LABEL_6;\n  }\n  ERR_put_error(3, 129, 109, (int)\"crypto/bn/bn_ctx.c\", 189);\n  ++*(_DWORD *)(a1 + 36);\n}", "assembly": "; \n; BN_CTX_start from 0xa80c50 to 0xa80d50 (256 bytes)\n; \n; 82 xrefs:\n; > BN_mod_mul_montgomery @ 0x9ea158\n; > BN_from_montgomery @ 0x9ea250\n; > BN_MONT_CTX_set @ 0x9ea390\n; > BN_mul @ 0x9ebb6c\n; > BN_sqr @ 0x9ed1fc\n; > sub_9F4C18 @ 0x9f4c4c\n; > EC_KEY_set_public_key_affine_coordinates @ 0x9fe0c4\n; > EC_GROUP_cmp @ 0xa000a8\n; > ec_wNAF_precompute_mult @ 0xa017e0\n; > ecdh_simple_compute_key @ 0xa0224c\n; > ossl_ecdsa_verify_sig @ 0xa036dc\n; > sub_A05194 @ 0xa052a8\n; > sub_A067A0 @ 0xa06830\n; > ec_GFp_simple_set_compressed_coordinates @ 0xa06e5c\n; > ec_GFp_simple_point2oct @ 0xa07394\n; > ec_GFp_simple_oct2point @ 0xa076f4\n; > ec_GFp_simple_group_check_discriminant @ 0xa07dac\n; > ec_GFp_simple_point_get_affine_coordinates @ 0xa081ac\n; > ec_GFp_simple_dbl @ 0xa084e4\n; > ec_GFp_simple_group_set_curve @ 0xa08a30\n; > ec_GFp_simple_cmp @ 0xa08c90\n; > ec_GFp_simple_add @ 0xa08f6c\n; > ec_GFp_simple_is_on_curve @ 0xa09540\n; > ec_GFp_simple_make_affine @ 0xa09820\n; > ec_GFp_simple_points_make_affine @ 0xa09928\n; > RSA_setup_blinding @ 0xa4205c\n; > RSA_setup_blinding @ 0xa421d4\n; > sub_A429B0 @ 0xa429cc\n; > sub_A42E10 @ 0xa42e68\n; > sub_A431F4 @ 0xa4324c\n; > sub_A43568 @ 0xa4358c\n; > sub_A43A80 @ 0xa43aa4\n; > BN_div @ 0xa80ffc\n; > BN_exp @ 0xa81818\n; > BN_mod_exp_recp @ 0xa819b8\n; > BN_mod_exp_mont_consttime @ 0xa81db4\n; > BN_mod_exp_mont @ 0xa8249c\n; > BN_mod_exp_mont_word @ 0xa82a80\n; > BN_mod_exp_simple @ 0xa82f90\n; > BN_mod_exp2_mont @ 0xa83370\n; > BN_gcd @ 0xa83b2c\n; > int_bn_mod_inverse @ 0xa83d40\n; > int_bn_mod_inverse @ 0xa83f94\n; > BN_kronecker @ 0xa84b6c\n; > BN_mod_mul @ 0xa84f68\n; > BN_reciprocal @ 0xa85ef4\n; > BN_div_recp @ 0xa85f70\n; > BN_mod_mul_reciprocal @ 0xa861d4\n; > BN_mod_sqrt @ 0xa86380\n; > DH_check @ 0xa94110\n; > DH_check_pub_key @ 0xa94398\n; > dsa_builtin_paramgen @ 0xa94f04\n; > dsa_builtin_paramgen2 @ 0xa958b0\n; > ec_GF2m_simple_set_compressed_coordinates @ 0xa9da54\n; > ec_GF2m_simple_point2oct @ 0xa9ddc4\n; > ec_GF2m_simple_oct2point @ 0xa9e168\n; > ec_GF2m_simple_group_check_discriminant @ 0xa9e754\n; > ec_GF2m_simple_cmp @ 0xa9ebcc\n; > ec_GF2m_simple_make_affine @ 0xa9ed54\n; > ec_GF2m_simple_is_on_curve @ 0xa9ee5c\n; > ec_GF2m_simple_add @ 0xa9efe8\n; > RSA_generate_key_ex @ 0xad4984\n; > BN_GF2m_mod_sqr_arr @ 0xade4e4\n; > BN_GF2m_mod_mul_arr @ 0xade630\n; > BN_GF2m_mod_exp_arr @ 0xade80c\n; > BN_GF2m_mod_sqrt_arr @ 0xade930\n; > BN_GF2m_mod_solve_quad_arr @ 0xade9cc\n; > BN_GF2m_mod_inv @ 0xadee88\n; > BN_GF2m_mod_div @ 0xadf364\n; > BN_GF2m_mod_inv_arr @ 0xadf7a8\n; > BN_GF2m_mod_div_arr @ 0xadf81c\n; > BN_is_prime_fasttest_ex @ 0xadf9b4\n; > bn_probable_prime_dh_coprime @ 0xadfe1c\n; > bn_probable_prime_dh @ 0xadff94\n; > BN_generate_prime_ex @ 0xae01f0\n; > BN_generate_prime_ex @ 0xae0278\n; > DH_generate_parameters_ex @ 0xae58e0\n; > sub_AE6010 @ 0xae60a0\n; > sub_AE6010 @ 0xae62a4\n; > sub_AE6010 @ 0xae640c\n; > sub_AE6010 @ 0xae6674\n; > <???> @ 0x7978c\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, 0xa80c50\nCMP             R3, #0                                                 ; +0x4, 0xa80c54\nBNE             loc_A80C68                                             ; +0x8, 0xa80c58\nLDR             R2, [R0,#0x28]                                         ; +0xc, 0xa80c5c\nCMP             R2, #0                                                 ; +0x10, 0xa80c60\nBEQ             loc_A80C74                                             ; +0x14, 0xa80c64\nADD             R3, R3, #1                                             ; +0x18, 0xa80c68\nSTR             R3, [R0,#0x24]                                         ; +0x1c, 0xa80c6c\nBX              LR                                                     ; +0x20, 0xa80c70\nLDR             R3, [R0,#0x18]                                         ; +0x24, 0xa80c74\nLDR             R2, [R0,#0x1C]                                         ; +0x28, 0xa80c78\nPUSH            {R4-R8,LR}                                             ; +0x2c, 0xa80c7c\nCMP             R3, R2                                                 ; +0x30, 0xa80c80\nSUB             SP, SP, #8                                             ; +0x34, 0xa80c84\nMOV             R4, R0                                                 ; +0x38, 0xa80c88\nLDR             R5, [R0,#0x20]                                         ; +0x3c, 0xa80c8c\nBEQ             loc_A80CAC                                             ; +0x40, 0xa80c90\nLDR             R1, [R0,#0x14]                                         ; +0x44, 0xa80c94\nADD             R2, R3, #1                                             ; +0x48, 0xa80c98\nSTR             R2, [R4,#0x18]                                         ; +0x4c, 0xa80c9c\nSTR             R5, [R1,R3,LSL#2]                                      ; +0x50, 0xa80ca0\nADD             SP, SP, #8                                             ; +0x54, 0xa80ca4\nPOP             {R4-R8,PC}                                             ; +0x58, 0xa80ca8\nCMP             R3, #0                                                 ; +0x5c, 0xa80cac\nLDR             R6, =(aCryptoBnBnCtxC - 0xA80CC4); \"crypto/bn/bn_ctx.c\" ; +0x60, 0xa80cb0\nADDNE           R3, R3, R3,LSL#1                                       ; +0x64, 0xa80cb4\nMOVNE           R8, R3,LSR#1                                           ; +0x68, 0xa80cb8\nADD             R6, PC, R6; \"crypto/bn/bn_ctx.c\"                       ; +0x6c, 0xa80cbc\nMOVNE           R0, R8,LSL#2                                           ; +0x70, 0xa80cc0\nMOVEQ           R0, #0x80                                              ; +0x74, 0xa80cc4\nMOV             R1, R6                                                 ; +0x78, 0xa80cc8\nLDR             R2, =0x102                                             ; +0x7c, 0xa80ccc\nMOVEQ           R8, #0x20 ; ' '                                        ; +0x80, 0xa80cd0\nBL              CRYPTO_malloc                                          ; +0x84, 0xa80cd4\nSUBS            R7, R0, #0                                             ; +0x88, 0xa80cd8\nBEQ             loc_A80D14                                             ; +0x8c, 0xa80cdc\nLDR             R2, [R4,#0x18]                                         ; +0x90, 0xa80ce0\nCMP             R2, #0                                                 ; +0x94, 0xa80ce4\nBNE             loc_A80D40                                             ; +0x98, 0xa80ce8\nLDR             R1, =(aCryptoBnBnCtxC - 0xA80CFC); \"crypto/bn/bn_ctx.c\" ; +0x9c, 0xa80cec\nLDR             R0, [R4,#0x14]                                         ; +0xa0, 0xa80cf0\nADD             R1, PC, R1; \"crypto/bn/bn_ctx.c\"                       ; +0xa4, 0xa80cf4\nLDR             R2, =0x107                                             ; +0xa8, 0xa80cf8\nBL              CRYPTO_free                                            ; +0xac, 0xa80cfc\nLDR             R3, [R4,#0x18]                                         ; +0xb0, 0xa80d00\nMOV             R1, R7                                                 ; +0xb4, 0xa80d04\nSTR             R7, [R4,#0x14]                                         ; +0xb8, 0xa80d08\nSTR             R8, [R4,#0x1C]                                         ; +0xbc, 0xa80d0c\nB               loc_A80C98                                             ; +0xc0, 0xa80d10\nMOV             R2, #0xBD                                              ; +0xc4, 0xa80d14\nMOV             R3, R6                                                 ; +0xc8, 0xa80d18\nSTR             R2, [SP,#0x20+var_20]                                  ; +0xcc, 0xa80d1c\nMOV             R0, #3                                                 ; +0xd0, 0xa80d20\nMOV             R1, #0x81                                              ; +0xd4, 0xa80d24\nMOV             R2, #0x6D ; 'm'                                        ; +0xd8, 0xa80d28\nBL              ERR_put_error                                          ; +0xdc, 0xa80d2c\nLDR             R3, [R4,#0x24]                                         ; +0xe0, 0xa80d30\nADD             R3, R3, #1                                             ; +0xe4, 0xa80d34\nSTR             R3, [R4,#0x24]                                         ; +0xe8, 0xa80d38\nB               loc_A80CA4                                             ; +0xec, 0xa80d3c\nMOV             R2, R2,LSL#2; size_t                                   ; +0xf0, 0xa80d40\nLDR             R1, [R4,#0x14]; void *                                 ; +0xf4, 0xa80d44\nBL              memcpy                                                 ; +0xf8, 0xa80d48\nB               loc_A80CEC                                             ; +0xfc, 0xa80d4c", "xrefs": ["BN_mod_mul_montgomery @ 0x9ea158", "BN_from_montgomery @ 0x9ea250", "BN_MONT_CTX_set @ 0x9ea390", "BN_mul @ 0x9ebb6c", "BN_sqr @ 0x9ed1fc", "sub_9F4C18 @ 0x9f4c4c", "EC_KEY_set_public_key_affine_coordinates @ 0x9fe0c4", "EC_GROUP_cmp @ 0xa000a8", "ec_wNAF_precompute_mult @ 0xa017e0", "ecdh_simple_compute_key @ 0xa0224c", "ossl_ecdsa_verify_sig @ 0xa036dc", "sub_A05194 @ 0xa052a8", "sub_A067A0 @ 0xa06830", "ec_GFp_simple_set_compressed_coordinates @ 0xa06e5c", "ec_GFp_simple_point2oct @ 0xa07394", "ec_GFp_simple_oct2point @ 0xa076f4", "ec_GFp_simple_group_check_discriminant @ 0xa07dac", "ec_GFp_simple_point_get_affine_coordinates @ 0xa081ac", "ec_GFp_simple_dbl @ 0xa084e4", "ec_GFp_simple_group_set_curve @ 0xa08a30", "ec_GFp_simple_cmp @ 0xa08c90", "ec_GFp_simple_add @ 0xa08f6c", "ec_GFp_simple_is_on_curve @ 0xa09540", "ec_GFp_simple_make_affine @ 0xa09820", "ec_GFp_simple_points_make_affine @ 0xa09928", "RSA_setup_blinding @ 0xa4205c", "RSA_setup_blinding @ 0xa421d4", "sub_A429B0 @ 0xa429cc", "sub_A42E10 @ 0xa42e68", "sub_A431F4 @ 0xa4324c", "sub_A43568 @ 0xa4358c", "sub_A43A80 @ 0xa43aa4", "BN_div @ 0xa80ffc", "BN_exp @ 0xa81818", "BN_mod_exp_recp @ 0xa819b8", "BN_mod_exp_mont_consttime @ 0xa81db4", "BN_mod_exp_mont @ 0xa8249c", "BN_mod_exp_mont_word @ 0xa82a80", "BN_mod_exp_simple @ 0xa82f90", "BN_mod_exp2_mont @ 0xa83370", "BN_gcd @ 0xa83b2c", "int_bn_mod_inverse @ 0xa83d40", "int_bn_mod_inverse @ 0xa83f94", "BN_kronecker @ 0xa84b6c", "BN_mod_mul @ 0xa84f68", "BN_reciprocal @ 0xa85ef4", "BN_div_recp @ 0xa85f70", "BN_mod_mul_reciprocal @ 0xa861d4", "BN_mod_sqrt @ 0xa86380", "DH_check @ 0xa94110", "DH_check_pub_key @ 0xa94398", "dsa_builtin_paramgen @ 0xa94f04", "dsa_builtin_paramgen2 @ 0xa958b0", "ec_GF2m_simple_set_compressed_coordinates @ 0xa9da54", "ec_GF2m_simple_point2oct @ 0xa9ddc4", "ec_GF2m_simple_oct2point @ 0xa9e168", "ec_GF2m_simple_group_check_discriminant @ 0xa9e754", "ec_GF2m_simple_cmp @ 0xa9ebcc", "ec_GF2m_simple_make_affine @ 0xa9ed54", "ec_GF2m_simple_is_on_curve @ 0xa9ee5c", "ec_GF2m_simple_add @ 0xa9efe8", "RSA_generate_key_ex @ 0xad4984", "BN_GF2m_mod_sqr_arr @ 0xade4e4", "BN_GF2m_mod_mul_arr @ 0xade630", "BN_GF2m_mod_exp_arr @ 0xade80c", "BN_GF2m_mod_sqrt_arr @ 0xade930", "BN_GF2m_mod_solve_quad_arr @ 0xade9cc", "BN_GF2m_mod_inv @ 0xadee88", "BN_GF2m_mod_div @ 0xadf364", "BN_GF2m_mod_inv_arr @ 0xadf7a8", "BN_GF2m_mod_div_arr @ 0xadf81c", "BN_is_prime_fasttest_ex @ 0xadf9b4", "bn_probable_prime_dh_coprime @ 0xadfe1c", "bn_probable_prime_dh @ 0xadff94", "BN_generate_prime_ex @ 0xae01f0", "BN_generate_prime_ex @ 0xae0278", "DH_generate_parameters_ex @ 0xae58e0", "sub_AE6010 @ 0xae60a0", "sub_AE6010 @ 0xae62a4", "sub_AE6010 @ 0xae640c", "sub_AE6010 @ 0xae6674", "<???> @ 0x7978c"], "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"}