{"type": "func", "start": 16851272, "end": 16851524, "name": "EC_POINT_set_compressed_coordinates_GF2m", "pseudocode": "// \n// EC_POINT_set_compressed_coordinates_GF2m from 0x1012148 to 0x1012244 (252 bytes)\n// \n// 2 xrefs:\n// > ec_GF2m_simple_oct2point @ 0x10b1248\n// > <???> @ 0x8b7f8\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:03 +0000\n// \n\n__int64 __fastcall EC_POINT_set_compressed_coordinates_GF2m(\n        __int64 a1,\n        _QWORD *a2,\n        __int64 a3,\n        unsigned int a4,\n        __int64 a5)\n{\n  _DWORD *v5; // x5\n  unsigned int (*v6)(void); // x8\n\n  v5 = *(_DWORD **)a1;\n  v6 = *(unsigned int (**)(void))(*(_QWORD *)a1 + 152LL);\n  if ( v6 )\n  {\n    if ( v5 != (_DWORD *)*a2 )\n      goto LABEL_3;\n    if ( (*v5 & 1) == 0 )\n      return v6();\n  }\n  else\n  {\n    if ( (*v5 & 1) == 0 )\n    {\n      ERR_put_error(16, 186, 66, \"crypto/ec/ec_oct.c\", 66);\n      return 0;\n    }\n    if ( v5 != (_DWORD *)*a2 )\n    {\nLABEL_3:\n      ERR_put_error(16, 186, 101, \"crypto/ec/ec_oct.c\", 71);\n      return 0;\n    }\n  }\n  if ( v5[1] == 406 )\n    return ec_GFp_simple_set_compressed_coordinates(a1, a2, a3, a4, a5);\n  else\n    return ec_GF2m_simple_set_compressed_coordinates(a1, a2, a3, a4, a5);\n}", "assembly": "; \n; EC_POINT_set_compressed_coordinates_GF2m from 0x1012148 to 0x1012244 (252 bytes)\n; \n; 2 xrefs:\n; > ec_GF2m_simple_oct2point @ 0x10b1248\n; > <???> @ 0x8b7f8\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:03 +0000\n; \nSTP             X29, X30, [SP,#var_20]!                                ; +0x0, 0x1012148\nMOV             X7, X0                                                 ; +0x4, 0x101214c\nMOV             X6, X1                                                 ; +0x8, 0x1012150\nMOV             X29, SP                                                ; +0xc, 0x1012154\nLDR             X5, [X0]                                               ; +0x10, 0x1012158\nMOV             X10, X2                                                ; +0x14, 0x101215c\nSTR             X19, [SP,#0x20+var_10]                                 ; +0x18, 0x1012160\nMOV             W11, W3                                                ; +0x1c, 0x1012164\nMOV             X12, X4                                                ; +0x20, 0x1012168\nLDR             X8, [X5,#0x98]                                         ; +0x24, 0x101216c\nCBZ             X8, loc_10121F0                                        ; +0x28, 0x1012170\nLDR             X9, [X1]                                               ; +0x2c, 0x1012174\nCMP             X5, X9                                                 ; +0x30, 0x1012178\nB.EQ            loc_10121B0                                            ; +0x34, 0x101217c\nADRP            X3, #aCryptoEcEcOctC@PAGE; \"crypto/ec/ec_oct.c\"        ; +0x38, 0x1012180\nMOV             W0, #0x10                                              ; +0x3c, 0x1012184\nMOV             W1, #0xBA                                              ; +0x40, 0x1012188\nMOV             W2, #0x65 ; 'e'                                        ; +0x44, 0x101218c\nADD             X3, X3, #aCryptoEcEcOctC@PAGEOFF; \"crypto/ec/ec_oct.c\" ; +0x48, 0x1012190\nMOV             W4, #0x47 ; 'G'                                        ; +0x4c, 0x1012194\nMOV             W19, #0                                                ; +0x50, 0x1012198\nBL              ERR_put_error                                          ; +0x54, 0x101219c\nMOV             W0, W19                                                ; +0x58, 0x10121a0\nLDR             X19, [SP,#0x20+var_10]                                 ; +0x5c, 0x10121a4\nLDP             X29, X30, [SP+0x20+var_20],#0x20                       ; +0x60, 0x10121a8\nRET                                                                    ; +0x64, 0x10121ac\nLDR             W9, [X5]                                               ; +0x68, 0x10121b0\nTBZ             W9, #0, loc_101220C                                    ; +0x6c, 0x10121b4\nLDR             W0, [X5,#4]                                            ; +0x70, 0x10121b8\nMOV             X1, X6                                                 ; +0x74, 0x10121bc\nMOV             X2, X10                                                ; +0x78, 0x10121c0\nMOV             W3, W11                                                ; +0x7c, 0x10121c4\nCMP             W0, #0x196                                             ; +0x80, 0x10121c8\nMOV             X4, X12                                                ; +0x84, 0x10121cc\nMOV             X0, X7                                                 ; +0x88, 0x10121d0\nB.EQ            loc_10121E4                                            ; +0x8c, 0x10121d4\nLDR             X19, [SP,#0x20+var_10]                                 ; +0x90, 0x10121d8\nLDP             X29, X30, [SP+0x20+var_20],#0x20                       ; +0x94, 0x10121dc\nB               ec_GF2m_simple_set_compressed_coordinates              ; +0x98, 0x10121e0\nLDR             X19, [SP,#0x20+var_10]                                 ; +0x9c, 0x10121e4\nLDP             X29, X30, [SP+0x20+var_20],#0x20                       ; +0xa0, 0x10121e8\nB               ec_GFp_simple_set_compressed_coordinates               ; +0xa4, 0x10121ec\nLDR             W0, [X5]                                               ; +0xa8, 0x10121f0\nAND             W19, W0, #1                                            ; +0xac, 0x10121f4\nTBZ             W0, #0, loc_1012224                                    ; +0xb0, 0x10121f8\nLDR             X0, [X1]                                               ; +0xb4, 0x10121fc\nCMP             X5, X0                                                 ; +0xb8, 0x1012200\nB.NE            loc_1012180                                            ; +0xbc, 0x1012204\nB               loc_10121B8                                            ; +0xc0, 0x1012208\nBLR             X8                                                     ; +0xc4, 0x101220c\nMOV             W19, W0                                                ; +0xc8, 0x1012210\nMOV             W0, W19                                                ; +0xcc, 0x1012214\nLDR             X19, [SP,#0x20+var_10]                                 ; +0xd0, 0x1012218\nLDP             X29, X30, [SP+0x20+var_20],#0x20                       ; +0xd4, 0x101221c\nRET                                                                    ; +0xd8, 0x1012220\nMOV             W2, #0x42 ; 'B'                                        ; +0xdc, 0x1012224\nADRP            X3, #aCryptoEcEcOctC@PAGE; \"crypto/ec/ec_oct.c\"        ; +0xe0, 0x1012228\nMOV             W0, #0x10                                              ; +0xe4, 0x101222c\nMOV             W1, #0xBA                                              ; +0xe8, 0x1012230\nADD             X3, X3, #aCryptoEcEcOctC@PAGEOFF; \"crypto/ec/ec_oct.c\" ; +0xec, 0x1012234\nMOV             W4, W2                                                 ; +0xf0, 0x1012238\nBL              ERR_put_error                                          ; +0xf4, 0x101223c\nB               loc_10121A0                                            ; +0xf8, 0x1012240", "xrefs": ["ec_GF2m_simple_oct2point @ 0x10b1248", "<???> @ 0x8b7f8"], "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"}