{"type": "func", "start": 10480660, "end": 10480980, "name": "EC_GROUP_new", "pseudocode": "// \n// EC_GROUP_new from 0x9fec14 to 0x9fed54 (320 bytes)\n// \n// 7 xrefs:\n// > EC_GROUP_new_by_curve_name @ 0x9fcc64\n// > EC_GROUP_new_by_curve_name @ 0x9fccd8\n// > EC_GROUP_new_curve_GFp @ 0x9fd4a8\n// > EC_GROUP_new_curve_GF2m @ 0x9fd50c\n// > EC_KEY_copy @ 0x9fd750\n// > EC_GROUP_dup @ 0x9ff734\n// > <???> @ 0x7b02c\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:37 +0000\n// \n\nint **__fastcall EC_GROUP_new(int *a1)\n{\n  int **v2; // r0\n  int **v3; // r4\n  int v4; // r3\n  int (__fastcall *v5)(int **); // r3\n  int v7; // r0\n  int v8; // r0\n\n  if ( a1 )\n  {\n    if ( a1[2] )\n    {\n      v2 = (int **)CRYPTO_zalloc(100, \"crypto/ec/ec_lib.c\", 38);\n      v3 = v2;\n      if ( v2 )\n      {\n        v4 = *a1;\n        *v2 = a1;\n        if ( (v4 & 2) != 0 )\n          goto LABEL_5;\n        v7 = BN_new();\n        v3[2] = (int *)v7;\n        if ( !v7 )\n        {\nLABEL_10:\n          BN_free(v7);\n          BN_free((int)v3[3]);\n          CRYPTO_free(v3, \"crypto/ec/ec_lib.c\", 62);\n          return nullptr;\n        }\n        v8 = BN_new();\n        v3[3] = (int *)v8;\n        if ( v8 )\n        {\nLABEL_5:\n          v5 = (int (__fastcall *)(int **))a1[2];\n          v3[5] = &dword_0 + 1;\n          v3[6] = (int *)&byte_4;\n          if ( v5(v3) )\n            return v3;\n        }\n        v7 = (int)v3[2];\n        goto LABEL_10;\n      }\n      ERR_put_error(16, 108, 65, \"crypto/ec/ec_lib.c\", 40);\n      return nullptr;\n    }\n    else\n    {\n      ERR_put_error(16, 108, 66, \"crypto/ec/ec_lib.c\", 34);\n      return nullptr;\n    }\n  }\n  else\n  {\n    ERR_put_error(16, 108, 108, \"crypto/ec/ec_lib.c\", 30);\n    return nullptr;\n  }\n}", "assembly": "; \n; EC_GROUP_new from 0x9fec14 to 0x9fed54 (320 bytes)\n; \n; 7 xrefs:\n; > EC_GROUP_new_by_curve_name @ 0x9fcc64\n; > EC_GROUP_new_by_curve_name @ 0x9fccd8\n; > EC_GROUP_new_curve_GFp @ 0x9fd4a8\n; > EC_GROUP_new_curve_GF2m @ 0x9fd50c\n; > EC_KEY_copy @ 0x9fd750\n; > EC_GROUP_dup @ 0x9ff734\n; > <???> @ 0x7b02c\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:37 +0000\n; \nPUSH            {R4-R6,LR}                                             ; +0x0, 0x9fec14\nSUBS            R5, R0, #0                                             ; +0x4, 0x9fec18\nSUB             SP, SP, #8                                             ; +0x8, 0x9fec1c\nBEQ             loc_9FED08                                             ; +0xc, 0x9fec20\nLDR             R4, [R5,#8]                                            ; +0x10, 0x9fec24\nCMP             R4, #0                                                 ; +0x14, 0x9fec28\nBEQ             loc_9FECE0                                             ; +0x18, 0x9fec2c\nLDR             R6, =(aCryptoEcEcLibC - 0x9FEC40); \"crypto/ec/ec_lib.c\" ; +0x1c, 0x9fec30\nMOV             R0, #0x64 ; 'd'                                        ; +0x20, 0x9fec34\nADD             R6, PC, R6; \"crypto/ec/ec_lib.c\"                       ; +0x24, 0x9fec38\nMOV             R1, R6                                                 ; +0x28, 0x9fec3c\nMOV             R2, #0x26 ; '&'                                        ; +0x2c, 0x9fec40\nBL              CRYPTO_zalloc                                          ; +0x30, 0x9fec44\nSUBS            R4, R0, #0                                             ; +0x34, 0x9fec48\nBEQ             loc_9FED30                                             ; +0x38, 0x9fec4c\nLDR             R3, [R5]                                               ; +0x3c, 0x9fec50\nSTR             R5, [R4]                                               ; +0x40, 0x9fec54\nTST             R3, #2                                                 ; +0x44, 0x9fec58\nBEQ             loc_9FEC90                                             ; +0x48, 0x9fec5c\nMOV             R1, #1                                                 ; +0x4c, 0x9fec60\nMOV             R2, #4                                                 ; +0x50, 0x9fec64\nLDR             R3, [R5,#8]                                            ; +0x54, 0x9fec68\nMOV             R0, R4                                                 ; +0x58, 0x9fec6c\nSTR             R1, [R4,#0x14]                                         ; +0x5c, 0x9fec70\nSTR             R2, [R4,#0x18]                                         ; +0x60, 0x9fec74\nBLX             R3                                                     ; +0x64, 0x9fec78\nCMP             R0, #0                                                 ; +0x68, 0x9fec7c\nBEQ             loc_9FECB0                                             ; +0x6c, 0x9fec80\nMOV             R0, R4                                                 ; +0x70, 0x9fec84\nADD             SP, SP, #8                                             ; +0x74, 0x9fec88\nPOP             {R4-R6,PC}                                             ; +0x78, 0x9fec8c\nBL              BN_new                                                 ; +0x7c, 0x9fec90\nCMP             R0, #0                                                 ; +0x80, 0x9fec94\nSTR             R0, [R4,#8]                                            ; +0x84, 0x9fec98\nBEQ             loc_9FECB4                                             ; +0x88, 0x9fec9c\nBL              BN_new                                                 ; +0x8c, 0x9feca0\nCMP             R0, #0                                                 ; +0x90, 0x9feca4\nSTR             R0, [R4,#0xC]                                          ; +0x94, 0x9feca8\nBNE             loc_9FEC60                                             ; +0x98, 0x9fecac\nLDR             R0, [R4,#8]                                            ; +0x9c, 0x9fecb0\nBL              BN_free                                                ; +0xa0, 0x9fecb4\nLDR             R0, [R4,#0xC]                                          ; +0xa4, 0x9fecb8\nBL              BN_free                                                ; +0xa8, 0x9fecbc\nLDR             R1, =(aCryptoEcEcLibC - 0x9FECD0); \"crypto/ec/ec_lib.c\" ; +0xac, 0x9fecc0\nMOV             R0, R4                                                 ; +0xb0, 0x9fecc4\nADD             R1, PC, R1; \"crypto/ec/ec_lib.c\"                       ; +0xb4, 0x9fecc8\nMOV             R2, #0x3E ; '>'                                        ; +0xb8, 0x9feccc\nBL              CRYPTO_free                                            ; +0xbc, 0x9fecd0\nMOV             R0, #0                                                 ; +0xc0, 0x9fecd4\nADD             SP, SP, #8                                             ; +0xc4, 0x9fecd8\nPOP             {R4-R6,PC}                                             ; +0xc8, 0x9fecdc\nMOV             R3, #0x22 ; '\"'                                        ; +0xcc, 0x9fece0\nSTR             R3, [SP,#8+var_8]                                      ; +0xd0, 0x9fece4\nLDR             R3, =(aCryptoEcEcLibC - 0x9FED00); \"crypto/ec/ec_lib.c\" ; +0xd4, 0x9fece8\nMOV             R0, #0x10                                              ; +0xd8, 0x9fecec\nMOV             R1, #0x6C ; 'l'                                        ; +0xdc, 0x9fecf0\nMOV             R2, #0x42 ; 'B'                                        ; +0xe0, 0x9fecf4\nADD             R3, PC, R3; \"crypto/ec/ec_lib.c\"                       ; +0xe4, 0x9fecf8\nBL              ERR_put_error                                          ; +0xe8, 0x9fecfc\nMOV             R0, R4                                                 ; +0xec, 0x9fed00\nB               loc_9FEC88                                             ; +0xf0, 0x9fed04\nMOV             R3, #0x1E                                              ; +0xf4, 0x9fed08\nSTR             R3, [SP,#8+var_8]                                      ; +0xf8, 0x9fed0c\nLDR             R3, =(aCryptoEcEcLibC - 0x9FED28); \"crypto/ec/ec_lib.c\" ; +0xfc, 0x9fed10\nMOV             R1, #0x6C ; 'l'                                        ; +0x100, 0x9fed14\nMOV             R0, #0x10                                              ; +0x104, 0x9fed18\nMOV             R2, R1                                                 ; +0x108, 0x9fed1c\nADD             R3, PC, R3; \"crypto/ec/ec_lib.c\"                       ; +0x10c, 0x9fed20\nBL              ERR_put_error                                          ; +0x110, 0x9fed24\nMOV             R0, R5                                                 ; +0x114, 0x9fed28\nB               loc_9FEC88                                             ; +0x118, 0x9fed2c\nMOV             R2, #0x28 ; '('                                        ; +0x11c, 0x9fed30\nSTR             R2, [SP,#8+var_8]                                      ; +0x120, 0x9fed34\nMOV             R0, #0x10                                              ; +0x124, 0x9fed38\nMOV             R3, R6                                                 ; +0x128, 0x9fed3c\nMOV             R1, #0x6C ; 'l'                                        ; +0x12c, 0x9fed40\nMOV             R2, #0x41 ; 'A'                                        ; +0x130, 0x9fed44\nBL              ERR_put_error                                          ; +0x134, 0x9fed48\nMOV             R0, R4                                                 ; +0x138, 0x9fed4c\nB               loc_9FEC88                                             ; +0x13c, 0x9fed50", "xrefs": ["EC_GROUP_new_by_curve_name @ 0x9fcc64", "EC_GROUP_new_by_curve_name @ 0x9fccd8", "EC_GROUP_new_curve_GFp @ 0x9fd4a8", "EC_GROUP_new_curve_GF2m @ 0x9fd50c", "EC_KEY_copy @ 0x9fd750", "EC_GROUP_dup @ 0x9ff734", "<???> @ 0x7b02c"], "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"}