{"type": "func", "start": 16954852, "end": 16955124, "name": "EVP_PKEY_encrypt", "pseudocode": "// \n// EVP_PKEY_encrypt from 0x102b5e4 to 0x102b6f4 (272 bytes)\n// \n// 8 xrefs:\n// > sub_FC6790 @ 0xfc6920\n// > tls_construct_client_key_exchange @ 0xfc8c3c\n// > tls_construct_client_key_exchange @ 0xfc8c5c\n// > PKCS7_dataInit @ 0x104ab58\n// > PKCS7_dataInit @ 0x104ab94\n// > CMS_RecipientInfo_encrypt @ 0x109c7e8\n// > CMS_RecipientInfo_encrypt @ 0x109c82c\n// > <???> @ 0x6d588\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_encrypt(__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 + 152)) != nullptr )\n  {\n    if ( *((_DWORD *)a1 + 8) == 256 )\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, 105, 155, (__int64)\"crypto/evp/pmeth_fn.c\", 164);\n            return 0;\n          }\n          else\n          {\n            return (*(__int64 (__fastcall **)(__int64 *))(*a1 + 152))(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, 105, 151, (__int64)\"crypto/evp/pmeth_fn.c\", 161);\n      return 0xFFFFFFFFLL;\n    }\n  }\n  else\n  {\n    ERR_put_error(6, 105, 150, (__int64)\"crypto/evp/pmeth_fn.c\", 157);\n    return 4294967294LL;\n  }\n}", "assembly": "; \n; EVP_PKEY_encrypt from 0x102b5e4 to 0x102b6f4 (272 bytes)\n; \n; 8 xrefs:\n; > sub_FC6790 @ 0xfc6920\n; > tls_construct_client_key_exchange @ 0xfc8c3c\n; > tls_construct_client_key_exchange @ 0xfc8c5c\n; > PKCS7_dataInit @ 0x104ab58\n; > PKCS7_dataInit @ 0x104ab94\n; > CMS_RecipientInfo_encrypt @ 0x109c7e8\n; > CMS_RecipientInfo_encrypt @ 0x109c82c\n; > <???> @ 0x6d588\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, 0x102b5e4\nMOV             X29, SP                                                ; +0x4, 0x102b5e8\nSTR             X19, [SP,#0x40+var_30]                                 ; +0x8, 0x102b5ec\nMOV             X19, X0                                                ; +0xc, 0x102b5f0\nCBZ             X0, loc_102B6D0                                        ; +0x10, 0x102b5f4\nLDR             X5, [X0]                                               ; +0x14, 0x102b5f8\nCBZ             X5, loc_102B6D0                                        ; +0x18, 0x102b5fc\nLDR             X0, [X5,#0x98]                                         ; +0x1c, 0x102b600\nCBZ             X0, loc_102B6D0                                        ; +0x20, 0x102b604\nLDR             W6, [X19,#0x20]                                        ; +0x24, 0x102b608\nCMP             W6, #0x100                                             ; +0x28, 0x102b60c\nB.NE            loc_102B6AC                                            ; +0x2c, 0x102b610\nLDR             W5, [X5,#4]                                            ; +0x30, 0x102b614\nTBZ             W5, #1, loc_102B664                                    ; +0x34, 0x102b618\nLDR             X0, [X19,#0x10]                                        ; +0x38, 0x102b61c\nSTR             X4, [X29,#0x40+var_20]                                 ; +0x3c, 0x102b620\nSTR             X3, [X29,#0x40+var_18]                                 ; +0x40, 0x102b624\nSTR             X2, [X29,#0x40+var_10]                                 ; +0x44, 0x102b628\nSTR             X1, [X29,#0x40+var_8]                                  ; +0x48, 0x102b62c\nBL              EVP_PKEY_size                                          ; +0x4c, 0x102b630\nLDR             X1, [X29,#0x40+var_8]                                  ; +0x50, 0x102b634\nSXTW            X0, W0                                                 ; +0x54, 0x102b638\nLDR             X2, [X29,#0x40+var_10]                                 ; +0x58, 0x102b63c\nLDR             X3, [X29,#0x40+var_18]                                 ; +0x5c, 0x102b640\nLDR             X4, [X29,#0x40+var_20]                                 ; +0x60, 0x102b644\nCBZ             X1, loc_102B6A0                                        ; +0x64, 0x102b648\nLDR             X5, [X2]                                               ; +0x68, 0x102b64c\nCMP             X0, X5                                                 ; +0x6c, 0x102b650\nB.HI            loc_102B67C                                            ; +0x70, 0x102b654\nLDR             X0, [X19]                                              ; +0x74, 0x102b658\nLDR             X5, [X0,#0x98]                                         ; +0x78, 0x102b65c\nB               loc_102B668                                            ; +0x7c, 0x102b660\nMOV             X5, X0                                                 ; +0x80, 0x102b664\nMOV             X0, X19                                                ; +0x84, 0x102b668\nBLR             X5                                                     ; +0x88, 0x102b66c\nLDR             X19, [SP,#0x40+var_30]                                 ; +0x8c, 0x102b670\nLDP             X29, X30, [SP+0x40+var_40],#0x40                       ; +0x90, 0x102b674\nRET                                                                    ; +0x94, 0x102b678\nADRP            X3, #aCryptoEvpPmeth@PAGE; \"crypto/evp/pmeth_fn.c\"     ; +0x98, 0x102b67c\nMOV             W0, #6                                                 ; +0x9c, 0x102b680\nMOV             W1, #0x69 ; 'i'                                        ; +0xa0, 0x102b684\nMOV             W2, #0x9B                                              ; +0xa4, 0x102b688\nADD             X3, X3, #aCryptoEvpPmeth@PAGEOFF; \"crypto/evp/pmeth_fn.c\" ; +0xa8, 0x102b68c\nMOV             W4, #0xA4                                              ; +0xac, 0x102b690\nBL              ERR_put_error                                          ; +0xb0, 0x102b694\nMOV             W0, #0                                                 ; +0xb4, 0x102b698\nB               loc_102B670                                            ; +0xb8, 0x102b69c\nSTR             X0, [X2]                                               ; +0xbc, 0x102b6a0\nMOV             W0, #1                                                 ; +0xc0, 0x102b6a4\nB               loc_102B670                                            ; +0xc4, 0x102b6a8\nADRP            X3, #aCryptoEvpPmeth@PAGE; \"crypto/evp/pmeth_fn.c\"     ; +0xc8, 0x102b6ac\nMOV             W0, #6                                                 ; +0xcc, 0x102b6b0\nMOV             W1, #0x69 ; 'i'                                        ; +0xd0, 0x102b6b4\nMOV             W2, #0x97                                              ; +0xd4, 0x102b6b8\nADD             X3, X3, #aCryptoEvpPmeth@PAGEOFF; \"crypto/evp/pmeth_fn.c\" ; +0xd8, 0x102b6bc\nMOV             W4, #0xA1                                              ; +0xdc, 0x102b6c0\nBL              ERR_put_error                                          ; +0xe0, 0x102b6c4\nMOV             W0, #0xFFFFFFFF                                        ; +0xe4, 0x102b6c8\nB               loc_102B670                                            ; +0xe8, 0x102b6cc\nADRP            X3, #aCryptoEvpPmeth@PAGE; \"crypto/evp/pmeth_fn.c\"     ; +0xec, 0x102b6d0\nMOV             W0, #6                                                 ; +0xf0, 0x102b6d4\nMOV             W1, #0x69 ; 'i'                                        ; +0xf4, 0x102b6d8\nMOV             W2, #0x96                                              ; +0xf8, 0x102b6dc\nADD             X3, X3, #aCryptoEvpPmeth@PAGEOFF; \"crypto/evp/pmeth_fn.c\" ; +0xfc, 0x102b6e0\nMOV             W4, #0x9D                                              ; +0x100, 0x102b6e4\nBL              ERR_put_error                                          ; +0x104, 0x102b6e8\nMOV             W0, #0xFFFFFFFE                                        ; +0x108, 0x102b6ec\nB               loc_102B670                                            ; +0x10c, 0x102b6f0", "xrefs": ["sub_FC6790 @ 0xfc6920", "tls_construct_client_key_exchange @ 0xfc8c3c", "tls_construct_client_key_exchange @ 0xfc8c5c", "PKCS7_dataInit @ 0x104ab58", "PKCS7_dataInit @ 0x104ab94", "CMS_RecipientInfo_encrypt @ 0x109c7e8", "CMS_RecipientInfo_encrypt @ 0x109c82c", "<???> @ 0x6d588"], "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"}