{"type": "func", "start": 8874288, "end": 8874512, "name": "CMS_SignedData_init", "pseudocode": "// \n// CMS_SignedData_init from 0x876930 to 0x876a10 (224 bytes)\n// \n// 1 xrefs:\n// > <???> @ 0x6a56c\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_SignedData_init(int *a1)\n{\n  int v2; // r3\n  int result; // r0\n  _DWORD *v4; // r0\n  char ***v5; // r6\n  _DWORD *v6; // r0\n  char **v7; // r0\n\n  if ( a1[1] )\n  {\n    if ( OBJ_obj2nid(*a1) == (_BYTE *)&dword_14 + 2 )\n    {\n      v2 = a1[1];\n      goto LABEL_5;\n    }\n    ERR_put_error(46, 133, 108, (int)\"crypto/cms/cms_sd.c\", 26);\n    return 0;\n  }\n  v4 = ASN1_item_new((int)&CMS_SignedData_it);\n  a1[1] = (int)v4;\n  if ( !v4 )\n  {\n    ERR_put_error(46, 149, 65, (int)\"crypto/cms/cms_sd.c\", 37);\n    return 0;\n  }\n  *v4 = 1;\n  v5 = (char ***)v4[2];\n  *v5 = OBJ_nid2obj(0x15u);\n  v6 = (_DWORD *)*a1;\n  *(_DWORD *)(*(_DWORD *)(a1[1] + 8) + 8) = 1;\n  ASN1_OBJECT_free(v6);\n  v7 = OBJ_nid2obj(0x16u);\n  v2 = a1[1];\n  *a1 = (int)v7;\nLABEL_5:\n  result = v2;\n  if ( v2 )\n    return 1;\n  return result;\n}", "assembly": "; \n; CMS_SignedData_init from 0x876930 to 0x876a10 (224 bytes)\n; \n; 1 xrefs:\n; > <???> @ 0x6a56c\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, 0x876930\nLDR             R3, [R0,#4]                                            ; +0x4, 0x876934\nSUB             SP, SP, #8                                             ; +0x8, 0x876938\nCMP             R3, #0                                                 ; +0xc, 0x87693c\nMOV             R4, R0                                                 ; +0x10, 0x876940\nBEQ             loc_87696C                                             ; +0x14, 0x876944\nLDR             R0, [R0]                                               ; +0x18, 0x876948\nBL              OBJ_obj2nid                                            ; +0x1c, 0x87694c\nCMP             R0, #0x16                                              ; +0x20, 0x876950\nLDREQ           R3, [R4,#4]                                            ; +0x24, 0x876954\nBNE             loc_8769C4                                             ; +0x28, 0x876958\nMOVS            R0, R3                                                 ; +0x2c, 0x87695c\nMOVNE           R0, #1                                                 ; +0x30, 0x876960\nADD             SP, SP, #8                                             ; +0x34, 0x876964\nPOP             {R4-R6,PC}                                             ; +0x38, 0x876968\nLDR             R0, =(CMS_SignedData_it_ptr - 0x876978)                ; +0x3c, 0x87696c\nLDR             R0, [PC,R0]; CMS_SignedData_it                         ; +0x40, 0x876970\nBL              ASN1_item_new                                          ; +0x44, 0x876974\nCMP             R0, #0                                                 ; +0x48, 0x876978\nMOV             R3, R0                                                 ; +0x4c, 0x87697c\nSTR             R0, [R4,#4]                                            ; +0x50, 0x876980\nBEQ             loc_8769EC                                             ; +0x54, 0x876984\nMOV             R5, #1                                                 ; +0x58, 0x876988\nSTR             R5, [R0]                                               ; +0x5c, 0x87698c\nMOV             R0, #0x15                                              ; +0x60, 0x876990\nLDR             R6, [R3,#8]                                            ; +0x64, 0x876994\nBL              OBJ_nid2obj                                            ; +0x68, 0x876998\nSTR             R0, [R6]                                               ; +0x6c, 0x87699c\nLDM             R4, {R0,R3}                                            ; +0x70, 0x8769a0\nLDR             R3, [R3,#8]                                            ; +0x74, 0x8769a4\nSTR             R5, [R3,#8]                                            ; +0x78, 0x8769a8\nBL              ASN1_OBJECT_free                                       ; +0x7c, 0x8769ac\nMOV             R0, #0x16                                              ; +0x80, 0x8769b0\nBL              OBJ_nid2obj                                            ; +0x84, 0x8769b4\nLDR             R3, [R4,#4]                                            ; +0x88, 0x8769b8\nSTR             R0, [R4]                                               ; +0x8c, 0x8769bc\nB               loc_87695C                                             ; +0x90, 0x8769c0\nMOV             R3, #0x1A                                              ; +0x94, 0x8769c4\nSTR             R3, [SP,#8+var_8]                                      ; +0x98, 0x8769c8\nLDR             R3, =(aCryptoCmsCmsSd - 0x8769E4); \"crypto/cms/cms_sd.c\" ; +0x9c, 0x8769cc\nMOV             R0, #0x2E ; '.'                                        ; +0xa0, 0x8769d0\nMOV             R1, #0x85                                              ; +0xa4, 0x8769d4\nMOV             R2, #0x6C ; 'l'                                        ; +0xa8, 0x8769d8\nADD             R3, PC, R3; \"crypto/cms/cms_sd.c\"                      ; +0xac, 0x8769dc\nBL              ERR_put_error                                          ; +0xb0, 0x8769e0\nMOV             R0, #0                                                 ; +0xb4, 0x8769e4\nB               loc_876964                                             ; +0xb8, 0x8769e8\nMOV             R3, #0x25 ; '%'                                        ; +0xbc, 0x8769ec\nSTR             R3, [SP,#8+var_8]                                      ; +0xc0, 0x8769f0\nLDR             R3, =(aCryptoCmsCmsSd - 0x876A0C); \"crypto/cms/cms_sd.c\" ; +0xc4, 0x8769f4\nMOV             R0, #0x2E ; '.'                                        ; +0xc8, 0x8769f8\nMOV             R1, #0x95                                              ; +0xcc, 0x8769fc\nMOV             R2, #0x41 ; 'A'                                        ; +0xd0, 0x876a00\nADD             R3, PC, R3; \"crypto/cms/cms_sd.c\"                      ; +0xd4, 0x876a04\nBL              ERR_put_error                                          ; +0xd8, 0x876a08\nB               loc_8769E4                                             ; +0xdc, 0x876a0c", "xrefs": ["<???> @ 0x6a56c"], "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"}