{"type": "func", "start": 16837844, "end": 16838016, "name": "EC_KEY_priv2buf", "pseudocode": "// \n// EC_KEY_priv2buf from 0x100ecd4 to 0x100ed80 (172 bytes)\n// \n// 4 xrefs:\n// > sub_100ADA4 @ 0x100ae8c\n// > EC_KEY_print @ 0x100b0ec\n// > i2d_ECPrivateKey @ 0x100cc60\n// > <???> @ 0xb2b10\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:16:01 +0000\n// \n\n__int64 __fastcall EC_KEY_priv2buf(__int64 a1, __int64 *a2)\n{\n  __int64 v4; // x0\n  __int64 result; // x0\n  __int64 v6; // x21\n\n  v4 = EC_KEY_priv2oct(a1);\n  if ( !v4 )\n    return 0;\n  v6 = CRYPTO_malloc(v4, \"crypto/ec/ec_key.c\", 619);\n  if ( !v6 )\n    return 0;\n  result = EC_KEY_priv2oct(a1);\n  if ( result )\n  {\n    *a2 = v6;\n  }\n  else\n  {\n    CRYPTO_free(v6, \"crypto/ec/ec_key.c\", 624);\n    return 0;\n  }\n  return result;\n}", "assembly": "; \n; EC_KEY_priv2buf from 0x100ecd4 to 0x100ed80 (172 bytes)\n; \n; 4 xrefs:\n; > sub_100ADA4 @ 0x100ae8c\n; > EC_KEY_print @ 0x100b0ec\n; > i2d_ECPrivateKey @ 0x100cc60\n; > <???> @ 0xb2b10\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:16:01 +0000\n; \nSTP             X29, X30, [SP,#var_40]!                                ; +0x0, 0x100ecd4\nMOV             X29, SP                                                ; +0x4, 0x100ecd8\nSTR             X23, [SP,#0x40+var_10]                                 ; +0x8, 0x100ecdc\nMOV             X23, X1                                                ; +0xc, 0x100ece0\nMOV             X1, #0                                                 ; +0x10, 0x100ece4\nMOV             X2, X1                                                 ; +0x14, 0x100ece8\nSTP             X19, X20, [SP,#0x40+var_30]                            ; +0x18, 0x100ecec\nSTP             X21, X22, [SP,#0x40+var_20]                            ; +0x1c, 0x100ecf0\nMOV             X22, X0                                                ; +0x20, 0x100ecf4\nBL              EC_KEY_priv2oct                                        ; +0x24, 0x100ecf8\nMOV             X19, X0                                                ; +0x28, 0x100ecfc\nCBNZ            X0, loc_100ED1C                                        ; +0x2c, 0x100ed00\nMOV             X0, #0                                                 ; +0x30, 0x100ed04\nLDP             X19, X20, [SP,#0x40+var_30]                            ; +0x34, 0x100ed08\nLDP             X21, X22, [SP,#0x40+var_20]                            ; +0x38, 0x100ed0c\nLDR             X23, [SP,#0x40+var_10]                                 ; +0x3c, 0x100ed10\nLDP             X29, X30, [SP+0x40+var_40],#0x40                       ; +0x40, 0x100ed14\nRET                                                                    ; +0x44, 0x100ed18\nADRP            X20, #aCryptoEcEcKeyC@PAGE; \"crypto/ec/ec_key.c\"       ; +0x48, 0x100ed1c\nMOV             W2, #0x26B                                             ; +0x4c, 0x100ed20\nADD             X20, X20, #aCryptoEcEcKeyC@PAGEOFF; \"crypto/ec/ec_key.c\" ; +0x50, 0x100ed24\nMOV             X1, X20                                                ; +0x54, 0x100ed28\nBL              CRYPTO_malloc                                          ; +0x58, 0x100ed2c\nMOV             X21, X0                                                ; +0x5c, 0x100ed30\nCBZ             X0, loc_100ED04                                        ; +0x60, 0x100ed34\nMOV             X2, X19                                                ; +0x64, 0x100ed38\nMOV             X0, X22                                                ; +0x68, 0x100ed3c\nMOV             X1, X21                                                ; +0x6c, 0x100ed40\nBL              EC_KEY_priv2oct                                        ; +0x70, 0x100ed44\nMOV             X19, X0                                                ; +0x74, 0x100ed48\nCBZ             X0, loc_100ED68                                        ; +0x78, 0x100ed4c\nSTR             X21, [X23]                                             ; +0x7c, 0x100ed50\nLDP             X19, X20, [SP,#0x40+var_30]                            ; +0x80, 0x100ed54\nLDP             X21, X22, [SP,#0x40+var_20]                            ; +0x84, 0x100ed58\nLDR             X23, [SP,#0x40+var_10]                                 ; +0x88, 0x100ed5c\nLDP             X29, X30, [SP+0x40+var_40],#0x40                       ; +0x8c, 0x100ed60\nRET                                                                    ; +0x90, 0x100ed64\nMOV             X0, X21                                                ; +0x94, 0x100ed68\nMOV             X1, X20                                                ; +0x98, 0x100ed6c\nMOV             W2, #0x270                                             ; +0x9c, 0x100ed70\nBL              CRYPTO_free                                            ; +0xa0, 0x100ed74\nMOV             X0, X19                                                ; +0xa4, 0x100ed78\nB               loc_100ED08                                            ; +0xa8, 0x100ed7c", "xrefs": ["sub_100ADA4 @ 0x100ae8c", "EC_KEY_print @ 0x100b0ec", "i2d_ECPrivateKey @ 0x100cc60", "<???> @ 0xb2b10"], "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"}