{"type": "func", "start": 8311552, "end": 8311820, "name": "EC_POINT_point2oct", "pseudocode": "// \n// EC_POINT_point2oct from 0x7ed300 to 0x7ed40c (268 bytes)\n// \n// 6 xrefs:\n// > i2o_ECPublicKey @ 0x7e7c5c\n// > i2o_ECPublicKey @ 0x7e7c98\n// > i2o_ECPublicKey @ 0x7e7cf4\n// > EC_POINT_point2buf @ 0x7ed54c\n// > EC_POINT_point2buf @ 0x7ed59c\n// > <???> @ 0x6153c\n// \n// This function is hookable on this platform!\n// \n// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings\n// \n\nint __fastcall EC_POINT_point2oct(int a1, _DWORD *a2)\n{\n  _DWORD *v2; // r12\n\n  v2 = *(_DWORD **)a1;\n  if ( *(_DWORD *)(*(_DWORD *)a1 + 84) )\n  {\n    if ( v2 != (_DWORD *)*a2 )\n      goto LABEL_3;\n    if ( (*v2 & 1) == 0 )\n      return (*(int (__fastcall **)(int))(*(_DWORD *)a1 + 84))(a1);\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    {\nLABEL_3:\n      ERR_put_error(16, 123, 101, \"crypto/ec/ec_oct.c\", 97);\n      return 0;\n    }\n  }\n  if ( v2[1] == 406 )\n    return ec_GFp_simple_point2oct();\n  else\n    return ec_GF2m_simple_point2oct();\n}", "assembly": "; \n; EC_POINT_point2oct from 0x7ed300 to 0x7ed40c (268 bytes)\n; \n; 6 xrefs:\n; > i2o_ECPublicKey @ 0x7e7c5c\n; > i2o_ECPublicKey @ 0x7e7c98\n; > i2o_ECPublicKey @ 0x7e7cf4\n; > EC_POINT_point2buf @ 0x7ed54c\n; > EC_POINT_point2buf @ 0x7ed59c\n; > <???> @ 0x6153c\n; \n; This function is hookable on this platform!\n; \n; Using BromaIDA 8.0.0 @ https:;github.com/Stazzical/BromaIDA\n; Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https:;github.com/geode-sdk/bindings\n; \n\nLDR             R12, [R0]                                              ; +0x0, 0x7ed300\nPUSH            {R4-R10,LR}                                            ; +0x4, 0x7ed304\nLDR             R5, [R12,#0x54]                                        ; +0x8, 0x7ed308\nSUB             SP, SP, #8                                             ; +0xc, 0x7ed30c\nCMP             R5, #0                                                 ; +0x10, 0x7ed310\nMOV             R4, R0                                                 ; +0x14, 0x7ed314\nMOV             LR, R1                                                 ; +0x18, 0x7ed318\nMOV             R9, R2                                                 ; +0x1c, 0x7ed31c\nMOV             R10, R3                                                ; +0x20, 0x7ed320\nLDR             R7, [SP,#8+arg_0]                                      ; +0x24, 0x7ed324\nLDR             R8, [SP,#8+arg_4]                                      ; +0x28, 0x7ed328\nBEQ             loc_7ED3B4                                             ; +0x2c, 0x7ed32c\nLDR             R6, [R1]                                               ; +0x30, 0x7ed330\nCMP             R12, R6                                                ; +0x34, 0x7ed334\nBEQ             loc_7ED368                                             ; +0x38, 0x7ed338\nMOV             R3, #0x61 ; 'a'                                        ; +0x3c, 0x7ed33c\nSTR             R3, [SP,#8+var_8]                                      ; +0x40, 0x7ed340\nLDR             R3, =(aCryptoEcEcOctC - 0x7ED35C); \"crypto/ec/ec_oct.c\" ; +0x44, 0x7ed344\nMOV             R0, #0x10                                              ; +0x48, 0x7ed348\nMOV             R1, #0x7B ; '{'                                        ; +0x4c, 0x7ed34c\nMOV             R2, #0x65 ; 'e'                                        ; +0x50, 0x7ed350\nADD             R3, PC, R3; \"crypto/ec/ec_oct.c\"                       ; +0x54, 0x7ed354\nBL              ERR_put_error                                          ; +0x58, 0x7ed358\nMOV             R0, #0                                                 ; +0x5c, 0x7ed35c\nADD             SP, SP, #8                                             ; +0x60, 0x7ed360\nPOP             {R4-R10,PC}                                            ; +0x64, 0x7ed364\nLDR             R6, [R12]                                              ; +0x68, 0x7ed368\nTST             R6, #1                                                 ; +0x6c, 0x7ed36c\nBEQ             loc_7ED3D0                                             ; +0x70, 0x7ed370\nLDR             R2, [R12,#4]                                           ; +0x74, 0x7ed374\nLDR             R3, =0x196                                             ; +0x78, 0x7ed378\nSTR             R7, [SP,#8+arg_0]                                      ; +0x7c, 0x7ed37c\nCMP             R2, R3                                                 ; +0x80, 0x7ed380\nSTR             R8, [SP,#8+arg_4]                                      ; +0x84, 0x7ed384\nMOV             R0, R4                                                 ; +0x88, 0x7ed388\nMOV             R1, LR                                                 ; +0x8c, 0x7ed38c\nMOV             R2, R9                                                 ; +0x90, 0x7ed390\nMOV             R3, R10                                                ; +0x94, 0x7ed394\nBEQ             loc_7ED3A8                                             ; +0x98, 0x7ed398\nADD             SP, SP, #8                                             ; +0x9c, 0x7ed39c\nPOP             {R4-R10,LR}                                            ; +0xa0, 0x7ed3a0\nB               ec_GF2m_simple_point2oct                               ; +0xa4, 0x7ed3a4\nADD             SP, SP, #8                                             ; +0xa8, 0x7ed3a8\nPOP             {R4-R10,LR}                                            ; +0xac, 0x7ed3ac\nB               ec_GFp_simple_point2oct                                ; +0xb0, 0x7ed3b0\nLDR             R3, [R12]                                              ; +0xb4, 0x7ed3b4\nTST             R3, #1                                                 ; +0xb8, 0x7ed3b8\nBEQ             loc_7ED3E8                                             ; +0xbc, 0x7ed3bc\nLDR             R3, [R1]                                               ; +0xc0, 0x7ed3c0\nCMP             R12, R3                                                ; +0xc4, 0x7ed3c4\nBNE             loc_7ED33C                                             ; +0xc8, 0x7ed3c8\nB               loc_7ED374                                             ; +0xcc, 0x7ed3cc\nMOV             R12, R5                                                ; +0xd0, 0x7ed3d0\nSTR             R7, [SP,#8+arg_0]                                      ; +0xd4, 0x7ed3d4\nSTR             R8, [SP,#8+arg_4]                                      ; +0xd8, 0x7ed3d8\nADD             SP, SP, #8                                             ; +0xdc, 0x7ed3dc\nPOP             {R4-R10,LR}                                            ; +0xe0, 0x7ed3e0\nBX              R12                                                    ; +0xe4, 0x7ed3e4\nMOV             R3, #0x5D ; ']'                                        ; +0xe8, 0x7ed3e8\nSTR             R3, [SP,#8+var_8]                                      ; +0xec, 0x7ed3ec\nLDR             R3, =(aCryptoEcEcOctC - 0x7ED408); \"crypto/ec/ec_oct.c\" ; +0xf0, 0x7ed3f0\nMOV             R0, #0x10                                              ; +0xf4, 0x7ed3f4\nMOV             R1, #0x7B ; '{'                                        ; +0xf8, 0x7ed3f8\nMOV             R2, #0x42 ; 'B'                                        ; +0xfc, 0x7ed3fc\nADD             R3, PC, R3; \"crypto/ec/ec_oct.c\"                       ; +0x100, 0x7ed400\nBL              ERR_put_error                                          ; +0x104, 0x7ed404\nB               loc_7ED35C                                             ; +0x108, 0x7ed408", "xrefs": ["i2o_ECPublicKey @ 0x7e7c5c", "i2o_ECPublicKey @ 0x7e7c98", "i2o_ECPublicKey @ 0x7e7cf4", "EC_POINT_point2buf @ 0x7ed54c", "EC_POINT_point2buf @ 0x7ed59c", "<???> @ 0x6153c"], "is_objc": false, "is_arm32": false, "is_arm64": false, "bida_info": "8.0.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings"}