{"type": "func", "start": 16838216, "end": 16838664, "name": "EC_KEY_new_method", "pseudocode": "// \n// EC_KEY_new_method from 0x100ee48 to 0x100f008 (448 bytes)\n// \n// 3 xrefs:\n// > EC_KEY_new @ 0x100dcfc\n// > EC_KEY_dup @ 0x100e040\n// > <???> @ 0x869c8\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_new_method(__int64 a1)\n{\n  __int64 v2; // x19\n  __int64 v3; // x0\n  __int64 v4; // x21\n  __int64 default_EC; // x0\n  __int64 EC; // x0\n  unsigned int (__fastcall *v7)(__int64); // x1\n\n  v2 = CRYPTO_zalloc(80, \"crypto/ec/ec_kmeth.c\", 75);\n  if ( !v2 )\n  {\n    v4 = 0;\n    ERR_put_error(16, 245, 65, \"crypto/ec/ec_kmeth.c\", 78);\n    return v4;\n  }\n  *(_DWORD *)(v2 + 56) = 1;\n  v3 = CRYPTO_THREAD_lock_new(1);\n  *(_QWORD *)(v2 + 72) = v3;\n  v4 = v3;\n  if ( !v3 )\n  {\n    ERR_put_error(16, 245, 65, \"crypto/ec/ec_kmeth.c\", 85);\n    CRYPTO_free(v2, \"crypto/ec/ec_kmeth.c\", 86);\n    return v4;\n  }\n  *(_QWORD *)v2 = EC_KEY_get_default_method();\n  if ( a1 )\n  {\n    if ( !(unsigned int)ENGINE_init(a1) )\n    {\n      ERR_put_error(16, 245, 38, \"crypto/ec/ec_kmeth.c\", 94);\n      goto LABEL_13;\n    }\n    *(_QWORD *)(v2 + 8) = a1;\n    default_EC = a1;\n    goto LABEL_6;\n  }\n  default_EC = ENGINE_get_default_EC();\n  *(_QWORD *)(v2 + 8) = default_EC;\n  if ( default_EC )\n  {\nLABEL_6:\n    EC = ENGINE_get_EC(default_EC);\n    *(_QWORD *)v2 = EC;\n    if ( !EC )\n    {\n      ERR_put_error(16, 245, 38, \"crypto/ec/ec_kmeth.c\", 103);\n      goto LABEL_13;\n    }\n  }\n  *(_DWORD *)(v2 + 16) = 1;\n  *(_DWORD *)(v2 + 52) = 4;\n  if ( (unsigned int)CRYPTO_new_ex_data(8, v2, v2 + 64) )\n  {\n    v7 = *(unsigned int (__fastcall **)(__int64))(*(_QWORD *)v2 + 16LL);\n    if ( !v7 )\n      return v2;\n    v4 = v2;\n    if ( v7(v2) )\n      return v4;\n    ERR_put_error(16, 245, 70, \"crypto/ec/ec_kmeth.c\", 117);\n  }\nLABEL_13:\n  EC_KEY_free(v2);\n  return 0;\n}", "assembly": "; \n; EC_KEY_new_method from 0x100ee48 to 0x100f008 (448 bytes)\n; \n; 3 xrefs:\n; > EC_KEY_new @ 0x100dcfc\n; > EC_KEY_dup @ 0x100e040\n; > <???> @ 0x869c8\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, 0x100ee48\nMOV             W2, #0x4B ; 'K'                                        ; +0x4, 0x100ee4c\nMOV             X29, SP                                                ; +0x8, 0x100ee50\nSTR             X23, [SP,#0x40+var_10]                                 ; +0xc, 0x100ee54\nADRP            X23, #aCryptoEcEcKmet@PAGE; \"crypto/ec/ec_kmeth.c\"     ; +0x10, 0x100ee58\nSTP             X21, X22, [SP,#0x40+var_20]                            ; +0x14, 0x100ee5c\nADD             X22, X23, #aCryptoEcEcKmet@PAGEOFF; \"crypto/ec/ec_kmeth.c\" ; +0x18, 0x100ee60\nSTP             X19, X20, [SP,#0x40+var_30]                            ; +0x1c, 0x100ee64\nMOV             X1, X22                                                ; +0x20, 0x100ee68\nMOV             X20, X0                                                ; +0x24, 0x100ee6c\nMOV             X0, #0x50 ; 'P'                                        ; +0x28, 0x100ee70\nBL              CRYPTO_zalloc                                          ; +0x2c, 0x100ee74\nMOV             X19, X0                                                ; +0x30, 0x100ee78\nCBZ             X0, loc_100EFA0                                        ; +0x34, 0x100ee7c\nMOV             W0, #1                                                 ; +0x38, 0x100ee80\nSTR             W0, [X19,#0x38]                                        ; +0x3c, 0x100ee84\nBL              CRYPTO_THREAD_lock_new                                 ; +0x40, 0x100ee88\nSTR             X0, [X19,#0x48]                                        ; +0x44, 0x100ee8c\nMOV             X21, X0                                                ; +0x48, 0x100ee90\nCBZ             X0, loc_100EFC0                                        ; +0x4c, 0x100ee94\nBL              EC_KEY_get_default_method                              ; +0x50, 0x100ee98\nSTR             X0, [X19]                                              ; +0x54, 0x100ee9c\nCBZ             X20, loc_100EF74                                       ; +0x58, 0x100eea0\nMOV             X0, X20                                                ; +0x5c, 0x100eea4\nBL              ENGINE_init                                            ; +0x60, 0x100eea8\nCBZ             W0, loc_100EF84                                        ; +0x64, 0x100eeac\nSTR             X20, [X19,#8]                                          ; +0x68, 0x100eeb0\nMOV             X0, X20                                                ; +0x6c, 0x100eeb4\nBL              ENGINE_get_EC                                          ; +0x70, 0x100eeb8\nSTR             X0, [X19]                                              ; +0x74, 0x100eebc\nCBZ             X0, loc_100EFEC                                        ; +0x78, 0x100eec0\nMOV             W0, #1                                                 ; +0x7c, 0x100eec4\nMOV             W1, #4                                                 ; +0x80, 0x100eec8\nSTR             W0, [X19,#0x10]                                        ; +0x84, 0x100eecc\nADD             X2, X19, #0x40 ; '@'                                   ; +0x88, 0x100eed0\nSTR             W1, [X19,#0x34]                                        ; +0x8c, 0x100eed4\nMOV             W0, #8                                                 ; +0x90, 0x100eed8\nMOV             X1, X19                                                ; +0x94, 0x100eedc\nBL              CRYPTO_new_ex_data                                     ; +0x98, 0x100eee0\nCBZ             W0, loc_100EF50                                        ; +0x9c, 0x100eee4\nLDR             X0, [X19]                                              ; +0xa0, 0x100eee8\nLDR             X1, [X0,#0x10]                                         ; +0xa4, 0x100eeec\nCBZ             X1, loc_100EF1C                                        ; +0xa8, 0x100eef0\nMOV             X0, X19                                                ; +0xac, 0x100eef4\nMOV             X21, X19                                               ; +0xb0, 0x100eef8\nBLR             X1                                                     ; +0xb4, 0x100eefc\nCBZ             W0, loc_100EF38                                        ; +0xb8, 0x100ef00\nMOV             X0, X21                                                ; +0xbc, 0x100ef04\nLDR             X23, [SP,#0x40+var_10]                                 ; +0xc0, 0x100ef08\nLDP             X19, X20, [SP,#0x40+var_30]                            ; +0xc4, 0x100ef0c\nLDP             X21, X22, [SP,#0x40+var_20]                            ; +0xc8, 0x100ef10\nLDP             X29, X30, [SP+0x40+var_40],#0x40                       ; +0xcc, 0x100ef14\nRET                                                                    ; +0xd0, 0x100ef18\nMOV             X21, X19                                               ; +0xd4, 0x100ef1c\nLDR             X23, [SP,#0x40+var_10]                                 ; +0xd8, 0x100ef20\nMOV             X0, X21                                                ; +0xdc, 0x100ef24\nLDP             X19, X20, [SP,#0x40+var_30]                            ; +0xe0, 0x100ef28\nLDP             X21, X22, [SP,#0x40+var_20]                            ; +0xe4, 0x100ef2c\nLDP             X29, X30, [SP+0x40+var_40],#0x40                       ; +0xe8, 0x100ef30\nRET                                                                    ; +0xec, 0x100ef34\nMOV             W0, #0x10                                              ; +0xf0, 0x100ef38\nMOV             W1, #0xF5                                              ; +0xf4, 0x100ef3c\nMOV             W2, #0x46 ; 'F'                                        ; +0xf8, 0x100ef40\nADD             X3, X23, #aCryptoEcEcKmet@PAGEOFF; \"crypto/ec/ec_kmeth.c\" ; +0xfc, 0x100ef44\nMOV             W4, #0x75 ; 'u'                                        ; +0x100, 0x100ef48\nBL              ERR_put_error                                          ; +0x104, 0x100ef4c\nMOV             X0, X19                                                ; +0x108, 0x100ef50\nMOV             X21, #0                                                ; +0x10c, 0x100ef54\nBL              EC_KEY_free                                            ; +0x110, 0x100ef58\nLDR             X23, [SP,#0x40+var_10]                                 ; +0x114, 0x100ef5c\nMOV             X0, X21                                                ; +0x118, 0x100ef60\nLDP             X19, X20, [SP,#0x40+var_30]                            ; +0x11c, 0x100ef64\nLDP             X21, X22, [SP,#0x40+var_20]                            ; +0x120, 0x100ef68\nLDP             X29, X30, [SP+0x40+var_40],#0x40                       ; +0x124, 0x100ef6c\nRET                                                                    ; +0x128, 0x100ef70\nBL              ENGINE_get_default_EC                                  ; +0x12c, 0x100ef74\nSTR             X0, [X19,#8]                                           ; +0x130, 0x100ef78\nCBZ             X0, loc_100EEC4                                        ; +0x134, 0x100ef7c\nB               loc_100EEB8                                            ; +0x138, 0x100ef80\nMOV             W0, #0x10                                              ; +0x13c, 0x100ef84\nMOV             W1, #0xF5                                              ; +0x140, 0x100ef88\nMOV             W2, #0x26 ; '&'                                        ; +0x144, 0x100ef8c\nMOV             X3, X22                                                ; +0x148, 0x100ef90\nMOV             W4, #0x5E ; '^'                                        ; +0x14c, 0x100ef94\nBL              ERR_put_error                                          ; +0x150, 0x100ef98\nB               loc_100EF50                                            ; +0x154, 0x100ef9c\nMOV             W0, #0x10                                              ; +0x158, 0x100efa0\nMOV             W1, #0xF5                                              ; +0x15c, 0x100efa4\nMOV             W2, #0x41 ; 'A'                                        ; +0x160, 0x100efa8\nMOV             X3, X22                                                ; +0x164, 0x100efac\nMOV             W4, #0x4E ; 'N'                                        ; +0x168, 0x100efb0\nMOV             X21, X19                                               ; +0x16c, 0x100efb4\nBL              ERR_put_error                                          ; +0x170, 0x100efb8\nB               loc_100EF04                                            ; +0x174, 0x100efbc\nMOV             W2, #0x41 ; 'A'                                        ; +0x178, 0x100efc0\nMOV             X3, X22                                                ; +0x17c, 0x100efc4\nMOV             W4, #0x55 ; 'U'                                        ; +0x180, 0x100efc8\nMOV             W0, #0x10                                              ; +0x184, 0x100efcc\nMOV             W1, #0xF5                                              ; +0x188, 0x100efd0\nBL              ERR_put_error                                          ; +0x18c, 0x100efd4\nMOV             X0, X19                                                ; +0x190, 0x100efd8\nMOV             X1, X22                                                ; +0x194, 0x100efdc\nMOV             W2, #0x56 ; 'V'                                        ; +0x198, 0x100efe0\nBL              CRYPTO_free                                            ; +0x19c, 0x100efe4\nB               loc_100EF04                                            ; +0x1a0, 0x100efe8\nMOV             W0, #0x10                                              ; +0x1a4, 0x100efec\nMOV             W1, #0xF5                                              ; +0x1a8, 0x100eff0\nMOV             W2, #0x26 ; '&'                                        ; +0x1ac, 0x100eff4\nADD             X3, X23, #aCryptoEcEcKmet@PAGEOFF; \"crypto/ec/ec_kmeth.c\" ; +0x1b0, 0x100eff8\nMOV             W4, #0x67 ; 'g'                                        ; +0x1b4, 0x100effc\nBL              ERR_put_error                                          ; +0x1b8, 0x100f000\nB               loc_100EF50                                            ; +0x1bc, 0x100f004", "xrefs": ["EC_KEY_new @ 0x100dcfc", "EC_KEY_dup @ 0x100e040", "<???> @ 0x869c8"], "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"}