{"type": "func", "start": 16825980, "end": 16826236, "name": "EC_GROUP_get_ecpkparameters", "pseudocode": "// \n// EC_GROUP_get_ecpkparameters from 0x100be7c to 0x100bf7c (256 bytes)\n// \n// 3 xrefs:\n// > i2d_ECPKParameters @ 0x100c928\n// > i2d_ECPrivateKey @ 0x100cde4\n// > <???> @ 0xe4850\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:00 +0000\n// \n\n__int64 __fastcall EC_GROUP_get_ecpkparameters(__int64 a1, __int64 a2)\n{\n  __int64 v2; // x19\n  __int64 curve_name; // x0\n  _QWORD *ecparameters; // x0\n  __int64 v7; // x0\n  __int64 v8; // x0\n\n  v2 = a2;\n  if ( !a2 )\n  {\n    v2 = ECPKPARAMETERS_new();\n    if ( !v2 )\n    {\n      ERR_put_error(16, 262, 65, \"crypto/ec/ec_asn1.c\", 559);\n      return 0;\n    }\n    goto LABEL_4;\n  }\n  if ( !*(_DWORD *)a2 )\n  {\n    ASN1_OBJECT_free(*(_QWORD *)(a2 + 8));\n    if ( !(unsigned int)EC_GROUP_get_asn1_flag(a1) )\n      goto LABEL_8;\nLABEL_5:\n    curve_name = EC_GROUP_get_curve_name(a1);\n    if ( (_DWORD)curve_name )\n    {\n      *(_DWORD *)v2 = 0;\n      v8 = OBJ_nid2obj(curve_name);\n      *(_QWORD *)(v2 + 8) = v8;\n      if ( v8 )\n        return v2;\n    }\n    goto LABEL_6;\n  }\n  if ( *(_DWORD *)a2 != 1 || (v7 = *(_QWORD *)(a2 + 8)) == 0 )\n  {\nLABEL_4:\n    if ( !(unsigned int)EC_GROUP_get_asn1_flag(a1) )\n      goto LABEL_8;\n    goto LABEL_5;\n  }\n  ECPARAMETERS_free(v7);\n  if ( (unsigned int)EC_GROUP_get_asn1_flag(a1) )\n    goto LABEL_5;\nLABEL_8:\n  *(_DWORD *)v2 = 1;\n  ecparameters = EC_GROUP_get_ecparameters(a1, nullptr);\n  *(_QWORD *)(v2 + 8) = ecparameters;\n  if ( !ecparameters )\n  {\nLABEL_6:\n    ECPKPARAMETERS_free(v2);\n    return 0;\n  }\n  return v2;\n}", "assembly": "; \n; EC_GROUP_get_ecpkparameters from 0x100be7c to 0x100bf7c (256 bytes)\n; \n; 3 xrefs:\n; > i2d_ECPKParameters @ 0x100c928\n; > i2d_ECPrivateKey @ 0x100cde4\n; > <???> @ 0xe4850\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:00 +0000\n; \nSTP             X29, X30, [SP,#-0x20+var_s0]!                          ; +0x0, 0x100be7c\nMOV             X29, SP                                                ; +0x4, 0x100be80\nSTP             X19, X20, [SP,#var_s10]                                ; +0x8, 0x100be84\nMOV             X19, X1                                                ; +0xc, 0x100be88\nMOV             X20, X0                                                ; +0x10, 0x100be8c\nCBZ             X1, loc_100BF4C                                        ; +0x14, 0x100be90\nLDR             W0, [X1]                                               ; +0x18, 0x100be94\nCBZ             W0, loc_100BF00                                        ; +0x1c, 0x100be98\nCMP             W0, #1                                                 ; +0x20, 0x100be9c\nB.EQ            loc_100BF18                                            ; +0x24, 0x100bea0\nMOV             X0, X20                                                ; +0x28, 0x100bea4\nBL              EC_GROUP_get_asn1_flag                                 ; +0x2c, 0x100bea8\nCBZ             W0, loc_100BED4                                        ; +0x30, 0x100beac\nMOV             X0, X20                                                ; +0x34, 0x100beb0\nBL              EC_GROUP_get_curve_name                                ; +0x38, 0x100beb4\nCBNZ            W0, loc_100BF34                                        ; +0x3c, 0x100beb8\nMOV             X0, X19                                                ; +0x40, 0x100bebc\nBL              ECPKPARAMETERS_free                                    ; +0x44, 0x100bec0\nMOV             X0, #0                                                 ; +0x48, 0x100bec4\nLDP             X19, X20, [SP,#var_s10]                                ; +0x4c, 0x100bec8\nLDP             X29, X30, [SP+var_s0],#0x20                            ; +0x50, 0x100becc\nRET                                                                    ; +0x54, 0x100bed0\nMOV             W1, #1                                                 ; +0x58, 0x100bed4\nMOV             X0, X20                                                ; +0x5c, 0x100bed8\nSTR             W1, [X19]                                              ; +0x60, 0x100bedc\nMOV             X1, #0                                                 ; +0x64, 0x100bee0\nBL              EC_GROUP_get_ecparameters                              ; +0x68, 0x100bee4\nSTR             X0, [X19,#8]                                           ; +0x6c, 0x100bee8\nCBZ             X0, loc_100BEBC                                        ; +0x70, 0x100beec\nMOV             X0, X19                                                ; +0x74, 0x100bef0\nLDP             X19, X20, [SP,#var_s10]                                ; +0x78, 0x100bef4\nLDP             X29, X30, [SP+var_s0],#0x20                            ; +0x7c, 0x100bef8\nRET                                                                    ; +0x80, 0x100befc\nLDR             X0, [X1,#8]                                            ; +0x84, 0x100bf00\nBL              ASN1_OBJECT_free                                       ; +0x88, 0x100bf04\nMOV             X0, X20                                                ; +0x8c, 0x100bf08\nBL              EC_GROUP_get_asn1_flag                                 ; +0x90, 0x100bf0c\nCBZ             W0, loc_100BED4                                        ; +0x94, 0x100bf10\nB               loc_100BEB0                                            ; +0x98, 0x100bf14\nLDR             X0, [X1,#8]                                            ; +0x9c, 0x100bf18\nCBZ             X0, loc_100BEA4                                        ; +0xa0, 0x100bf1c\nBL              ECPARAMETERS_free                                      ; +0xa4, 0x100bf20\nMOV             X0, X20                                                ; +0xa8, 0x100bf24\nBL              EC_GROUP_get_asn1_flag                                 ; +0xac, 0x100bf28\nCBZ             W0, loc_100BED4                                        ; +0xb0, 0x100bf2c\nB               loc_100BEB0                                            ; +0xb4, 0x100bf30\nSTR             WZR, [X19]                                             ; +0xb8, 0x100bf34\nBL              OBJ_nid2obj                                            ; +0xbc, 0x100bf38\nSTR             X0, [X19,#8]                                           ; +0xc0, 0x100bf3c\nCBZ             X0, loc_100BEBC                                        ; +0xc4, 0x100bf40\nMOV             X0, X19                                                ; +0xc8, 0x100bf44\nB               loc_100BEF4                                            ; +0xcc, 0x100bf48\nBL              ECPKPARAMETERS_new                                     ; +0xd0, 0x100bf4c\nMOV             X19, X0                                                ; +0xd4, 0x100bf50\nCBNZ            X0, loc_100BEA4                                        ; +0xd8, 0x100bf54\nADRP            X3, #aCryptoEcEcAsn1@PAGE; \"crypto/ec/ec_asn1.c\"       ; +0xdc, 0x100bf58\nMOV             W0, #0x10                                              ; +0xe0, 0x100bf5c\nMOV             W1, #0x106                                             ; +0xe4, 0x100bf60\nMOV             W2, #0x41 ; 'A'                                        ; +0xe8, 0x100bf64\nADD             X3, X3, #aCryptoEcEcAsn1@PAGEOFF; \"crypto/ec/ec_asn1.c\" ; +0xec, 0x100bf68\nMOV             W4, #0x22F                                             ; +0xf0, 0x100bf6c\nBL              ERR_put_error                                          ; +0xf4, 0x100bf70\nMOV             X0, X19                                                ; +0xf8, 0x100bf74\nB               loc_100BEC8                                            ; +0xfc, 0x100bf78", "xrefs": ["i2d_ECPKParameters @ 0x100c928", "i2d_ECPrivateKey @ 0x100cde4", "<???> @ 0xe4850"], "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"}