{"type": "func", "start": 14340596, "end": 14340740, "name": "EVP_PKEY_encrypt_init", "pseudocode": "// \n// EVP_PKEY_encrypt_init from 0xdad1f4 to 0xdad284 (144 bytes)\n// \n// 6 xrefs:\n// > sub_D4843C @ 0xd484cc\n// > tls_construct_client_key_exchange @ 0xd4a8c4\n// > PKCS7_dataInit @ 0xdcc7b4\n// > CMS_RecipientInfo_encrypt @ 0xe1e568\n// > CMS_add1_recipient_cert @ 0xe1eac8\n// > <???> @ 0xc5ef8\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\n__int64 __fastcall EVP_PKEY_encrypt_init(__int64 *a1)\n{\n  __int64 v2; // x1\n  __int64 (*v3)(void); // x1\n  __int64 result; // x0\n\n  if ( a1 && (v2 = *a1) != 0 && *(_QWORD *)(v2 + 152) )\n  {\n    v3 = *(__int64 (**)(void))(v2 + 144);\n    *((_DWORD *)a1 + 8) = 256;\n    if ( v3 )\n    {\n      result = v3();\n      if ( (int)result <= 0 )\n        *((_DWORD *)a1 + 8) = 0;\n    }\n    else\n    {\n      return 1;\n    }\n  }\n  else\n  {\n    ERR_put_error(6, 139, 150, (__int64)\"crypto/evp/pmeth_fn.c\", 139);\n    return 4294967294LL;\n  }\n  return result;\n}", "assembly": "; \n; EVP_PKEY_encrypt_init from 0xdad1f4 to 0xdad284 (144 bytes)\n; \n; 6 xrefs:\n; > sub_D4843C @ 0xd484cc\n; > tls_construct_client_key_exchange @ 0xd4a8c4\n; > PKCS7_dataInit @ 0xdcc7b4\n; > CMS_RecipientInfo_encrypt @ 0xe1e568\n; > CMS_add1_recipient_cert @ 0xe1eac8\n; > <???> @ 0xc5ef8\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\nSTP             X29, X30, [SP,#var_20]!                                ; +0x0, 0xdad1f4\nMOV             X29, SP                                                ; +0x4, 0xdad1f8\nSTR             X19, [SP,#0x20+var_10]                                 ; +0x8, 0xdad1fc\nMOV             X19, X0                                                ; +0xc, 0xdad200\nCBZ             X0, loc_DAD260                                         ; +0x10, 0xdad204\nLDR             X1, [X0]                                               ; +0x14, 0xdad208\nCBZ             X1, loc_DAD260                                         ; +0x18, 0xdad20c\nLDR             X2, [X1,#0x98]                                         ; +0x1c, 0xdad210\nCBZ             X2, loc_DAD260                                         ; +0x20, 0xdad214\nLDR             X1, [X1,#0x90]                                         ; +0x24, 0xdad218\nMOV             W2, #0x100                                             ; +0x28, 0xdad21c\nSTR             W2, [X0,#0x20]                                         ; +0x2c, 0xdad220\nCBZ             X1, loc_DAD240                                         ; +0x30, 0xdad224\nBLR             X1                                                     ; +0x34, 0xdad228\nCMP             W0, WZR                                                ; +0x38, 0xdad22c\nB.LE            loc_DAD250                                             ; +0x3c, 0xdad230\nLDR             X19, [SP,#0x20+var_10]                                 ; +0x40, 0xdad234\nLDP             X29, X30, [SP+0x20+var_20],#0x20                       ; +0x44, 0xdad238\nRET                                                                    ; +0x48, 0xdad23c\nMOV             W0, #1                                                 ; +0x4c, 0xdad240\nLDR             X19, [SP,#0x20+var_10]                                 ; +0x50, 0xdad244\nLDP             X29, X30, [SP+0x20+var_20],#0x20                       ; +0x54, 0xdad248\nRET                                                                    ; +0x58, 0xdad24c\nSTR             WZR, [X19,#0x20]                                       ; +0x5c, 0xdad250\nLDR             X19, [SP,#0x20+var_10]                                 ; +0x60, 0xdad254\nLDP             X29, X30, [SP+0x20+var_20],#0x20                       ; +0x64, 0xdad258\nRET                                                                    ; +0x68, 0xdad25c\nMOV             W1, #0x8B                                              ; +0x6c, 0xdad260\nADRP            X3, #aCryptoEvpPmeth@PAGE; \"crypto/evp/pmeth_fn.c\"     ; +0x70, 0xdad264\nMOV             W0, #6                                                 ; +0x74, 0xdad268\nMOV             W2, #0x96                                              ; +0x78, 0xdad26c\nADD             X3, X3, #aCryptoEvpPmeth@PAGEOFF; \"crypto/evp/pmeth_fn.c\" ; +0x7c, 0xdad270\nMOV             W4, W1                                                 ; +0x80, 0xdad274\nBL              ERR_put_error                                          ; +0x84, 0xdad278\nMOV             W0, #0xFFFFFFFE                                        ; +0x88, 0xdad27c\nB               loc_DAD234                                             ; +0x8c, 0xdad280", "xrefs": ["sub_D4843C @ 0xd484cc", "tls_construct_client_key_exchange @ 0xd4a8c4", "PKCS7_dataInit @ 0xdcc7b4", "CMS_RecipientInfo_encrypt @ 0xe1e568", "CMS_add1_recipient_cert @ 0xe1eac8", "<???> @ 0xc5ef8"], "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"}