{"type": "func", "start": 8879100, "end": 8879208, "name": "CMS_add_smimecap", "pseudocode": "// \n// CMS_add_smimecap from 0x877bfc to 0x877c68 (108 bytes)\n// \n// 2 xrefs:\n// > CMS_add1_signer @ 0x87851c\n// > <???> @ 0x6a66c\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_add_smimecap(int a1, size_t *a2)\n{\n  int v3; // r0\n  int v5; // r4\n  void *v6; // [sp+Ch] [bp-8h] BYREF\n\n  v6 = nullptr;\n  v3 = i2d_X509_ALGORS(a2, (int *)&v6);\n  if ( v3 <= 0 )\n    return 0;\n  v5 = CMS_signed_add1_attr_by_NID(a1, 167, 16, v6, v3);\n  CRYPTO_free(v6, (int)\"crypto/cms/cms_sd.c\", 860);\n  return v5;\n}", "assembly": "; \n; CMS_add_smimecap from 0x877bfc to 0x877c68 (108 bytes)\n; \n; 2 xrefs:\n; > CMS_add1_signer @ 0x87851c\n; > <???> @ 0x6a66c\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,R5,LR}                                             ; +0x0, 0x877bfc\nSUB             SP, SP, #0x14                                          ; +0x4, 0x877c00\nADD             R3, SP, #0x14+var_4                                    ; +0x8, 0x877c04\nMOV             R4, #0                                                 ; +0xc, 0x877c08\nSTR             R4, [R3,#-4]!                                          ; +0x10, 0x877c0c\nMOV             R5, R0                                                 ; +0x14, 0x877c10\nMOV             R0, R1                                                 ; +0x18, 0x877c14\nMOV             R1, R3                                                 ; +0x1c, 0x877c18\nBL              i2d_X509_ALGORS                                        ; +0x20, 0x877c1c\nCMP             R0, #0                                                 ; +0x24, 0x877c20\nMOVLE           R0, R4                                                 ; +0x28, 0x877c24\nBLE             loc_877C60                                             ; +0x2c, 0x877c28\nLDR             R3, [SP,#0x14+var_8]                                   ; +0x30, 0x877c2c\nSTR             R0, [SP,#0x14+var_14]                                  ; +0x34, 0x877c30\nMOV             R1, #0xA7                                              ; +0x38, 0x877c34\nMOV             R2, #0x10                                              ; +0x3c, 0x877c38\nMOV             R0, R5                                                 ; +0x40, 0x877c3c\nBL              CMS_signed_add1_attr_by_NID                            ; +0x44, 0x877c40\nLDR             R1, =(aCryptoCmsCmsSd - 0x877C54); \"crypto/cms/cms_sd.c\" ; +0x48, 0x877c44\nMOV             R2, #0x35C                                             ; +0x4c, 0x877c48\nADD             R1, PC, R1; \"crypto/cms/cms_sd.c\"                      ; +0x50, 0x877c4c\nMOV             R4, R0                                                 ; +0x54, 0x877c50\nLDR             R0, [SP,#0x14+var_8]                                   ; +0x58, 0x877c54\nBL              CRYPTO_free                                            ; +0x5c, 0x877c58\nMOV             R0, R4                                                 ; +0x60, 0x877c5c\nADD             SP, SP, #0x14                                          ; +0x64, 0x877c60\nPOP             {R4,R5,PC}                                             ; +0x68, 0x877c64", "xrefs": ["CMS_add1_signer @ 0x87851c", "<???> @ 0x6a66c"], "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"}