{"type": "func", "start": 8859220, "end": 8859472, "name": "CMS_EnvelopedData_create", "pseudocode": "// \n// CMS_EnvelopedData_create from 0x872e54 to 0x872f50 (252 bytes)\n// \n// 1 xrefs:\n// > <???> @ 0x6a05c\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\nint *__fastcall CMS_EnvelopedData_create(int a1)\n{\n  int *v2; // r0\n  int *v3; // r4\n  int v4; // r3\n  _DWORD *v6; // r0\n  char ***v7; // r5\n  char **v8; // r0\n\n  v2 = (int *)CMS_ContentInfo_new();\n  v3 = v2;\n  if ( !v2 )\n    goto LABEL_8;\n  if ( v2[1] )\n  {\n    v4 = cms_get0_enveloped(v2);\n  }\n  else\n  {\n    v6 = ASN1_item_new((int)&CMS_EnvelopedData_it);\n    v3[1] = (int)v6;\n    if ( !v6 )\n    {\n      ERR_put_error(46, 126, 65, (int)\"crypto/cms/cms_env.c\", 38);\n      goto LABEL_8;\n    }\n    *v6 = 0;\n    v7 = (char ***)v6[3];\n    *v7 = OBJ_nid2obj(0x15u);\n    ASN1_OBJECT_free((_DWORD *)*v3);\n    v8 = OBJ_nid2obj(0x17u);\n    v4 = v3[1];\n    *v3 = (int)v8;\n  }\n  if ( v4 && cms_EncryptedContent_init(*(_DWORD *)(v4 + 12), a1, 0, 0) )\n    return v3;\nLABEL_8:\n  CMS_ContentInfo_free(v3);\n  ERR_put_error(46, 124, 65, (int)\"crypto/cms/cms_env.c\", 120);\n  return nullptr;\n}", "assembly": "; \n; CMS_EnvelopedData_create from 0x872e54 to 0x872f50 (252 bytes)\n; \n; 1 xrefs:\n; > <???> @ 0x6a05c\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\nPUSH            {R4-R6,LR}                                             ; +0x0, 0x872e54\nSUB             SP, SP, #8                                             ; +0x4, 0x872e58\nMOV             R6, R0                                                 ; +0x8, 0x872e5c\nBL              CMS_ContentInfo_new                                    ; +0xc, 0x872e60\nSUBS            R4, R0, #0                                             ; +0x10, 0x872e64\nBEQ             loc_872ED0                                             ; +0x14, 0x872e68\nLDR             R5, [R4,#4]                                            ; +0x18, 0x872e6c\nCMP             R5, #0                                                 ; +0x1c, 0x872e70\nBEQ             loc_872F04                                             ; +0x20, 0x872e74\nBL              cms_get0_enveloped                                     ; +0x24, 0x872e78\nMOV             R3, R0                                                 ; +0x28, 0x872e7c\nCMP             R3, #0                                                 ; +0x2c, 0x872e80\nBEQ             loc_872ED0                                             ; +0x30, 0x872e84\nMOV             R2, #0                                                 ; +0x34, 0x872e88\nLDR             R0, [R3,#0xC]                                          ; +0x38, 0x872e8c\nMOV             R1, R6                                                 ; +0x3c, 0x872e90\nMOV             R3, R2                                                 ; +0x40, 0x872e94\nBL              cms_EncryptedContent_init                              ; +0x44, 0x872e98\nCMP             R0, #0                                                 ; +0x48, 0x872e9c\nBEQ             loc_872ED0                                             ; +0x4c, 0x872ea0\nMOV             R0, R4                                                 ; +0x50, 0x872ea4\nADD             SP, SP, #8                                             ; +0x54, 0x872ea8\nPOP             {R4-R6,PC}                                             ; +0x58, 0x872eac\nMOV             R3, #0x26 ; '&'                                        ; +0x5c, 0x872eb0\nSTR             R3, [SP,#8+var_8]                                      ; +0x60, 0x872eb4\nLDR             R3, =(aCryptoCmsCmsEn - 0x872ED0); \"crypto/cms/cms_env.c\" ; +0x64, 0x872eb8\nMOV             R0, #0x2E ; '.'                                        ; +0x68, 0x872ebc\nMOV             R1, #0x7E ; '~'                                        ; +0x6c, 0x872ec0\nMOV             R2, #0x41 ; 'A'                                        ; +0x70, 0x872ec4\nADD             R3, PC, R3; \"crypto/cms/cms_env.c\"                     ; +0x74, 0x872ec8\nBL              ERR_put_error                                          ; +0x78, 0x872ecc\nMOV             R0, R4                                                 ; +0x7c, 0x872ed0\nBL              CMS_ContentInfo_free                                   ; +0x80, 0x872ed4\nMOV             R3, #0x78 ; 'x'                                        ; +0x84, 0x872ed8\nSTR             R3, [SP,#8+var_8]                                      ; +0x88, 0x872edc\nLDR             R3, =(aCryptoCmsCmsEn - 0x872EF8); \"crypto/cms/cms_env.c\" ; +0x8c, 0x872ee0\nMOV             R0, #0x2E ; '.'                                        ; +0x90, 0x872ee4\nMOV             R1, #0x7C ; '|'                                        ; +0x94, 0x872ee8\nMOV             R2, #0x41 ; 'A'                                        ; +0x98, 0x872eec\nADD             R3, PC, R3; \"crypto/cms/cms_env.c\"                     ; +0x9c, 0x872ef0\nBL              ERR_put_error                                          ; +0xa0, 0x872ef4\nMOV             R0, #0                                                 ; +0xa4, 0x872ef8\nADD             SP, SP, #8                                             ; +0xa8, 0x872efc\nPOP             {R4-R6,PC}                                             ; +0xac, 0x872f00\nLDR             R0, =(CMS_EnvelopedData_it_ptr - 0x872F10)             ; +0xb0, 0x872f04\nLDR             R0, [PC,R0]; CMS_EnvelopedData_it                      ; +0xb4, 0x872f08\nBL              ASN1_item_new                                          ; +0xb8, 0x872f0c\nCMP             R0, #0                                                 ; +0xbc, 0x872f10\nMOV             R3, R0                                                 ; +0xc0, 0x872f14\nSTR             R0, [R4,#4]                                            ; +0xc4, 0x872f18\nBEQ             loc_872EB0                                             ; +0xc8, 0x872f1c\nSTR             R5, [R0]                                               ; +0xcc, 0x872f20\nMOV             R0, #0x15                                              ; +0xd0, 0x872f24\nLDR             R5, [R3,#0xC]                                          ; +0xd4, 0x872f28\nBL              OBJ_nid2obj                                            ; +0xd8, 0x872f2c\nSTR             R0, [R5]                                               ; +0xdc, 0x872f30\nLDR             R0, [R4]                                               ; +0xe0, 0x872f34\nBL              ASN1_OBJECT_free                                       ; +0xe4, 0x872f38\nMOV             R0, #0x17                                              ; +0xe8, 0x872f3c\nBL              OBJ_nid2obj                                            ; +0xec, 0x872f40\nLDR             R3, [R4,#4]                                            ; +0xf0, 0x872f44\nSTR             R0, [R4]                                               ; +0xf4, 0x872f48\nB               loc_872E80                                             ; +0xf8, 0x872f4c", "xrefs": ["<???> @ 0x6a05c"], "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"}