{"type": "func", "start": 16851524, "end": 16851772, "name": "EC_POINT_point2oct", "pseudocode": "// \n// EC_POINT_point2oct from 0x1012244 to 0x101233c (248 bytes)\n// \n// 6 xrefs:\n// > i2o_ECPublicKey @ 0x100d0ec\n// > i2o_ECPublicKey @ 0x100d11c\n// > i2o_ECPublicKey @ 0x100d184\n// > EC_POINT_point2buf @ 0x1012470\n// > EC_POINT_point2buf @ 0x10124cc\n// > <???> @ 0x52b88\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_point2oct(__int64 a1, _QWORD *a2)\n{\n  _DWORD *v2; // x6\n  __int64 (*v3)(void); // x19\n\n  v2 = *(_DWORD **)a1;\n  v3 = *(__int64 (**)(void))(*(_QWORD *)a1 + 160LL);\n  if ( v3 )\n  {\n    if ( v2 != (_DWORD *)*a2 )\n    {\nLABEL_3:\n      ERR_put_error(16, 123, 101, \"crypto/ec/ec_oct.c\", 97);\n      return 0;\n    }\n    if ( (*v2 & 1) == 0 )\n      return v3();\n  }\n  else\n  {\n    if ( (*v2 & 1) == 0 )\n    {\n      ERR_put_error(16, 123, 66, \"crypto/ec/ec_oct.c\", 93);\n      return 0;\n    }\n    if ( v2 != (_DWORD *)*a2 )\n      goto LABEL_3;\n  }\n  if ( v2[1] == 406 )\n    return ec_GFp_simple_point2oct(a1);\n  else\n    return ec_GF2m_simple_point2oct(a1);\n}", "assembly": "; \n; EC_POINT_point2oct from 0x1012244 to 0x101233c (248 bytes)\n; \n; 6 xrefs:\n; > i2o_ECPublicKey @ 0x100d0ec\n; > i2o_ECPublicKey @ 0x100d11c\n; > i2o_ECPublicKey @ 0x100d184\n; > EC_POINT_point2buf @ 0x1012470\n; > EC_POINT_point2buf @ 0x10124cc\n; > <???> @ 0x52b88\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, 0x1012244\nMOV             X8, X0                                                 ; +0x4, 0x1012248\nMOV             X7, X1                                                 ; +0x8, 0x101224c\nMOV             X29, SP                                                ; +0xc, 0x1012250\nLDR             X6, [X0]                                               ; +0x10, 0x1012254\nMOV             W10, W2                                                ; +0x14, 0x1012258\nSTR             X19, [SP,#0x20+var_10]                                 ; +0x18, 0x101225c\nMOV             X11, X3                                                ; +0x1c, 0x1012260\nMOV             X12, X4                                                ; +0x20, 0x1012264\nMOV             X13, X5                                                ; +0x24, 0x1012268\nLDR             X19, [X6,#0xA0]                                        ; +0x28, 0x101226c\nCBZ             X19, loc_10122F0                                       ; +0x2c, 0x1012270\nLDR             X9, [X1]                                               ; +0x30, 0x1012274\nCMP             X6, X9                                                 ; +0x34, 0x1012278\nB.EQ            loc_10122AC                                            ; +0x38, 0x101227c\nADRP            X3, #aCryptoEcEcOctC@PAGE; \"crypto/ec/ec_oct.c\"        ; +0x3c, 0x1012280\nMOV             W0, #0x10                                              ; +0x40, 0x1012284\nMOV             W1, #0x7B ; '{'                                        ; +0x44, 0x1012288\nMOV             W2, #0x65 ; 'e'                                        ; +0x48, 0x101228c\nADD             X3, X3, #aCryptoEcEcOctC@PAGEOFF; \"crypto/ec/ec_oct.c\" ; +0x4c, 0x1012290\nMOV             W4, #0x61 ; 'a'                                        ; +0x50, 0x1012294\nBL              ERR_put_error                                          ; +0x54, 0x1012298\nMOV             X0, #0                                                 ; +0x58, 0x101229c\nLDR             X19, [SP,#0x20+var_10]                                 ; +0x5c, 0x10122a0\nLDP             X29, X30, [SP+0x20+var_20],#0x20                       ; +0x60, 0x10122a4\nRET                                                                    ; +0x64, 0x10122a8\nLDR             W9, [X6]                                               ; +0x68, 0x10122ac\nTBZ             W9, #0, loc_1012308                                    ; +0x6c, 0x10122b0\nLDR             W0, [X6,#4]                                            ; +0x70, 0x10122b4\nMOV             X1, X7                                                 ; +0x74, 0x10122b8\nMOV             W2, W10                                                ; +0x78, 0x10122bc\nMOV             X3, X11                                                ; +0x7c, 0x10122c0\nCMP             W0, #0x196                                             ; +0x80, 0x10122c4\nMOV             X4, X12                                                ; +0x84, 0x10122c8\nMOV             X0, X8                                                 ; +0x88, 0x10122cc\nMOV             X5, X13                                                ; +0x8c, 0x10122d0\nB.EQ            loc_10122E4                                            ; +0x90, 0x10122d4\nLDR             X19, [SP,#0x20+var_10]                                 ; +0x94, 0x10122d8\nLDP             X29, X30, [SP+0x20+var_20],#0x20                       ; +0x98, 0x10122dc\nB               ec_GF2m_simple_point2oct                               ; +0x9c, 0x10122e0\nLDR             X19, [SP,#0x20+var_10]                                 ; +0xa0, 0x10122e4\nLDP             X29, X30, [SP+0x20+var_20],#0x20                       ; +0xa4, 0x10122e8\nB               ec_GFp_simple_point2oct                                ; +0xa8, 0x10122ec\nLDR             W0, [X6]                                               ; +0xac, 0x10122f0\nTBZ             W0, #0, loc_1012318                                    ; +0xb0, 0x10122f4\nLDR             X0, [X1]                                               ; +0xb4, 0x10122f8\nCMP             X6, X0                                                 ; +0xb8, 0x10122fc\nB.NE            loc_1012280                                            ; +0xbc, 0x1012300\nB               loc_10122B4                                            ; +0xc0, 0x1012304\nBLR             X19                                                    ; +0xc4, 0x1012308\nLDR             X19, [SP,#0x20+var_10]                                 ; +0xc8, 0x101230c\nLDP             X29, X30, [SP+0x20+var_20],#0x20                       ; +0xcc, 0x1012310\nRET                                                                    ; +0xd0, 0x1012314\nADRP            X3, #aCryptoEcEcOctC@PAGE; \"crypto/ec/ec_oct.c\"        ; +0xd4, 0x1012318\nMOV             W0, #0x10                                              ; +0xd8, 0x101231c\nMOV             W1, #0x7B ; '{'                                        ; +0xdc, 0x1012320\nMOV             W2, #0x42 ; 'B'                                        ; +0xe0, 0x1012324\nADD             X3, X3, #aCryptoEcEcOctC@PAGEOFF; \"crypto/ec/ec_oct.c\" ; +0xe4, 0x1012328\nMOV             W4, #0x5D ; ']'                                        ; +0xe8, 0x101232c\nBL              ERR_put_error                                          ; +0xec, 0x1012330\nMOV             X0, X19                                                ; +0xf0, 0x1012334\nB               loc_10122A0                                            ; +0xf4, 0x1012338", "xrefs": ["i2o_ECPublicKey @ 0x100d0ec", "i2o_ECPublicKey @ 0x100d11c", "i2o_ECPublicKey @ 0x100d184", "EC_POINT_point2buf @ 0x1012470", "EC_POINT_point2buf @ 0x10124cc", "<???> @ 0x52b88"], "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"}