{"type": "func", "start": 14801120, "end": 14801376, "name": "CMS_EnvelopedData_create", "pseudocode": "// \n// CMS_EnvelopedData_create from 0xe1d8e0 to 0xe1d9e0 (256 bytes)\n// \n// 1 xrefs:\n// > <???> @ 0x8f508\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 CMS_EnvelopedData_create(__int64 a1)\n{\n  __int64 *v2; // x0\n  __int64 *v3; // x19\n  __int64 v4; // x3\n  _QWORD *v6; // x0\n  char ***v7; // x22\n\n  v2 = (__int64 *)CMS_ContentInfo_new();\n  v3 = v2;\n  if ( !v2 )\n    goto LABEL_7;\n  if ( v2[1] )\n  {\n    v4 = cms_get0_enveloped(v2);\n  }\n  else\n  {\n    v6 = (_QWORD *)ASN1_item_new((__int64)&CMS_EnvelopedData_it);\n    v3[1] = (__int64)v6;\n    if ( !v6 )\n    {\n      ERR_put_error(46, 126, 65, (__int64)\"crypto/cms/cms_env.c\", 38);\n      goto LABEL_7;\n    }\n    v7 = (char ***)v6[3];\n    *v6 = 0;\n    *v7 = OBJ_nid2obj(0x15u);\n    ASN1_OBJECT_free(*v3);\n    *v3 = (__int64)OBJ_nid2obj(0x17u);\n    v4 = v3[1];\n  }\n  if ( v4 && (unsigned int)cms_EncryptedContent_init(*(_QWORD *)(v4 + 24), a1, 0, 0) )\n    return v3;\nLABEL_7:\n  CMS_ContentInfo_free(v3);\n  ERR_put_error(46, 124, 65, (__int64)\"crypto/cms/cms_env.c\", 120);\n  return nullptr;\n}", "assembly": "; \n; CMS_EnvelopedData_create from 0xe1d8e0 to 0xe1d9e0 (256 bytes)\n; \n; 1 xrefs:\n; > <???> @ 0x8f508\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,#-0x30+var_s0]!                          ; +0x0, 0xe1d8e0\nMOV             X29, SP                                                ; +0x4, 0xe1d8e4\nSTP             X19, X20, [SP,#var_s10]                                ; +0x8, 0xe1d8e8\nSTP             X21, X22, [SP,#var_s20]                                ; +0xc, 0xe1d8ec\nMOV             X21, X0                                                ; +0x10, 0xe1d8f0\nBL              CMS_ContentInfo_new                                    ; +0x14, 0xe1d8f4\nMOV             X19, X0                                                ; +0x18, 0xe1d8f8\nCBZ             X0, loc_E1D940                                         ; +0x1c, 0xe1d8fc\nLDR             X20, [X0,#8]                                           ; +0x20, 0xe1d900\nCBZ             X20, loc_E1D978                                        ; +0x24, 0xe1d904\nBL              cms_get0_enveloped                                     ; +0x28, 0xe1d908\nMOV             X3, X0                                                 ; +0x2c, 0xe1d90c\nCBZ             X3, loc_E1D940                                         ; +0x30, 0xe1d910\nMOV             X2, #0                                                 ; +0x34, 0xe1d914\nLDR             X0, [X3,#0x18]                                         ; +0x38, 0xe1d918\nMOV             X1, X21                                                ; +0x3c, 0xe1d91c\nMOV             X3, X2                                                 ; +0x40, 0xe1d920\nBL              cms_EncryptedContent_init                              ; +0x44, 0xe1d924\nCBZ             W0, loc_E1D940                                         ; +0x48, 0xe1d928\nMOV             X0, X19                                                ; +0x4c, 0xe1d92c\nLDP             X19, X20, [SP,#var_s10]                                ; +0x50, 0xe1d930\nLDP             X21, X22, [SP,#var_s20]                                ; +0x54, 0xe1d934\nLDP             X29, X30, [SP+var_s0],#0x30                            ; +0x58, 0xe1d938\nRET                                                                    ; +0x5c, 0xe1d93c\nADRP            X20, #aCryptoCmsCmsEn@PAGE; \"crypto/cms/cms_env.c\"     ; +0x60, 0xe1d940\nMOV             X0, X19                                                ; +0x64, 0xe1d944\nBL              CMS_ContentInfo_free                                   ; +0x68, 0xe1d948\nADD             X3, X20, #aCryptoCmsCmsEn@PAGEOFF; \"crypto/cms/cms_env.c\" ; +0x6c, 0xe1d94c\nMOV             W0, #0x2E ; '.'                                        ; +0x70, 0xe1d950\nMOV             W1, #0x7C ; '|'                                        ; +0x74, 0xe1d954\nMOV             W2, #0x41 ; 'A'                                        ; +0x78, 0xe1d958\nMOV             W4, #0x78 ; 'x'                                        ; +0x7c, 0xe1d95c\nBL              ERR_put_error                                          ; +0x80, 0xe1d960\nMOV             X0, #0                                                 ; +0x84, 0xe1d964\nLDP             X19, X20, [SP,#var_s10]                                ; +0x88, 0xe1d968\nLDP             X21, X22, [SP,#var_s20]                                ; +0x8c, 0xe1d96c\nLDP             X29, X30, [SP+var_s0],#0x30                            ; +0x90, 0xe1d970\nRET                                                                    ; +0x94, 0xe1d974\nADRP            X0, #CMS_EnvelopedData_it_ptr@PAGE                     ; +0x98, 0xe1d978\nLDR             X0, [X0,#CMS_EnvelopedData_it_ptr@PAGEOFF]; CMS_EnvelopedData_it ; +0x9c, 0xe1d97c\nBL              ASN1_item_new                                          ; +0xa0, 0xe1d980\nSTR             X0, [X19,#8]                                           ; +0xa4, 0xe1d984\nMOV             X1, X0                                                 ; +0xa8, 0xe1d988\nCBZ             X0, loc_E1D9C0                                         ; +0xac, 0xe1d98c\nLDR             X22, [X0,#0x18]                                        ; +0xb0, 0xe1d990\nMOV             W0, #0x15                                              ; +0xb4, 0xe1d994\nSTR             X20, [X1]                                              ; +0xb8, 0xe1d998\nBL              OBJ_nid2obj                                            ; +0xbc, 0xe1d99c\nSTR             X0, [X22]                                              ; +0xc0, 0xe1d9a0\nLDR             X0, [X19]                                              ; +0xc4, 0xe1d9a4\nBL              ASN1_OBJECT_free                                       ; +0xc8, 0xe1d9a8\nMOV             W0, #0x17                                              ; +0xcc, 0xe1d9ac\nBL              OBJ_nid2obj                                            ; +0xd0, 0xe1d9b0\nSTR             X0, [X19]                                              ; +0xd4, 0xe1d9b4\nLDR             X3, [X19,#8]                                           ; +0xd8, 0xe1d9b8\nB               loc_E1D910                                             ; +0xdc, 0xe1d9bc\nADRP            X20, #aCryptoCmsCmsEn@PAGE; \"crypto/cms/cms_env.c\"     ; +0xe0, 0xe1d9c0\nMOV             W0, #0x2E ; '.'                                        ; +0xe4, 0xe1d9c4\nMOV             W1, #0x7E ; '~'                                        ; +0xe8, 0xe1d9c8\nMOV             W2, #0x41 ; 'A'                                        ; +0xec, 0xe1d9cc\nADD             X3, X20, #aCryptoCmsCmsEn@PAGEOFF; \"crypto/cms/cms_env.c\" ; +0xf0, 0xe1d9d0\nMOV             W4, #0x26 ; '&'                                        ; +0xf4, 0xe1d9d4\nBL              ERR_put_error                                          ; +0xf8, 0xe1d9d8\nB               loc_E1D944                                             ; +0xfc, 0xe1d9dc", "xrefs": ["<???> @ 0x8f508"], "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"}