{"type": "func", "start": 14809484, "end": 14809772, "name": "CMS_dataInit", "pseudocode": "// \n// CMS_dataInit from 0xe1f98c to 0xe1faac (288 bytes)\n// \n// 2 xrefs:\n// > sub_E1D530 @ 0xe1d598\n// > <???> @ 0x6f810\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_dataInit(__int64 *a1, __int64 *a2)\n{\n  __int64 *v4; // x21\n  int v5; // w0\n  _QWORD *v6; // x20\n  _QWORD *inited; // x0\n\n  v4 = a2;\n  if ( a2 || (v4 = cms_content_bio(a1)) != nullptr )\n  {\n    v5 = OBJ_obj2nid(*a1) - 21;\n    switch ( v5 )\n    {\n      case 0:\n        return (__int64)v4;\n      case 1:\n        inited = (_QWORD *)cms_SignedData_init_bio(a1);\n        goto LABEL_8;\n      case 2:\n        inited = cms_EnvelopedData_init_bio((__int64)a1);\n        goto LABEL_8;\n      case 4:\n        inited = (_QWORD *)cms_DigestedData_init_bio(a1);\n        if ( !inited )\n          goto LABEL_11;\n        return BIO_push((__int64)inited, (__int64)v4);\n      case 5:\n        inited = (_QWORD *)cms_EncryptedData_init_bio(a1);\nLABEL_8:\n        if ( inited )\n          return BIO_push((__int64)inited, (__int64)v4);\nLABEL_11:\n        v6 = inited;\n        if ( !a2 )\n          BIO_free(v4);\n        break;\n      default:\n        v6 = nullptr;\n        ERR_put_error(46, 111, 156, (__int64)\"crypto/cms/cms_lib.c\", 94);\n        return (__int64)v6;\n    }\n  }\n  else\n  {\n    v6 = nullptr;\n    ERR_put_error(46, 111, 127, (__int64)\"crypto/cms/cms_lib.c\", 64);\n  }\n  return (__int64)v6;\n}", "assembly": "; \n; CMS_dataInit from 0xe1f98c to 0xe1faac (288 bytes)\n; \n; 2 xrefs:\n; > sub_E1D530 @ 0xe1d598\n; > <???> @ 0x6f810\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_30]!                                ; +0x0, 0xe1f98c\nMOV             X29, SP                                                ; +0x4, 0xe1f990\nSTP             X19, X20, [SP,#0x30+var_20]                            ; +0x8, 0xe1f994\nSTR             X21, [SP,#0x30+var_10]                                 ; +0xc, 0xe1f998\nMOV             X19, X1                                                ; +0x10, 0xe1f99c\nMOV             X20, X0                                                ; +0x14, 0xe1f9a0\nMOV             X21, X1                                                ; +0x18, 0xe1f9a4\nCBZ             X1, loc_E1FA7C                                         ; +0x1c, 0xe1f9a8\nLDR             X0, [X20]                                              ; +0x20, 0xe1f9ac\nBL              OBJ_obj2nid                                            ; +0x24, 0xe1f9b0\nSUB             W0, W0, #0x15; switch 6 cases                          ; +0x28, 0xe1f9b4\nCMP             W0, #5                                                 ; +0x2c, 0xe1f9b8\nB.LS            loc_E1F9F4                                             ; +0x30, 0xe1f9bc\nADRP            X3, #aCryptoCmsCmsLi@PAGE; jumptable 0000000000E1FA08 default case, case 24 ; +0x34, 0xe1f9c0\nMOV             W0, #0x2E ; '.'                                        ; +0x38, 0xe1f9c4\nMOV             W1, #0x6F ; 'o'                                        ; +0x3c, 0xe1f9c8\nMOV             W2, #0x9C                                              ; +0x40, 0xe1f9cc\nADD             X3, X3, #aCryptoCmsCmsLi@PAGEOFF; \"crypto/cms/cms_lib.c\" ; +0x44, 0xe1f9d0\nMOV             W4, #0x5E ; '^'                                        ; +0x48, 0xe1f9d4\nMOV             X20, #0                                                ; +0x4c, 0xe1f9d8\nBL              ERR_put_error                                          ; +0x50, 0xe1f9dc\nMOV             X0, X20                                                ; +0x54, 0xe1f9e0\nLDR             X21, [SP,#0x30+var_10]                                 ; +0x58, 0xe1f9e4\nLDP             X19, X20, [SP,#0x30+var_20]                            ; +0x5c, 0xe1f9e8\nLDP             X29, X30, [SP+0x30+var_30],#0x30                       ; +0x60, 0xe1f9ec\nRET                                                                    ; +0x64, 0xe1f9f0\nADRL            X3, jpt_E1FA08                                         ; +0x68, 0xe1f9f4\nLDRB            W0, [X3,W0,UXTW]                                       ; +0x70, 0xe1f9fc\nADR             X1, loc_E1FA0C; jumptable 0000000000E1FA08 case 21     ; +0x74, 0xe1fa00\nADD             X0, X1, W0,SXTB#2                                      ; +0x78, 0xe1fa04\nBR              X0; switch jump                                        ; +0x7c, 0xe1fa08\nMOV             X20, X21; jumptable 0000000000E1FA08 case 21           ; +0x80, 0xe1fa0c\nLDR             X21, [SP,#0x30+var_10]                                 ; +0x84, 0xe1fa10\nMOV             X0, X20                                                ; +0x88, 0xe1fa14\nLDP             X19, X20, [SP,#0x30+var_20]                            ; +0x8c, 0xe1fa18\nLDP             X29, X30, [SP+0x30+var_30],#0x30                       ; +0x90, 0xe1fa1c\nRET                                                                    ; +0x94, 0xe1fa20\nMOV             X0, X20; jumptable 0000000000E1FA08 case 26            ; +0x98, 0xe1fa24\nBL              cms_EncryptedData_init_bio                             ; +0x9c, 0xe1fa28\nCBZ             X0, loc_E1FA50                                         ; +0xa0, 0xe1fa2c\nMOV             X1, X21                                                ; +0xa4, 0xe1fa30\nLDR             X21, [SP,#0x30+var_10]                                 ; +0xa8, 0xe1fa34\nLDP             X19, X20, [SP,#0x30+var_20]                            ; +0xac, 0xe1fa38\nLDP             X29, X30, [SP+0x30+var_30],#0x30                       ; +0xb0, 0xe1fa3c\nB               BIO_push                                               ; +0xb4, 0xe1fa40\nMOV             X0, X20; jumptable 0000000000E1FA08 case 25            ; +0xb8, 0xe1fa44\nBL              cms_DigestedData_init_bio                              ; +0xbc, 0xe1fa48\nCBNZ            X0, loc_E1FA30                                         ; +0xc0, 0xe1fa4c\nMOV             X20, X0                                                ; +0xc4, 0xe1fa50\nCBNZ            X19, loc_E1F9E0                                        ; +0xc8, 0xe1fa54\nMOV             X0, X21                                                ; +0xcc, 0xe1fa58\nBL              BIO_free                                               ; +0xd0, 0xe1fa5c\nB               loc_E1F9E0                                             ; +0xd4, 0xe1fa60\nMOV             X0, X20; jumptable 0000000000E1FA08 case 23            ; +0xd8, 0xe1fa64\nBL              cms_EnvelopedData_init_bio                             ; +0xdc, 0xe1fa68\nB               loc_E1FA2C                                             ; +0xe0, 0xe1fa6c\nMOV             X0, X20; jumptable 0000000000E1FA08 case 22            ; +0xe4, 0xe1fa70\nBL              cms_SignedData_init_bio                                ; +0xe8, 0xe1fa74\nB               loc_E1FA2C                                             ; +0xec, 0xe1fa78\nBL              cms_content_bio                                        ; +0xf0, 0xe1fa7c\nMOV             X21, X0                                                ; +0xf4, 0xe1fa80\nCBNZ            X0, loc_E1F9AC                                         ; +0xf8, 0xe1fa84\nADRP            X3, #aCryptoCmsCmsLi@PAGE; \"crypto/cms/cms_lib.c\"      ; +0xfc, 0xe1fa88\nMOV             W0, #0x2E ; '.'                                        ; +0x100, 0xe1fa8c\nMOV             W1, #0x6F ; 'o'                                        ; +0x104, 0xe1fa90\nMOV             W2, #0x7F                                              ; +0x108, 0xe1fa94\nADD             X3, X3, #aCryptoCmsCmsLi@PAGEOFF; \"crypto/cms/cms_lib.c\" ; +0x10c, 0xe1fa98\nMOV             W4, #0x40 ; '@'                                        ; +0x110, 0xe1fa9c\nMOV             X20, X21                                               ; +0x114, 0xe1faa0\nBL              ERR_put_error                                          ; +0x118, 0xe1faa4\nB               loc_E1F9E0                                             ; +0x11c, 0xe1faa8", "xrefs": ["sub_E1D530 @ 0xe1d598", "<???> @ 0x6f810"], "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"}