{"type": "func", "start": 14223732, "end": 14223904, "name": "EC_KEY_priv2buf", "pseudocode": "// \n// EC_KEY_priv2buf from 0xd90974 to 0xd90a20 (172 bytes)\n// \n// 4 xrefs:\n// > sub_D8CA44 @ 0xd8cb2c\n// > EC_KEY_print @ 0xd8cd8c\n// > i2d_ECPrivateKey @ 0xd8e900\n// > <???> @ 0x86a78\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\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 0xd90974 to 0xd90a20 (172 bytes)\n; \n; 4 xrefs:\n; > sub_D8CA44 @ 0xd8cb2c\n; > EC_KEY_print @ 0xd8cd8c\n; > i2d_ECPrivateKey @ 0xd8e900\n; > <???> @ 0x86a78\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\nSTP             X29, X30, [SP,#var_40]!                                ; +0x0, 0xd90974\nMOV             X29, SP                                                ; +0x4, 0xd90978\nSTR             X23, [SP,#0x40+var_10]                                 ; +0x8, 0xd9097c\nMOV             X23, X1                                                ; +0xc, 0xd90980\nMOV             X1, #0                                                 ; +0x10, 0xd90984\nMOV             X2, X1                                                 ; +0x14, 0xd90988\nSTP             X19, X20, [SP,#0x40+var_30]                            ; +0x18, 0xd9098c\nSTP             X21, X22, [SP,#0x40+var_20]                            ; +0x1c, 0xd90990\nMOV             X22, X0                                                ; +0x20, 0xd90994\nBL              EC_KEY_priv2oct                                        ; +0x24, 0xd90998\nMOV             X19, X0                                                ; +0x28, 0xd9099c\nCBNZ            X0, loc_D909BC                                         ; +0x2c, 0xd909a0\nMOV             X0, #0                                                 ; +0x30, 0xd909a4\nLDP             X19, X20, [SP,#0x40+var_30]                            ; +0x34, 0xd909a8\nLDP             X21, X22, [SP,#0x40+var_20]                            ; +0x38, 0xd909ac\nLDR             X23, [SP,#0x40+var_10]                                 ; +0x3c, 0xd909b0\nLDP             X29, X30, [SP+0x40+var_40],#0x40                       ; +0x40, 0xd909b4\nRET                                                                    ; +0x44, 0xd909b8\nADRP            X20, #aCryptoEcEcKeyC@PAGE; \"crypto/ec/ec_key.c\"       ; +0x48, 0xd909bc\nMOV             W2, #0x26B                                             ; +0x4c, 0xd909c0\nADD             X20, X20, #aCryptoEcEcKeyC@PAGEOFF; \"crypto/ec/ec_key.c\" ; +0x50, 0xd909c4\nMOV             X1, X20                                                ; +0x54, 0xd909c8\nBL              CRYPTO_malloc                                          ; +0x58, 0xd909cc\nMOV             X21, X0                                                ; +0x5c, 0xd909d0\nCBZ             X0, loc_D909A4                                         ; +0x60, 0xd909d4\nMOV             X2, X19                                                ; +0x64, 0xd909d8\nMOV             X0, X22                                                ; +0x68, 0xd909dc\nMOV             X1, X21                                                ; +0x6c, 0xd909e0\nBL              EC_KEY_priv2oct                                        ; +0x70, 0xd909e4\nMOV             X19, X0                                                ; +0x74, 0xd909e8\nCBZ             X0, loc_D90A08                                         ; +0x78, 0xd909ec\nSTR             X21, [X23]                                             ; +0x7c, 0xd909f0\nLDP             X19, X20, [SP,#0x40+var_30]                            ; +0x80, 0xd909f4\nLDP             X21, X22, [SP,#0x40+var_20]                            ; +0x84, 0xd909f8\nLDR             X23, [SP,#0x40+var_10]                                 ; +0x88, 0xd909fc\nLDP             X29, X30, [SP+0x40+var_40],#0x40                       ; +0x8c, 0xd90a00\nRET                                                                    ; +0x90, 0xd90a04\nMOV             X0, X21                                                ; +0x94, 0xd90a08\nMOV             X1, X20                                                ; +0x98, 0xd90a0c\nMOV             W2, #0x270                                             ; +0x9c, 0xd90a10\nBL              CRYPTO_free                                            ; +0xa0, 0xd90a14\nMOV             X0, X19                                                ; +0xa4, 0xd90a18\nB               loc_D909A8                                             ; +0xa8, 0xd90a1c", "xrefs": ["sub_D8CA44 @ 0xd8cb2c", "EC_KEY_print @ 0xd8cd8c", "i2d_ECPrivateKey @ 0xd8e900", "<???> @ 0x86a78"], "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"}