{"type": "func", "start": 16837108, "end": 16837276, "name": "EC_KEY_oct2key", "pseudocode": "// \n// EC_KEY_oct2key from 0x100e9f4 to 0x100ea9c (168 bytes)\n// \n// 4 xrefs:\n// > sub_1009820 @ 0x10099f4\n// > d2i_ECPrivateKey @ 0x100ca98\n// > o2i_ECPublicKey @ 0x100d044\n// > <???> @ 0xa5dd8\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:01 +0000\n// \n\n__int64 __fastcall EC_KEY_oct2key(__int64 a1, _BYTE *a2, __int64 a3, __int64 a4)\n{\n  __int64 v4; // x5\n  __int64 v6; // x1\n  __int64 v9; // x3\n  __int64 result; // x0\n  __int64 v11; // x0\n  __int64 v12; // [xsp+20h] [xbp+20h]\n\n  if ( !a1 )\n    return 0;\n  v4 = *(_QWORD *)(a1 + 24);\n  if ( !v4 )\n    return 0;\n  v6 = *(_QWORD *)(a1 + 32);\n  v9 = a3;\n  if ( !v6 )\n  {\n    v12 = a4;\n    v11 = EC_POINT_new(*(_QWORD *)(a1 + 24));\n    *(_QWORD *)(a1 + 32) = v11;\n    v6 = v11;\n    v9 = a3;\n    a4 = v12;\n    if ( !v11 )\n      return 0;\n    v4 = *(_QWORD *)(a1 + 24);\n  }\n  if ( !(unsigned int)EC_POINT_oct2point(v4, v6, a2, v9, a4) )\n    return 0;\n  result = 1;\n  if ( (***(_DWORD ***)(a1 + 24) & 2) == 0 )\n    *(_DWORD *)(a1 + 52) = *a2 & 0xFE;\n  return result;\n}", "assembly": "; \n; EC_KEY_oct2key from 0x100e9f4 to 0x100ea9c (168 bytes)\n; \n; 4 xrefs:\n; > sub_1009820 @ 0x10099f4\n; > d2i_ECPrivateKey @ 0x100ca98\n; > o2i_ECPublicKey @ 0x100d044\n; > <???> @ 0xa5dd8\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:01 +0000\n; \nSTP             X29, X30, [SP,#var_30]!                                ; +0x0, 0x100e9f4\nMOV             X29, SP                                                ; +0x4, 0x100e9f8\nSTP             X19, X20, [SP,#0x30+var_20]                            ; +0x8, 0x100e9fc\nCBZ             X0, loc_100EA84                                        ; +0xc, 0x100ea00\nLDR             X5, [X0,#0x18]                                         ; +0x10, 0x100ea04\nCBZ             X5, loc_100EA84                                        ; +0x14, 0x100ea08\nMOV             X20, X1                                                ; +0x18, 0x100ea0c\nLDR             X1, [X0,#0x20]                                         ; +0x1c, 0x100ea10\nMOV             X4, X3                                                 ; +0x20, 0x100ea14\nMOV             X19, X0                                                ; +0x24, 0x100ea18\nMOV             X3, X2                                                 ; +0x28, 0x100ea1c\nCBZ             X1, loc_100EA60                                        ; +0x2c, 0x100ea20\nMOV             X0, X5                                                 ; +0x30, 0x100ea24\nMOV             X2, X20                                                ; +0x34, 0x100ea28\nBL              EC_POINT_oct2point                                     ; +0x38, 0x100ea2c\nCBZ             W0, loc_100EA84                                        ; +0x3c, 0x100ea30\nLDR             X1, [X19,#0x18]                                        ; +0x40, 0x100ea34\nMOV             W0, #1                                                 ; +0x44, 0x100ea38\nLDR             X1, [X1]                                               ; +0x48, 0x100ea3c\nLDR             W1, [X1]                                               ; +0x4c, 0x100ea40\nTBNZ            W1, #1, loc_100EA54                                    ; +0x50, 0x100ea44\nLDRB            W1, [X20]                                              ; +0x54, 0x100ea48\nAND             W1, W1, #0xFFFFFFFE                                    ; +0x58, 0x100ea4c\nSTR             W1, [X19,#0x34]                                        ; +0x5c, 0x100ea50\nLDP             X19, X20, [SP,#0x30+var_20]                            ; +0x60, 0x100ea54\nLDP             X29, X30, [SP+0x30+var_30],#0x30                       ; +0x64, 0x100ea58\nRET                                                                    ; +0x68, 0x100ea5c\nMOV             X0, X5                                                 ; +0x6c, 0x100ea60\nSTR             X4, [X29,#0x30+var_10]                                 ; +0x70, 0x100ea64\nSTR             X2, [X29,#0x30+var_8]                                  ; +0x74, 0x100ea68\nBL              EC_POINT_new                                           ; +0x78, 0x100ea6c\nSTR             X0, [X19,#0x20]                                        ; +0x7c, 0x100ea70\nMOV             X1, X0                                                 ; +0x80, 0x100ea74\nLDR             X3, [X29,#0x30+var_8]                                  ; +0x84, 0x100ea78\nLDR             X4, [X29,#0x30+var_10]                                 ; +0x88, 0x100ea7c\nCBNZ            X0, loc_100EA94                                        ; +0x8c, 0x100ea80\nMOV             W0, #0                                                 ; +0x90, 0x100ea84\nLDP             X19, X20, [SP,#0x30+var_20]                            ; +0x94, 0x100ea88\nLDP             X29, X30, [SP+0x30+var_30],#0x30                       ; +0x98, 0x100ea8c\nRET                                                                    ; +0x9c, 0x100ea90\nLDR             X5, [X19,#0x18]                                        ; +0xa0, 0x100ea94\nB               loc_100EA24                                            ; +0xa4, 0x100ea98", "xrefs": ["sub_1009820 @ 0x10099f4", "d2i_ECPrivateKey @ 0x100ca98", "o2i_ECPublicKey @ 0x100d044", "<???> @ 0xa5dd8"], "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"}