{"type": "func", "start": 8279472, "end": 8280064, "name": "EC_KEY_print", "pseudocode": "// \n// EC_KEY_print from 0x7e55b0 to 0x7e5800 (592 bytes)\n// \n// 2 xrefs:\n// > EC_KEY_print_fp @ 0x7ef288\n// > <???> @ 0x6122c\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\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_9B1912) > 0 && ASN1_buf_print(a1, v15, v7, a3 + 4))\n            && (!v10 || BIO_printf(a1, \"%*spub:\\n\", a3, &byte_9B1912) > 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 0x7e55b0 to 0x7e5800 (592 bytes)\n; \n; 2 xrefs:\n; > EC_KEY_print_fp @ 0x7ef288\n; > <???> @ 0x6122c\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\nPUSH            {R4-R9,LR}                                             ; +0x0, 0x7e55b0\nMOV             R5, #0                                                 ; +0x4, 0x7e55b4\nSUB             SP, SP, #0x14                                          ; +0x8, 0x7e55b8\nMOV             R4, R1                                                 ; +0xc, 0x7e55bc\nMOV             R7, R0                                                 ; +0x10, 0x7e55c0\nMOV             R0, R1                                                 ; +0x14, 0x7e55c4\nMOV             R8, R2                                                 ; +0x18, 0x7e55c8\nBL              EC_KEY_get0_private_key                                ; +0x1c, 0x7e55cc\nCMP             R4, R5                                                 ; +0x20, 0x7e55d0\nSTR             R5, [SP,#0x14+var_C]                                   ; +0x24, 0x7e55d4\nSTR             R5, [SP,#0x14+var_8]                                   ; +0x28, 0x7e55d8\nBEQ             loc_7E56F0                                             ; +0x2c, 0x7e55dc\nMOV             R6, R0                                                 ; +0x30, 0x7e55e0\nMOV             R0, R4                                                 ; +0x34, 0x7e55e4\nBL              EC_KEY_get0_group                                      ; +0x38, 0x7e55e8\nSUBS            R9, R0, #0                                             ; +0x3c, 0x7e55ec\nBEQ             loc_7E56F0                                             ; +0x40, 0x7e55f0\nMOV             R0, R4                                                 ; +0x44, 0x7e55f4\nBL              EC_KEY_get0_public_key                                 ; +0x48, 0x7e55f8\nCMP             R0, #0                                                 ; +0x4c, 0x7e55fc\nBEQ             loc_7E56B4                                             ; +0x50, 0x7e5600\nMOV             R0, R4                                                 ; +0x54, 0x7e5604\nBL              EC_KEY_get_conv_form                                   ; +0x58, 0x7e5608\nMOV             R3, R5                                                 ; +0x5c, 0x7e560c\nADD             R2, SP, #0x14+var_8                                    ; +0x60, 0x7e5610\nMOV             R1, R0                                                 ; +0x64, 0x7e5614\nMOV             R0, R4                                                 ; +0x68, 0x7e5618\nBL              EC_KEY_key2buf                                         ; +0x6c, 0x7e561c\nSUBS            R5, R0, #0                                             ; +0x70, 0x7e5620\nBEQ             loc_7E56AC                                             ; +0x74, 0x7e5624\nCMP             R6, #0                                                 ; +0x78, 0x7e5628\nBNE             loc_7E56C0                                             ; +0x7c, 0x7e562c\nLDR             R4, =(aPublicKey_0 - 0x7E563C); \"Public-Key\"           ; +0x80, 0x7e5630\nADD             R4, PC, R4; \"Public-Key\"                               ; +0x84, 0x7e5634\nMOV             R0, R7                                                 ; +0x88, 0x7e5638\nMOV             R1, R8                                                 ; +0x8c, 0x7e563c\nMOV             R2, #0x80                                              ; +0x90, 0x7e5640\nBL              BIO_indent                                             ; +0x94, 0x7e5644\nCMP             R0, #0                                                 ; +0x98, 0x7e5648\nBNE             loc_7E571C                                             ; +0x9c, 0x7e564c\nMOV             R3, #0x188                                             ; +0xa0, 0x7e5650\nSTR             R3, [SP,#0x14+var_14]                                  ; +0xa4, 0x7e5654\nLDR             R3, =(aCryptoEcEcAmet - 0x7E5670); \"crypto/ec/ec_ameth.c\" ; +0xa8, 0x7e5658\nMOV             R0, #0x10                                              ; +0xac, 0x7e565c\nMOV             R2, R0                                                 ; +0xb0, 0x7e5660\nMOV             R1, #0xDD                                              ; +0xb4, 0x7e5664\nADD             R3, PC, R3; \"crypto/ec/ec_ameth.c\"                     ; +0xb8, 0x7e5668\nBL              ERR_put_error                                          ; +0xbc, 0x7e566c\nMOV             R5, #0                                                 ; +0xc0, 0x7e5670\nLDR             R4, =(aCryptoEcEcAmet - 0x7E5684); \"crypto/ec/ec_ameth.c\" ; +0xc4, 0x7e5674\nMOV             R1, R6                                                 ; +0xc8, 0x7e5678\nADD             R4, PC, R4; \"crypto/ec/ec_ameth.c\"                     ; +0xcc, 0x7e567c\nMOV             R2, R4                                                 ; +0xd0, 0x7e5680\nLDR             R0, [SP,#0x14+var_C]                                   ; +0xd4, 0x7e5684\nLDR             R3, =0x189                                             ; +0xd8, 0x7e5688\nBL              CRYPTO_clear_free                                      ; +0xdc, 0x7e568c\nLDR             R0, [SP,#0x14+var_8]                                   ; +0xe0, 0x7e5690\nMOV             R1, R4                                                 ; +0xe4, 0x7e5694\nLDR             R2, =0x18A                                             ; +0xe8, 0x7e5698\nBL              CRYPTO_free                                            ; +0xec, 0x7e569c\nMOV             R0, R5                                                 ; +0xf0, 0x7e56a0\nADD             SP, SP, #0x14                                          ; +0xf4, 0x7e56a4\nPOP             {R4-R9,PC}                                             ; +0xf8, 0x7e56a8\nMOV             R6, #0                                                 ; +0xfc, 0x7e56ac\nB               loc_7E5650                                             ; +0x100, 0x7e56b0\nCMP             R6, #0                                                 ; +0x104, 0x7e56b4\nMOV             R5, R0                                                 ; +0x108, 0x7e56b8\nBEQ             loc_7E5630                                             ; +0x10c, 0x7e56bc\nMOV             R0, R4                                                 ; +0x110, 0x7e56c0\nBL              EC_KEY_get0_private_key                                ; +0x114, 0x7e56c4\nCMP             R0, #0                                                 ; +0x118, 0x7e56c8\nBEQ             loc_7E57B4                                             ; +0x11c, 0x7e56cc\nMOV             R0, R4                                                 ; +0x120, 0x7e56d0\nADD             R1, SP, #0x14+var_C                                    ; +0x124, 0x7e56d4\nBL              EC_KEY_priv2buf                                        ; +0x128, 0x7e56d8\nSUBS            R6, R0, #0                                             ; +0x12c, 0x7e56dc\nBEQ             loc_7E56AC                                             ; +0x130, 0x7e56e0\nLDR             R4, =(aPrivateKey_0 - 0x7E56F0); \"Private-Key\"         ; +0x134, 0x7e56e4\nADD             R4, PC, R4; \"Private-Key\"                              ; +0x138, 0x7e56e8\nB               loc_7E5638                                             ; +0x13c, 0x7e56ec\nMOV             R3, #0x158                                             ; +0x140, 0x7e56f0\nSTR             R3, [SP,#0x14+var_14]                                  ; +0x144, 0x7e56f4\nLDR             R3, =(aCryptoEcEcAmet - 0x7E5710); \"crypto/ec/ec_ameth.c\" ; +0x148, 0x7e56f8\nMOV             R0, #0x10                                              ; +0x14c, 0x7e56fc\nMOV             R1, #0xDD                                              ; +0x150, 0x7e5700\nMOV             R2, #0x43 ; 'C'                                        ; +0x154, 0x7e5704\nADD             R3, PC, R3; \"crypto/ec/ec_ameth.c\"                     ; +0x158, 0x7e5708\nBL              ERR_put_error                                          ; +0x15c, 0x7e570c\nMOV             R0, #0                                                 ; +0x160, 0x7e5710\nADD             SP, SP, #0x14                                          ; +0x164, 0x7e5714\nPOP             {R4-R9,PC}                                             ; +0x168, 0x7e5718\nMOV             R0, R9                                                 ; +0x16c, 0x7e571c\nBL              EC_GROUP_order_bits                                    ; +0x170, 0x7e5720\nLDR             R1, =(aSDBit - 0x7E5734); \"%s: (%d bit)\\n\"             ; +0x174, 0x7e5724\nMOV             R2, R4                                                 ; +0x178, 0x7e5728\nADD             R1, PC, R1; \"%s: (%d bit)\\n\"                           ; +0x17c, 0x7e572c\nMOV             R3, R0                                                 ; +0x180, 0x7e5730\nMOV             R0, R7                                                 ; +0x184, 0x7e5734\nBL              BIO_printf                                             ; +0x188, 0x7e5738\nCMP             R0, #0                                                 ; +0x18c, 0x7e573c\nBLE             loc_7E5650                                             ; +0x190, 0x7e5740\nCMP             R6, #0                                                 ; +0x194, 0x7e5744\nBNE             loc_7E57BC                                             ; +0x198, 0x7e5748\nCMP             R5, #0                                                 ; +0x19c, 0x7e574c\nBEQ             loc_7E5794                                             ; +0x1a0, 0x7e5750\nLDR             R1, =(aSpub - 0x7E5768); \"%*spub:\\n\"                   ; +0x1a4, 0x7e5754\nLDR             R3, =(byte_9B1912 - 0x7E5770)                          ; +0x1a8, 0x7e5758\nMOV             R0, R7                                                 ; +0x1ac, 0x7e575c\nADD             R1, PC, R1; \"%*spub:\\n\"                                ; +0x1b0, 0x7e5760\nMOV             R2, R8                                                 ; +0x1b4, 0x7e5764\nADD             R3, PC, R3; byte_9B1912                                ; +0x1b8, 0x7e5768\nBL              BIO_printf                                             ; +0x1bc, 0x7e576c\nCMP             R0, #0                                                 ; +0x1c0, 0x7e5770\nBLE             loc_7E5650                                             ; +0x1c4, 0x7e5774\nMOV             R2, R5                                                 ; +0x1c8, 0x7e5778\nMOV             R0, R7                                                 ; +0x1cc, 0x7e577c\nLDR             R1, [SP,#0x14+var_8]                                   ; +0x1d0, 0x7e5780\nADD             R3, R8, #4                                             ; +0x1d4, 0x7e5784\nBL              ASN1_buf_print                                         ; +0x1d8, 0x7e5788\nCMP             R0, #0                                                 ; +0x1dc, 0x7e578c\nBEQ             loc_7E5650                                             ; +0x1e0, 0x7e5790\nMOV             R0, R7                                                 ; +0x1e4, 0x7e5794\nMOV             R1, R9                                                 ; +0x1e8, 0x7e5798\nMOV             R2, R8                                                 ; +0x1ec, 0x7e579c\nBL              ECPKParameters_print                                   ; +0x1f0, 0x7e57a0\nCMP             R0, #0                                                 ; +0x1f4, 0x7e57a4\nMOVNE           R5, #1                                                 ; +0x1f8, 0x7e57a8\nBNE             loc_7E5674                                             ; +0x1fc, 0x7e57ac\nB               loc_7E5650                                             ; +0x200, 0x7e57b0\nMOV             R6, R0                                                 ; +0x204, 0x7e57b4\nB               loc_7E56E4                                             ; +0x208, 0x7e57b8\nLDR             R1, =(aSpriv - 0x7E57D0); \"%*spriv:\\n\"                 ; +0x20c, 0x7e57bc\nLDR             R3, =(byte_9B1912 - 0x7E57D8)                          ; +0x210, 0x7e57c0\nMOV             R0, R7                                                 ; +0x214, 0x7e57c4\nADD             R1, PC, R1; \"%*spriv:\\n\"                               ; +0x218, 0x7e57c8\nMOV             R2, R8                                                 ; +0x21c, 0x7e57cc\nADD             R3, PC, R3; byte_9B1912                                ; +0x220, 0x7e57d0\nBL              BIO_printf                                             ; +0x224, 0x7e57d4\nCMP             R0, #0                                                 ; +0x228, 0x7e57d8\nBLE             loc_7E5650                                             ; +0x22c, 0x7e57dc\nMOV             R0, R7                                                 ; +0x230, 0x7e57e0\nLDR             R1, [SP,#0x14+var_C]                                   ; +0x234, 0x7e57e4\nMOV             R2, R6                                                 ; +0x238, 0x7e57e8\nADD             R3, R8, #4                                             ; +0x23c, 0x7e57ec\nBL              ASN1_buf_print                                         ; +0x240, 0x7e57f0\nCMP             R0, #0                                                 ; +0x244, 0x7e57f4\nBEQ             loc_7E5650                                             ; +0x248, 0x7e57f8\nB               loc_7E574C                                             ; +0x24c, 0x7e57fc", "xrefs": ["EC_KEY_print_fp @ 0x7ef288", "<???> @ 0x6122c"], "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"}