{"type": "func", "start": 8297012, "end": 8297140, "name": "EC_KEY_priv2buf", "pseudocode": "// \n// EC_KEY_priv2buf from 0x7e9a34 to 0x7e9ab4 (128 bytes)\n// \n// 4 xrefs:\n// > sub_7E5364 @ 0x7e544c\n// > EC_KEY_print @ 0x7e56d8\n// > i2d_ECPrivateKey @ 0x7e7730\n// > <???> @ 0x6121c\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_priv2buf(int a1, int *a2)\n{\n  int v4; // r0\n  int result; // r0\n  int v6; // r7\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 0x7e9a34 to 0x7e9ab4 (128 bytes)\n; \n; 4 xrefs:\n; > sub_7E5364 @ 0x7e544c\n; > EC_KEY_print @ 0x7e56d8\n; > i2d_ECPrivateKey @ 0x7e7730\n; > <???> @ 0x6121c\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-R8,LR}                                             ; +0x0, 0x7e9a34\nMOV             R6, R1                                                 ; +0x4, 0x7e9a38\nMOV             R1, #0                                                 ; +0x8, 0x7e9a3c\nMOV             R2, R1                                                 ; +0xc, 0x7e9a40\nMOV             R5, R0                                                 ; +0x10, 0x7e9a44\nBL              EC_KEY_priv2oct                                        ; +0x14, 0x7e9a48\nSUBS            R4, R0, #0                                             ; +0x18, 0x7e9a4c\nBNE             loc_7E9A5C                                             ; +0x1c, 0x7e9a50\nMOV             R0, #0                                                 ; +0x20, 0x7e9a54\nPOP             {R4-R8,PC}                                             ; +0x24, 0x7e9a58\nLDR             R8, =(aCryptoEcEcKeyC - 0x7E9A6C); \"crypto/ec/ec_key.c\" ; +0x28, 0x7e9a5c\nLDR             R2, =0x26B                                             ; +0x2c, 0x7e9a60\nADD             R8, PC, R8; \"crypto/ec/ec_key.c\"                       ; +0x30, 0x7e9a64\nMOV             R1, R8                                                 ; +0x34, 0x7e9a68\nBL              CRYPTO_malloc                                          ; +0x38, 0x7e9a6c\nSUBS            R7, R0, #0                                             ; +0x3c, 0x7e9a70\nBEQ             loc_7E9A54                                             ; +0x40, 0x7e9a74\nMOV             R2, R4                                                 ; +0x44, 0x7e9a78\nMOV             R0, R5                                                 ; +0x48, 0x7e9a7c\nMOV             R1, R7                                                 ; +0x4c, 0x7e9a80\nBL              EC_KEY_priv2oct                                        ; +0x50, 0x7e9a84\nSUBS            R4, R0, #0                                             ; +0x54, 0x7e9a88\nBEQ             loc_7E9A9C                                             ; +0x58, 0x7e9a8c\nMOV             R0, R4                                                 ; +0x5c, 0x7e9a90\nSTR             R7, [R6]                                               ; +0x60, 0x7e9a94\nPOP             {R4-R8,PC}                                             ; +0x64, 0x7e9a98\nMOV             R0, R7                                                 ; +0x68, 0x7e9a9c\nMOV             R1, R8                                                 ; +0x6c, 0x7e9aa0\nMOV             R2, #0x270                                             ; +0x70, 0x7e9aa4\nBL              CRYPTO_free                                            ; +0x74, 0x7e9aa8\nMOV             R0, R4                                                 ; +0x78, 0x7e9aac\nPOP             {R4-R8,PC}                                             ; +0x7c, 0x7e9ab0", "xrefs": ["sub_7E5364 @ 0x7e544c", "EC_KEY_print @ 0x7e56d8", "i2d_ECPrivateKey @ 0x7e7730", "<???> @ 0x6121c"], "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"}