{"type": "func", "start": 8296248, "end": 8296424, "name": "EC_KEY_oct2key", "pseudocode": "// \n// EC_KEY_oct2key from 0x7e9738 to 0x7e97e8 (176 bytes)\n// \n// 4 xrefs:\n// > sub_7E3D80 @ 0x7e3f40\n// > d2i_ECPrivateKey @ 0x7e7534\n// > o2i_ECPublicKey @ 0x7e7bac\n// > <???> @ 0x610fc\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_KEY_oct2key(_DWORD *a1, _BYTE *a2, int a3, int a4)\n{\n  int v5; // r0\n  int v7; // r1\n  int v9; // r3\n  _DWORD *v10; // r5\n  int result; // r0\n  int v12; // r0\n\n  if ( !a1 )\n    return 0;\n  v5 = a1[3];\n  if ( !v5 )\n    return 0;\n  v7 = a1[4];\n  v9 = a3;\n  v10 = a1;\n  if ( !v7 )\n  {\n    v12 = EC_POINT_new(v5);\n    v9 = a3;\n    v7 = v12;\n    v10[4] = v12;\n    if ( !v12 )\n      return 0;\n    v5 = v10[3];\n  }\n  if ( !EC_POINT_oct2point(v5, v7, a2, v9, a4) )\n    return 0;\n  result = 1;\n  if ( (**(_DWORD **)v10[3] & 2) == 0 )\n    v10[7] = *a2 & 0xFE;\n  return result;\n}", "assembly": "; \n; EC_KEY_oct2key from 0x7e9738 to 0x7e97e8 (176 bytes)\n; \n; 4 xrefs:\n; > sub_7E3D80 @ 0x7e3f40\n; > d2i_ECPrivateKey @ 0x7e7534\n; > o2i_ECPublicKey @ 0x7e7bac\n; > <???> @ 0x610fc\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\nSUBS            R12, R0, #0                                            ; +0x0, 0x7e9738\nBEQ             loc_7E97D8                                             ; +0x4, 0x7e973c\nLDR             R0, [R12,#0xC]                                         ; +0x8, 0x7e9740\nCMP             R0, #0                                                 ; +0xc, 0x7e9744\nBEQ             loc_7E97D8                                             ; +0x10, 0x7e9748\nPUSH            {R4-R6,LR}                                             ; +0x14, 0x7e974c\nMOV             R6, R1                                                 ; +0x18, 0x7e9750\nLDR             R1, [R12,#0x10]                                        ; +0x1c, 0x7e9754\nMOV             R4, R3                                                 ; +0x20, 0x7e9758\nCMP             R1, #0                                                 ; +0x24, 0x7e975c\nSUB             SP, SP, #0x10                                          ; +0x28, 0x7e9760\nMOV             R3, R2                                                 ; +0x2c, 0x7e9764\nMOV             R5, R12                                                ; +0x30, 0x7e9768\nBEQ             loc_7E97B0                                             ; +0x34, 0x7e976c\nSTR             R4, [SP,#0x20+var_20]                                  ; +0x38, 0x7e9770\nMOV             R2, R6                                                 ; +0x3c, 0x7e9774\nBL              EC_POINT_oct2point                                     ; +0x40, 0x7e9778\nCMP             R0, #0                                                 ; +0x44, 0x7e977c\nBEQ             loc_7E97CC                                             ; +0x48, 0x7e9780\nLDR             R3, [R5,#0xC]                                          ; +0x4c, 0x7e9784\nLDR             R3, [R3]                                               ; +0x50, 0x7e9788\nLDR             R3, [R3]                                               ; +0x54, 0x7e978c\nTST             R3, #2                                                 ; +0x58, 0x7e9790\nLDRBEQ          R3, [R6]                                               ; +0x5c, 0x7e9794\nMOVEQ           R0, #1                                                 ; +0x60, 0x7e9798\nBICEQ           R3, R3, #1                                             ; +0x64, 0x7e979c\nMOVNE           R0, #1                                                 ; +0x68, 0x7e97a0\nSTREQ           R3, [R5,#0x1C]                                         ; +0x6c, 0x7e97a4\nADD             SP, SP, #0x10                                          ; +0x70, 0x7e97a8\nPOP             {R4-R6,PC}                                             ; +0x74, 0x7e97ac\nSTR             R2, [SP,#0x20+var_14]                                  ; +0x78, 0x7e97b0\nBL              EC_POINT_new                                           ; +0x7c, 0x7e97b4\nLDR             R3, [SP,#0x20+var_14]                                  ; +0x80, 0x7e97b8\nCMP             R0, #0                                                 ; +0x84, 0x7e97bc\nMOV             R1, R0                                                 ; +0x88, 0x7e97c0\nSTR             R0, [R5,#0x10]                                         ; +0x8c, 0x7e97c4\nBNE             loc_7E97E0                                             ; +0x90, 0x7e97c8\nMOV             R0, #0                                                 ; +0x94, 0x7e97cc\nADD             SP, SP, #0x10                                          ; +0x98, 0x7e97d0\nPOP             {R4-R6,PC}                                             ; +0x9c, 0x7e97d4\nMOV             R0, #0                                                 ; +0xa0, 0x7e97d8\nBX              LR                                                     ; +0xa4, 0x7e97dc\nLDR             R0, [R5,#0xC]                                          ; +0xa8, 0x7e97e0\nB               loc_7E9770                                             ; +0xac, 0x7e97e4", "xrefs": ["sub_7E3D80 @ 0x7e3f40", "d2i_ECPrivateKey @ 0x7e7534", "o2i_ECPublicKey @ 0x7e7bac", "<???> @ 0x610fc"], "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"}