{"type": "func", "start": 10461616, "end": 10462208, "name": "EC_KEY_print", "pseudocode": "// \n// EC_KEY_print from 0x9fa1b0 to 0x9fa400 (592 bytes)\n// \n// 2 xrefs:\n// > EC_KEY_print_fp @ 0xa03e88\n// > <???> @ 0x7acac\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:07:34 +0000\n// \n\nint __fastcall EC_KEY_print(int a1, int a2, int a3)\n{\n  int v6; // r0\n  int v7; // r6\n  int v8; // r9\n  int conv_form; // r0\n  int v10; // r5\n  const char *v11; // r4\n  int v12; // r5\n  int v14; // r0\n  int v15; // [sp+8h] [bp-Ch] BYREF\n  int v16; // [sp+Ch] [bp-8h] BYREF\n\n  v6 = EC_KEY_get0_private_key(a2);\n  v15 = 0;\n  v16 = 0;\n  if ( a2 )\n  {\n    v7 = v6;\n    v8 = EC_KEY_get0_group(a2);\n    if ( v8 )\n    {\n      if ( EC_KEY_get0_public_key(a2) )\n      {\n        conv_form = EC_KEY_get_conv_form(a2);\n        v10 = EC_KEY_key2buf(a2, conv_form, &v16, 0);\n        if ( !v10 )\n          goto LABEL_10;\n        if ( !v7 )\n        {\nLABEL_6:\n          v11 = \"Public-Key\";\n          goto LABEL_7;\n        }\n      }\n      else\n      {\n        v10 = 0;\n        if ( !v7 )\n          goto LABEL_6;\n      }\n      if ( !EC_KEY_get0_private_key(a2) )\n      {\n        v7 = 0;\n        goto LABEL_14;\n      }\n      v7 = EC_KEY_priv2buf(a2, &v15);\n      if ( v7 )\n      {\nLABEL_14:\n        v11 = \"Private-Key\";\nLABEL_7:\n        if ( BIO_indent(a1, a3, 128) )\n        {\n          v14 = EC_GROUP_order_bits(v8);\n          if ( BIO_printf(a1, \"%s: (%d bit)\\n\", v11, v14) > 0\n            && (!v7 || BIO_printf(a1, \"%*spriv:\\n\", a3, &byte_BF4ECA) > 0 && ASN1_buf_print(a1, v15, v7, a3 + 4))\n            && (!v10 || BIO_printf(a1, \"%*spub:\\n\", a3, &byte_BF4ECA) > 0 && ASN1_buf_print(a1, v16, v10, a3 + 4))\n            && ECPKParameters_print(a1, v8, a3) )\n          {\n            v12 = 1;\n            goto LABEL_9;\n          }\n        }\nLABEL_8:\n        ERR_put_error(16, 221, 16, \"crypto/ec/ec_ameth.c\", 392);\n        v12 = 0;\nLABEL_9:\n        CRYPTO_clear_free(v15, v7, \"crypto/ec/ec_ameth.c\", 393);\n        CRYPTO_free(v16, \"crypto/ec/ec_ameth.c\", 394);\n        return v12;\n      }\nLABEL_10:\n      v7 = 0;\n      goto LABEL_8;\n    }\n  }\n  ERR_put_error(16, 221, 67, \"crypto/ec/ec_ameth.c\", 344);\n  return 0;\n}", "assembly": "; \n; EC_KEY_print from 0x9fa1b0 to 0x9fa400 (592 bytes)\n; \n; 2 xrefs:\n; > EC_KEY_print_fp @ 0xa03e88\n; > <???> @ 0x7acac\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:07:34 +0000\n; \nPUSH            {R4-R9,LR}                                             ; +0x0, 0x9fa1b0\nMOV             R5, #0                                                 ; +0x4, 0x9fa1b4\nSUB             SP, SP, #0x14                                          ; +0x8, 0x9fa1b8\nMOV             R4, R1                                                 ; +0xc, 0x9fa1bc\nMOV             R7, R0                                                 ; +0x10, 0x9fa1c0\nMOV             R0, R1                                                 ; +0x14, 0x9fa1c4\nMOV             R8, R2                                                 ; +0x18, 0x9fa1c8\nBL              EC_KEY_get0_private_key                                ; +0x1c, 0x9fa1cc\nCMP             R4, R5                                                 ; +0x20, 0x9fa1d0\nSTR             R5, [SP,#0x14+var_C]                                   ; +0x24, 0x9fa1d4\nSTR             R5, [SP,#0x14+var_8]                                   ; +0x28, 0x9fa1d8\nBEQ             loc_9FA2F0                                             ; +0x2c, 0x9fa1dc\nMOV             R6, R0                                                 ; +0x30, 0x9fa1e0\nMOV             R0, R4                                                 ; +0x34, 0x9fa1e4\nBL              EC_KEY_get0_group                                      ; +0x38, 0x9fa1e8\nSUBS            R9, R0, #0                                             ; +0x3c, 0x9fa1ec\nBEQ             loc_9FA2F0                                             ; +0x40, 0x9fa1f0\nMOV             R0, R4                                                 ; +0x44, 0x9fa1f4\nBL              EC_KEY_get0_public_key                                 ; +0x48, 0x9fa1f8\nCMP             R0, #0                                                 ; +0x4c, 0x9fa1fc\nBEQ             loc_9FA2B4                                             ; +0x50, 0x9fa200\nMOV             R0, R4                                                 ; +0x54, 0x9fa204\nBL              EC_KEY_get_conv_form                                   ; +0x58, 0x9fa208\nMOV             R3, R5                                                 ; +0x5c, 0x9fa20c\nADD             R2, SP, #0x14+var_8                                    ; +0x60, 0x9fa210\nMOV             R1, R0                                                 ; +0x64, 0x9fa214\nMOV             R0, R4                                                 ; +0x68, 0x9fa218\nBL              EC_KEY_key2buf                                         ; +0x6c, 0x9fa21c\nSUBS            R5, R0, #0                                             ; +0x70, 0x9fa220\nBEQ             loc_9FA2AC                                             ; +0x74, 0x9fa224\nCMP             R6, #0                                                 ; +0x78, 0x9fa228\nBNE             loc_9FA2C0                                             ; +0x7c, 0x9fa22c\nLDR             R4, =(aPublicKey_0 - 0x9FA23C); \"Public-Key\"           ; +0x80, 0x9fa230\nADD             R4, PC, R4; \"Public-Key\"                               ; +0x84, 0x9fa234\nMOV             R0, R7                                                 ; +0x88, 0x9fa238\nMOV             R1, R8                                                 ; +0x8c, 0x9fa23c\nMOV             R2, #0x80                                              ; +0x90, 0x9fa240\nBL              BIO_indent                                             ; +0x94, 0x9fa244\nCMP             R0, #0                                                 ; +0x98, 0x9fa248\nBNE             loc_9FA31C                                             ; +0x9c, 0x9fa24c\nMOV             R3, #0x188                                             ; +0xa0, 0x9fa250\nSTR             R3, [SP,#0x14+var_14]                                  ; +0xa4, 0x9fa254\nLDR             R3, =(aCryptoEcEcAmet - 0x9FA270); \"crypto/ec/ec_ameth.c\" ; +0xa8, 0x9fa258\nMOV             R0, #0x10                                              ; +0xac, 0x9fa25c\nMOV             R2, R0                                                 ; +0xb0, 0x9fa260\nMOV             R1, #0xDD                                              ; +0xb4, 0x9fa264\nADD             R3, PC, R3; \"crypto/ec/ec_ameth.c\"                     ; +0xb8, 0x9fa268\nBL              ERR_put_error                                          ; +0xbc, 0x9fa26c\nMOV             R5, #0                                                 ; +0xc0, 0x9fa270\nLDR             R4, =(aCryptoEcEcAmet - 0x9FA284); \"crypto/ec/ec_ameth.c\" ; +0xc4, 0x9fa274\nMOV             R1, R6                                                 ; +0xc8, 0x9fa278\nADD             R4, PC, R4; \"crypto/ec/ec_ameth.c\"                     ; +0xcc, 0x9fa27c\nMOV             R2, R4                                                 ; +0xd0, 0x9fa280\nLDR             R0, [SP,#0x14+var_C]                                   ; +0xd4, 0x9fa284\nLDR             R3, =0x189                                             ; +0xd8, 0x9fa288\nBL              CRYPTO_clear_free                                      ; +0xdc, 0x9fa28c\nLDR             R0, [SP,#0x14+var_8]                                   ; +0xe0, 0x9fa290\nMOV             R1, R4                                                 ; +0xe4, 0x9fa294\nLDR             R2, =0x18A                                             ; +0xe8, 0x9fa298\nBL              CRYPTO_free                                            ; +0xec, 0x9fa29c\nMOV             R0, R5                                                 ; +0xf0, 0x9fa2a0\nADD             SP, SP, #0x14                                          ; +0xf4, 0x9fa2a4\nPOP             {R4-R9,PC}                                             ; +0xf8, 0x9fa2a8\nMOV             R6, #0                                                 ; +0xfc, 0x9fa2ac\nB               loc_9FA250                                             ; +0x100, 0x9fa2b0\nCMP             R6, #0                                                 ; +0x104, 0x9fa2b4\nMOV             R5, R0                                                 ; +0x108, 0x9fa2b8\nBEQ             loc_9FA230                                             ; +0x10c, 0x9fa2bc\nMOV             R0, R4                                                 ; +0x110, 0x9fa2c0\nBL              EC_KEY_get0_private_key                                ; +0x114, 0x9fa2c4\nCMP             R0, #0                                                 ; +0x118, 0x9fa2c8\nBEQ             loc_9FA3B4                                             ; +0x11c, 0x9fa2cc\nMOV             R0, R4                                                 ; +0x120, 0x9fa2d0\nADD             R1, SP, #0x14+var_C                                    ; +0x124, 0x9fa2d4\nBL              EC_KEY_priv2buf                                        ; +0x128, 0x9fa2d8\nSUBS            R6, R0, #0                                             ; +0x12c, 0x9fa2dc\nBEQ             loc_9FA2AC                                             ; +0x130, 0x9fa2e0\nLDR             R4, =(aPrivateKey_0 - 0x9FA2F0); \"Private-Key\"         ; +0x134, 0x9fa2e4\nADD             R4, PC, R4; \"Private-Key\"                              ; +0x138, 0x9fa2e8\nB               loc_9FA238                                             ; +0x13c, 0x9fa2ec\nMOV             R3, #0x158                                             ; +0x140, 0x9fa2f0\nSTR             R3, [SP,#0x14+var_14]                                  ; +0x144, 0x9fa2f4\nLDR             R3, =(aCryptoEcEcAmet - 0x9FA310); \"crypto/ec/ec_ameth.c\" ; +0x148, 0x9fa2f8\nMOV             R0, #0x10                                              ; +0x14c, 0x9fa2fc\nMOV             R1, #0xDD                                              ; +0x150, 0x9fa300\nMOV             R2, #0x43 ; 'C'                                        ; +0x154, 0x9fa304\nADD             R3, PC, R3; \"crypto/ec/ec_ameth.c\"                     ; +0x158, 0x9fa308\nBL              ERR_put_error                                          ; +0x15c, 0x9fa30c\nMOV             R0, #0                                                 ; +0x160, 0x9fa310\nADD             SP, SP, #0x14                                          ; +0x164, 0x9fa314\nPOP             {R4-R9,PC}                                             ; +0x168, 0x9fa318\nMOV             R0, R9                                                 ; +0x16c, 0x9fa31c\nBL              EC_GROUP_order_bits                                    ; +0x170, 0x9fa320\nLDR             R1, =(aSDBit - 0x9FA334); \"%s: (%d bit)\\n\"             ; +0x174, 0x9fa324\nMOV             R2, R4                                                 ; +0x178, 0x9fa328\nADD             R1, PC, R1; \"%s: (%d bit)\\n\"                           ; +0x17c, 0x9fa32c\nMOV             R3, R0                                                 ; +0x180, 0x9fa330\nMOV             R0, R7                                                 ; +0x184, 0x9fa334\nBL              BIO_printf                                             ; +0x188, 0x9fa338\nCMP             R0, #0                                                 ; +0x18c, 0x9fa33c\nBLE             loc_9FA250                                             ; +0x190, 0x9fa340\nCMP             R6, #0                                                 ; +0x194, 0x9fa344\nBNE             loc_9FA3BC                                             ; +0x198, 0x9fa348\nCMP             R5, #0                                                 ; +0x19c, 0x9fa34c\nBEQ             loc_9FA394                                             ; +0x1a0, 0x9fa350\nLDR             R1, =(aSpub - 0x9FA368); \"%*spub:\\n\"                   ; +0x1a4, 0x9fa354\nLDR             R3, =(byte_BF4ECA - 0x9FA370)                          ; +0x1a8, 0x9fa358\nMOV             R0, R7                                                 ; +0x1ac, 0x9fa35c\nADD             R1, PC, R1; \"%*spub:\\n\"                                ; +0x1b0, 0x9fa360\nMOV             R2, R8                                                 ; +0x1b4, 0x9fa364\nADD             R3, PC, R3; byte_BF4ECA                                ; +0x1b8, 0x9fa368\nBL              BIO_printf                                             ; +0x1bc, 0x9fa36c\nCMP             R0, #0                                                 ; +0x1c0, 0x9fa370\nBLE             loc_9FA250                                             ; +0x1c4, 0x9fa374\nMOV             R2, R5                                                 ; +0x1c8, 0x9fa378\nMOV             R0, R7                                                 ; +0x1cc, 0x9fa37c\nLDR             R1, [SP,#0x14+var_8]                                   ; +0x1d0, 0x9fa380\nADD             R3, R8, #4                                             ; +0x1d4, 0x9fa384\nBL              ASN1_buf_print                                         ; +0x1d8, 0x9fa388\nCMP             R0, #0                                                 ; +0x1dc, 0x9fa38c\nBEQ             loc_9FA250                                             ; +0x1e0, 0x9fa390\nMOV             R0, R7                                                 ; +0x1e4, 0x9fa394\nMOV             R1, R9                                                 ; +0x1e8, 0x9fa398\nMOV             R2, R8                                                 ; +0x1ec, 0x9fa39c\nBL              ECPKParameters_print                                   ; +0x1f0, 0x9fa3a0\nCMP             R0, #0                                                 ; +0x1f4, 0x9fa3a4\nMOVNE           R5, #1                                                 ; +0x1f8, 0x9fa3a8\nBNE             loc_9FA274                                             ; +0x1fc, 0x9fa3ac\nB               loc_9FA250                                             ; +0x200, 0x9fa3b0\nMOV             R6, R0                                                 ; +0x204, 0x9fa3b4\nB               loc_9FA2E4                                             ; +0x208, 0x9fa3b8\nLDR             R1, =(aSpriv - 0x9FA3D0); \"%*spriv:\\n\"                 ; +0x20c, 0x9fa3bc\nLDR             R3, =(byte_BF4ECA - 0x9FA3D8)                          ; +0x210, 0x9fa3c0\nMOV             R0, R7                                                 ; +0x214, 0x9fa3c4\nADD             R1, PC, R1; \"%*spriv:\\n\"                               ; +0x218, 0x9fa3c8\nMOV             R2, R8                                                 ; +0x21c, 0x9fa3cc\nADD             R3, PC, R3; byte_BF4ECA                                ; +0x220, 0x9fa3d0\nBL              BIO_printf                                             ; +0x224, 0x9fa3d4\nCMP             R0, #0                                                 ; +0x228, 0x9fa3d8\nBLE             loc_9FA250                                             ; +0x22c, 0x9fa3dc\nMOV             R0, R7                                                 ; +0x230, 0x9fa3e0\nLDR             R1, [SP,#0x14+var_C]                                   ; +0x234, 0x9fa3e4\nMOV             R2, R6                                                 ; +0x238, 0x9fa3e8\nADD             R3, R8, #4                                             ; +0x23c, 0x9fa3ec\nBL              ASN1_buf_print                                         ; +0x240, 0x9fa3f0\nCMP             R0, #0                                                 ; +0x244, 0x9fa3f4\nBEQ             loc_9FA250                                             ; +0x248, 0x9fa3f8\nB               loc_9FA34C                                             ; +0x24c, 0x9fa3fc", "xrefs": ["EC_KEY_print_fp @ 0xa03e88", "<???> @ 0x7acac"], "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"}