{"type": "func", "start": 10479504, "end": 10479944, "name": "EC_KEY_new_method", "pseudocode": "// \n// EC_KEY_new_method from 0x9fe790 to 0x9fe948 (440 bytes)\n// \n// 3 xrefs:\n// > EC_KEY_new @ 0x9fd558\n// > EC_KEY_dup @ 0x9fd8f0\n// > <???> @ 0x7b0dc\n// \n// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!\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 12:07:36 +0000\n// \n\n_DWORD *__fastcall EC_KEY_new_method(int a1)\n{\n  int v2; // r0\n  _DWORD *v3; // r4\n  int v4; // r6\n  int default_EC; // r0\n  int EC; // r0\n  _DWORD *result; // r0\n  int (__fastcall *v8)(_DWORD *); // r3\n\n  v2 = CRYPTO_zalloc(48, \"crypto/ec/ec_kmeth.c\", 75);\n  v3 = (_DWORD *)v2;\n  if ( !v2 )\n  {\n    ERR_put_error(16, 245, 65, \"crypto/ec/ec_kmeth.c\", 78);\n    return nullptr;\n  }\n  *(_DWORD *)(v2 + 32) = 1;\n  v4 = CRYPTO_THREAD_lock_new(v2);\n  v3[11] = v4;\n  if ( !v4 )\n  {\n    ERR_put_error(16, 245, 65, \"crypto/ec/ec_kmeth.c\", 85);\n    CRYPTO_free(v3, \"crypto/ec/ec_kmeth.c\", 86);\n    return nullptr;\n  }\n  *v3 = EC_KEY_get_default_method();\n  if ( a1 )\n  {\n    if ( !ENGINE_init(a1) )\n    {\n      ERR_put_error(16, 245, 38, \"crypto/ec/ec_kmeth.c\", 94);\nLABEL_14:\n      EC_KEY_free((int)v3);\n      return nullptr;\n    }\n    v3[1] = a1;\n    default_EC = a1;\n  }\n  else\n  {\n    default_EC = ENGINE_get_default_EC();\n    v3[1] = default_EC;\n    if ( !default_EC )\n      goto LABEL_8;\n  }\n  EC = ENGINE_get_EC(default_EC);\n  *v3 = EC;\n  if ( !EC )\n  {\n    ERR_put_error(16, 245, 38, \"crypto/ec/ec_kmeth.c\", 103);\n    goto LABEL_14;\n  }\nLABEL_8:\n  v3[2] = 1;\n  v3[7] = 4;\n  if ( !CRYPTO_new_ex_data(8, v3, v3 + 10) )\n    goto LABEL_14;\n  result = v3;\n  v8 = *(int (__fastcall **)(_DWORD *))(*v3 + 8);\n  if ( v8 )\n  {\n    if ( v8(v3) )\n      return v3;\n    ERR_put_error(16, 245, 70, \"crypto/ec/ec_kmeth.c\", 117);\n    goto LABEL_14;\n  }\n  return result;\n}", "assembly": "; \n; EC_KEY_new_method from 0x9fe790 to 0x9fe948 (440 bytes)\n; \n; 3 xrefs:\n; > EC_KEY_new @ 0x9fd558\n; > EC_KEY_dup @ 0x9fd8f0\n; > <???> @ 0x7b0dc\n; \n; This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!\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 12:07:36 +0000\n; \nPUSH            {R4-R7,LR}                                             ; +0x0, 0x9fe790\nLDR             R7, =(aCryptoEcEcKmet - 0x9FE7A4); \"crypto/ec/ec_kmeth.c\" ; +0x4, 0x9fe794\nSUB             SP, SP, #0xC                                           ; +0x8, 0x9fe798\nADD             R7, PC, R7; \"crypto/ec/ec_kmeth.c\"                     ; +0xc, 0x9fe79c\nMOV             R5, R0                                                 ; +0x10, 0x9fe7a0\nMOV             R1, R7                                                 ; +0x14, 0x9fe7a4\nMOV             R0, #0x30 ; '0'                                        ; +0x18, 0x9fe7a8\nMOV             R2, #0x4B ; 'K'                                        ; +0x1c, 0x9fe7ac\nBL              CRYPTO_zalloc                                          ; +0x20, 0x9fe7b0\nSUBS            R4, R0, #0                                             ; +0x24, 0x9fe7b4\nBEQ             loc_9FE8CC                                             ; +0x28, 0x9fe7b8\nMOV             R3, #1                                                 ; +0x2c, 0x9fe7bc\nSTR             R3, [R4,#0x20]                                         ; +0x30, 0x9fe7c0\nBL              CRYPTO_THREAD_lock_new                                 ; +0x34, 0x9fe7c4\nCMP             R0, #0                                                 ; +0x38, 0x9fe7c8\nMOV             R6, R0                                                 ; +0x3c, 0x9fe7cc\nSTR             R0, [R4,#0x2C]                                         ; +0x40, 0x9fe7d0\nBEQ             loc_9FE8F0                                             ; +0x44, 0x9fe7d4\nBL              EC_KEY_get_default_method                              ; +0x48, 0x9fe7d8\nCMP             R5, #0                                                 ; +0x4c, 0x9fe7dc\nSTR             R0, [R4]                                               ; +0x50, 0x9fe7e0\nBEQ             loc_9FE898                                             ; +0x54, 0x9fe7e4\nMOV             R0, R5                                                 ; +0x58, 0x9fe7e8\nBL              ENGINE_init                                            ; +0x5c, 0x9fe7ec\nCMP             R0, #0                                                 ; +0x60, 0x9fe7f0\nSTRNE           R5, [R4,#4]                                            ; +0x64, 0x9fe7f4\nMOVNE           R0, R5                                                 ; +0x68, 0x9fe7f8\nBEQ             loc_9FE8AC                                             ; +0x6c, 0x9fe7fc\nBL              ENGINE_get_EC                                          ; +0x70, 0x9fe800\nCMP             R0, #0                                                 ; +0x74, 0x9fe804\nSTR             R0, [R4]                                               ; +0x78, 0x9fe808\nBEQ             loc_9FE924                                             ; +0x7c, 0x9fe80c\nMOV             R2, #1                                                 ; +0x80, 0x9fe810\nMOV             R3, #4                                                 ; +0x84, 0x9fe814\nSTR             R2, [R4,#8]                                            ; +0x88, 0x9fe818\nSTR             R3, [R4,#0x1C]                                         ; +0x8c, 0x9fe81c\nMOV             R0, #8                                                 ; +0x90, 0x9fe820\nMOV             R1, R4                                                 ; +0x94, 0x9fe824\nADD             R2, R4, #0x28 ; '('                                    ; +0x98, 0x9fe828\nBL              CRYPTO_new_ex_data                                     ; +0x9c, 0x9fe82c\nCMP             R0, #0                                                 ; +0xa0, 0x9fe830\nBEQ             loc_9FE884                                             ; +0xa4, 0x9fe834\nLDR             R3, [R4]                                               ; +0xa8, 0x9fe838\nMOV             R0, R4                                                 ; +0xac, 0x9fe83c\nLDR             R3, [R3,#8]                                            ; +0xb0, 0x9fe840\nCMP             R3, #0                                                 ; +0xb4, 0x9fe844\nBEQ             loc_9FE85C                                             ; +0xb8, 0x9fe848\nBLX             R3                                                     ; +0xbc, 0x9fe84c\nCMP             R0, #0                                                 ; +0xc0, 0x9fe850\nMOVNE           R0, R4                                                 ; +0xc4, 0x9fe854\nBEQ             loc_9FE864                                             ; +0xc8, 0x9fe858\nADD             SP, SP, #0xC                                           ; +0xcc, 0x9fe85c\nPOP             {R4-R7,PC}                                             ; +0xd0, 0x9fe860\nMOV             R3, #0x75 ; 'u'                                        ; +0xd4, 0x9fe864\nSTR             R3, [SP,#0xC+var_C]                                    ; +0xd8, 0x9fe868\nLDR             R3, =(aCryptoEcEcKmet - 0x9FE884); \"crypto/ec/ec_kmeth.c\" ; +0xdc, 0x9fe86c\nMOV             R0, #0x10                                              ; +0xe0, 0x9fe870\nMOV             R1, #0xF5                                              ; +0xe4, 0x9fe874\nMOV             R2, #0x46 ; 'F'                                        ; +0xe8, 0x9fe878\nADD             R3, PC, R3; \"crypto/ec/ec_kmeth.c\"                     ; +0xec, 0x9fe87c\nBL              ERR_put_error                                          ; +0xf0, 0x9fe880\nMOV             R0, R4                                                 ; +0xf4, 0x9fe884\nBL              EC_KEY_free                                            ; +0xf8, 0x9fe888\nMOV             R0, #0                                                 ; +0xfc, 0x9fe88c\nADD             SP, SP, #0xC                                           ; +0x100, 0x9fe890\nPOP             {R4-R7,PC}                                             ; +0x104, 0x9fe894\nBL              ENGINE_get_default_EC                                  ; +0x108, 0x9fe898\nCMP             R0, #0                                                 ; +0x10c, 0x9fe89c\nSTR             R0, [R4,#4]                                            ; +0x110, 0x9fe8a0\nBEQ             loc_9FE810                                             ; +0x114, 0x9fe8a4\nB               loc_9FE800                                             ; +0x118, 0x9fe8a8\nMOV             R2, #0x5E ; '^'                                        ; +0x11c, 0x9fe8ac\nSTR             R2, [SP,#0xC+var_C]                                    ; +0x120, 0x9fe8b0\nMOV             R3, R7                                                 ; +0x124, 0x9fe8b4\nMOV             R0, #0x10                                              ; +0x128, 0x9fe8b8\nMOV             R1, #0xF5                                              ; +0x12c, 0x9fe8bc\nMOV             R2, #0x26 ; '&'                                        ; +0x130, 0x9fe8c0\nBL              ERR_put_error                                          ; +0x134, 0x9fe8c4\nB               loc_9FE884                                             ; +0x138, 0x9fe8c8\nMOV             R2, #0x4E ; 'N'                                        ; +0x13c, 0x9fe8cc\nSTR             R2, [SP,#0xC+var_C]                                    ; +0x140, 0x9fe8d0\nMOV             R0, #0x10                                              ; +0x144, 0x9fe8d4\nMOV             R3, R7                                                 ; +0x148, 0x9fe8d8\nMOV             R1, #0xF5                                              ; +0x14c, 0x9fe8dc\nMOV             R2, #0x41 ; 'A'                                        ; +0x150, 0x9fe8e0\nBL              ERR_put_error                                          ; +0x154, 0x9fe8e4\nMOV             R0, R4                                                 ; +0x158, 0x9fe8e8\nB               loc_9FE85C                                             ; +0x15c, 0x9fe8ec\nMOV             R3, #0x55 ; 'U'                                        ; +0x160, 0x9fe8f0\nSTR             R3, [SP,#0xC+var_C]                                    ; +0x164, 0x9fe8f4\nMOV             R0, #0x10                                              ; +0x168, 0x9fe8f8\nMOV             R1, #0xF5                                              ; +0x16c, 0x9fe8fc\nMOV             R2, #0x41 ; 'A'                                        ; +0x170, 0x9fe900\nMOV             R3, R7                                                 ; +0x174, 0x9fe904\nBL              ERR_put_error                                          ; +0x178, 0x9fe908\nMOV             R0, R4                                                 ; +0x17c, 0x9fe90c\nMOV             R1, R7                                                 ; +0x180, 0x9fe910\nMOV             R2, #0x56 ; 'V'                                        ; +0x184, 0x9fe914\nBL              CRYPTO_free                                            ; +0x188, 0x9fe918\nMOV             R0, R6                                                 ; +0x18c, 0x9fe91c\nB               loc_9FE85C                                             ; +0x190, 0x9fe920\nMOV             R3, #0x67 ; 'g'                                        ; +0x194, 0x9fe924\nSTR             R3, [SP,#0xC+var_C]                                    ; +0x198, 0x9fe928\nLDR             R3, =(aCryptoEcEcKmet - 0x9FE944); \"crypto/ec/ec_kmeth.c\" ; +0x19c, 0x9fe92c\nMOV             R0, #0x10                                              ; +0x1a0, 0x9fe930\nMOV             R1, #0xF5                                              ; +0x1a4, 0x9fe934\nMOV             R2, #0x26 ; '&'                                        ; +0x1a8, 0x9fe938\nADD             R3, PC, R3; \"crypto/ec/ec_kmeth.c\"                     ; +0x1ac, 0x9fe93c\nBL              ERR_put_error                                          ; +0x1b0, 0x9fe940\nB               loc_9FE884                                             ; +0x1b4, 0x9fe944", "xrefs": ["EC_KEY_new @ 0x9fd558", "EC_KEY_dup @ 0x9fd8f0", "<???> @ 0x7b0dc"], "is_objc": false, "is_32_bit": true, "is_64_bit": false, "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"}