{"type": "func", "start": 16955268, "end": 16955540, "name": "EVP_PKEY_decrypt", "pseudocode": "// \n// EVP_PKEY_decrypt from 0x102b784 to 0x102b894 (272 bytes)\n// \n// 6 xrefs:\n// > tls_process_client_key_exchange @ 0xfd1510\n// > sub_104A4A8 @ 0x104a52c\n// > sub_104A4A8 @ 0x104a570\n// > CMS_RecipientInfo_decrypt @ 0x109c4d8\n// > CMS_RecipientInfo_decrypt @ 0x109c518\n// > <???> @ 0xb75e0\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:17 +0000\n// \n\n__int64 __fastcall EVP_PKEY_decrypt(__int64 *a1, __int64 a2, _QWORD *a3)\n{\n  __int64 v4; // x5\n  __int64 (__fastcall *v5)(__int64 *); // x0\n  int v6; // w0\n\n  if ( a1 && (v4 = *a1) != 0 && (v5 = *(__int64 (__fastcall **)(__int64 *))(v4 + 168)) != nullptr )\n  {\n    if ( *((_DWORD *)a1 + 8) == 512 )\n    {\n      if ( (*(_DWORD *)(v4 + 4) & 2) != 0 )\n      {\n        v6 = EVP_PKEY_size(a1[2]);\n        if ( a2 )\n        {\n          if ( (unsigned __int64)v6 > *a3 )\n          {\n            ERR_put_error(6, 104, 155, (__int64)\"crypto/evp/pmeth_fn.c\", 198);\n            return 0;\n          }\n          else\n          {\n            return (*(__int64 (__fastcall **)(__int64 *))(*a1 + 168))(a1);\n          }\n        }\n        else\n        {\n          *a3 = v6;\n          return 1;\n        }\n      }\n      else\n      {\n        return v5(a1);\n      }\n    }\n    else\n    {\n      ERR_put_error(6, 104, 151, (__int64)\"crypto/evp/pmeth_fn.c\", 195);\n      return 0xFFFFFFFFLL;\n    }\n  }\n  else\n  {\n    ERR_put_error(6, 104, 150, (__int64)\"crypto/evp/pmeth_fn.c\", 191);\n    return 4294967294LL;\n  }\n}", "assembly": "; \n; EVP_PKEY_decrypt from 0x102b784 to 0x102b894 (272 bytes)\n; \n; 6 xrefs:\n; > tls_process_client_key_exchange @ 0xfd1510\n; > sub_104A4A8 @ 0x104a52c\n; > sub_104A4A8 @ 0x104a570\n; > CMS_RecipientInfo_decrypt @ 0x109c4d8\n; > CMS_RecipientInfo_decrypt @ 0x109c518\n; > <???> @ 0xb75e0\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:17 +0000\n; \nSTP             X29, X30, [SP,#var_40]!                                ; +0x0, 0x102b784\nMOV             X29, SP                                                ; +0x4, 0x102b788\nSTR             X19, [SP,#0x40+var_30]                                 ; +0x8, 0x102b78c\nMOV             X19, X0                                                ; +0xc, 0x102b790\nCBZ             X0, loc_102B870                                        ; +0x10, 0x102b794\nLDR             X5, [X0]                                               ; +0x14, 0x102b798\nCBZ             X5, loc_102B870                                        ; +0x18, 0x102b79c\nLDR             X0, [X5,#0xA8]                                         ; +0x1c, 0x102b7a0\nCBZ             X0, loc_102B870                                        ; +0x20, 0x102b7a4\nLDR             W6, [X19,#0x20]                                        ; +0x24, 0x102b7a8\nCMP             W6, #0x200                                             ; +0x28, 0x102b7ac\nB.NE            loc_102B84C                                            ; +0x2c, 0x102b7b0\nLDR             W5, [X5,#4]                                            ; +0x30, 0x102b7b4\nTBZ             W5, #1, loc_102B804                                    ; +0x34, 0x102b7b8\nLDR             X0, [X19,#0x10]                                        ; +0x38, 0x102b7bc\nSTR             X4, [X29,#0x40+var_20]                                 ; +0x3c, 0x102b7c0\nSTR             X3, [X29,#0x40+var_18]                                 ; +0x40, 0x102b7c4\nSTR             X2, [X29,#0x40+var_10]                                 ; +0x44, 0x102b7c8\nSTR             X1, [X29,#0x40+var_8]                                  ; +0x48, 0x102b7cc\nBL              EVP_PKEY_size                                          ; +0x4c, 0x102b7d0\nLDR             X1, [X29,#0x40+var_8]                                  ; +0x50, 0x102b7d4\nSXTW            X0, W0                                                 ; +0x54, 0x102b7d8\nLDR             X2, [X29,#0x40+var_10]                                 ; +0x58, 0x102b7dc\nLDR             X3, [X29,#0x40+var_18]                                 ; +0x5c, 0x102b7e0\nLDR             X4, [X29,#0x40+var_20]                                 ; +0x60, 0x102b7e4\nCBZ             X1, loc_102B840                                        ; +0x64, 0x102b7e8\nLDR             X5, [X2]                                               ; +0x68, 0x102b7ec\nCMP             X0, X5                                                 ; +0x6c, 0x102b7f0\nB.HI            loc_102B81C                                            ; +0x70, 0x102b7f4\nLDR             X0, [X19]                                              ; +0x74, 0x102b7f8\nLDR             X5, [X0,#0xA8]                                         ; +0x78, 0x102b7fc\nB               loc_102B808                                            ; +0x7c, 0x102b800\nMOV             X5, X0                                                 ; +0x80, 0x102b804\nMOV             X0, X19                                                ; +0x84, 0x102b808\nBLR             X5                                                     ; +0x88, 0x102b80c\nLDR             X19, [SP,#0x40+var_30]                                 ; +0x8c, 0x102b810\nLDP             X29, X30, [SP+0x40+var_40],#0x40                       ; +0x90, 0x102b814\nRET                                                                    ; +0x94, 0x102b818\nADRP            X3, #aCryptoEvpPmeth@PAGE; \"crypto/evp/pmeth_fn.c\"     ; +0x98, 0x102b81c\nMOV             W0, #6                                                 ; +0x9c, 0x102b820\nMOV             W1, #0x68 ; 'h'                                        ; +0xa0, 0x102b824\nMOV             W2, #0x9B                                              ; +0xa4, 0x102b828\nADD             X3, X3, #aCryptoEvpPmeth@PAGEOFF; \"crypto/evp/pmeth_fn.c\" ; +0xa8, 0x102b82c\nMOV             W4, #0xC6                                              ; +0xac, 0x102b830\nBL              ERR_put_error                                          ; +0xb0, 0x102b834\nMOV             W0, #0                                                 ; +0xb4, 0x102b838\nB               loc_102B810                                            ; +0xb8, 0x102b83c\nSTR             X0, [X2]                                               ; +0xbc, 0x102b840\nMOV             W0, #1                                                 ; +0xc0, 0x102b844\nB               loc_102B810                                            ; +0xc4, 0x102b848\nADRP            X3, #aCryptoEvpPmeth@PAGE; \"crypto/evp/pmeth_fn.c\"     ; +0xc8, 0x102b84c\nMOV             W0, #6                                                 ; +0xcc, 0x102b850\nMOV             W1, #0x68 ; 'h'                                        ; +0xd0, 0x102b854\nMOV             W2, #0x97                                              ; +0xd4, 0x102b858\nADD             X3, X3, #aCryptoEvpPmeth@PAGEOFF; \"crypto/evp/pmeth_fn.c\" ; +0xd8, 0x102b85c\nMOV             W4, #0xC3                                              ; +0xdc, 0x102b860\nBL              ERR_put_error                                          ; +0xe0, 0x102b864\nMOV             W0, #0xFFFFFFFF                                        ; +0xe4, 0x102b868\nB               loc_102B810                                            ; +0xe8, 0x102b86c\nADRP            X3, #aCryptoEvpPmeth@PAGE; \"crypto/evp/pmeth_fn.c\"     ; +0xec, 0x102b870\nMOV             W0, #6                                                 ; +0xf0, 0x102b874\nMOV             W1, #0x68 ; 'h'                                        ; +0xf4, 0x102b878\nMOV             W2, #0x96                                              ; +0xf8, 0x102b87c\nADD             X3, X3, #aCryptoEvpPmeth@PAGEOFF; \"crypto/evp/pmeth_fn.c\" ; +0xfc, 0x102b880\nMOV             W4, #0xBF                                              ; +0x100, 0x102b884\nBL              ERR_put_error                                          ; +0x104, 0x102b888\nMOV             W0, #0xFFFFFFFE                                        ; +0x108, 0x102b88c\nB               loc_102B810                                            ; +0x10c, 0x102b890", "xrefs": ["tls_process_client_key_exchange @ 0xfd1510", "sub_104A4A8 @ 0x104a52c", "sub_104A4A8 @ 0x104a570", "CMS_RecipientInfo_decrypt @ 0x109c4d8", "CMS_RecipientInfo_decrypt @ 0x109c518", "<???> @ 0xb75e0"], "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"}