{"type": "func", "start": 8870332, "end": 8870544, "name": "CMS_add0_RevocationInfoChoice", "pseudocode": "// \n// CMS_add0_RevocationInfoChoice from 0x8759bc to 0x875a90 (212 bytes)\n// \n// 2 xrefs:\n// > CMS_add0_crl @ 0x875aa4\n// > <???> @ 0x6a4dc\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_DWORD *__fastcall CMS_add0_RevocationInfoChoice(int *a1)\n{\n  char *v2; // r0\n  int v3; // r5\n  int **v4; // r5\n  _DWORD *v5; // r4\n  int v6; // r5\n  _DWORD *result; // r0\n  int *v8; // r0\n\n  v2 = OBJ_obj2nid(*a1);\n  if ( v2 != (_BYTE *)&dword_14 + 2 )\n  {\n    if ( v2 == (_BYTE *)&dword_14 + 3 )\n    {\n      v3 = *(_DWORD *)(a1[1] + 4);\n      if ( v3 )\n      {\n        v4 = (int **)(v3 + 4);\n        goto LABEL_5;\n      }\n    }\n    else\n    {\n      ERR_put_error(46, 132, 152, (int)\"crypto/cms/cms_lib.c\", 431);\n    }\n    return nullptr;\n  }\n  v4 = (int **)(a1[1] + 16);\n  if ( a1[1] == -16 )\n    return nullptr;\nLABEL_5:\n  if ( !*v4 )\n  {\n    v8 = OPENSSL_sk_new_null();\n    *v4 = v8;\n    if ( !v8 )\n      return nullptr;\n  }\n  v5 = ASN1_item_new((int)CMS_RevocationInfoChoice_it);\n  if ( !v5 )\n    return nullptr;\n  v6 = OPENSSL_sk_push(*v4, (int)v5);\n  result = v5;\n  if ( !v6 )\n  {\n    ASN1_item_free(v5, CMS_RevocationInfoChoice_it);\n    return nullptr;\n  }\n  return result;\n}", "assembly": "; \n; CMS_add0_RevocationInfoChoice from 0x8759bc to 0x875a90 (212 bytes)\n; \n; 2 xrefs:\n; > CMS_add0_crl @ 0x875aa4\n; > <???> @ 0x6a4dc\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, 0x8759bc\nMOV             R4, R0                                                 ; +0x4, 0x8759c0\nSUB             SP, SP, #8                                             ; +0x8, 0x8759c4\nLDR             R0, [R0]                                               ; +0xc, 0x8759c8\nBL              OBJ_obj2nid                                            ; +0x10, 0x8759cc\nCMP             R0, #0x16                                              ; +0x14, 0x8759d0\nBEQ             loc_875A6C                                             ; +0x18, 0x8759d4\nCMP             R0, #0x17                                              ; +0x1c, 0x8759d8\nBNE             loc_875A40                                             ; +0x20, 0x8759dc\nLDR             R3, [R4,#4]                                            ; +0x24, 0x8759e0\nLDR             R5, [R3,#4]                                            ; +0x28, 0x8759e4\nCMP             R5, #0                                                 ; +0x2c, 0x8759e8\nBEQ             loc_875A60                                             ; +0x30, 0x8759ec\nADD             R5, R5, #4                                             ; +0x34, 0x8759f0\nLDR             R3, [R5]                                               ; +0x38, 0x8759f4\nCMP             R3, #0                                                 ; +0x3c, 0x8759f8\nBEQ             loc_875A7C                                             ; +0x40, 0x8759fc\nLDR             R6, =(CMS_RevocationInfoChoice_it_ptr - 0x875A0C)      ; +0x44, 0x875a00\nLDR             R6, [PC,R6]; CMS_RevocationInfoChoice_it               ; +0x48, 0x875a04\nMOV             R0, R6                                                 ; +0x4c, 0x875a08\nBL              ASN1_item_new                                          ; +0x50, 0x875a0c\nSUBS            R4, R0, #0                                             ; +0x54, 0x875a10\nBEQ             loc_875A60                                             ; +0x58, 0x875a14\nLDR             R0, [R5]                                               ; +0x5c, 0x875a18\nMOV             R1, R4                                                 ; +0x60, 0x875a1c\nBL              OPENSSL_sk_push                                        ; +0x64, 0x875a20\nSUBS            R5, R0, #0                                             ; +0x68, 0x875a24\nMOV             R0, R4                                                 ; +0x6c, 0x875a28\nBNE             loc_875A64                                             ; +0x70, 0x875a2c\nMOV             R1, R6                                                 ; +0x74, 0x875a30\nBL              ASN1_item_free                                         ; +0x78, 0x875a34\nMOV             R0, R5                                                 ; +0x7c, 0x875a38\nB               loc_875A64                                             ; +0x80, 0x875a3c\nLDR             R3, =0x1AF                                             ; +0x84, 0x875a40\nSTR             R3, [SP,#8+var_8]                                      ; +0x88, 0x875a44\nLDR             R3, =(aCryptoCmsCmsLi - 0x875A60); \"crypto/cms/cms_lib.c\" ; +0x8c, 0x875a48\nMOV             R0, #0x2E ; '.'                                        ; +0x90, 0x875a4c\nMOV             R1, #0x84                                              ; +0x94, 0x875a50\nMOV             R2, #0x98                                              ; +0x98, 0x875a54\nADD             R3, PC, R3; \"crypto/cms/cms_lib.c\"                     ; +0x9c, 0x875a58\nBL              ERR_put_error                                          ; +0xa0, 0x875a5c\nMOV             R0, #0                                                 ; +0xa4, 0x875a60\nADD             SP, SP, #8                                             ; +0xa8, 0x875a64\nPOP             {R4-R6,PC}                                             ; +0xac, 0x875a68\nLDR             R5, [R4,#4]                                            ; +0xb0, 0x875a6c\nADDS            R5, R5, #0x10                                          ; +0xb4, 0x875a70\nBNE             loc_8759F4                                             ; +0xb8, 0x875a74\nB               loc_875A60                                             ; +0xbc, 0x875a78\nBL              OPENSSL_sk_new_null                                    ; +0xc0, 0x875a7c\nCMP             R0, #0                                                 ; +0xc4, 0x875a80\nSTR             R0, [R5]                                               ; +0xc8, 0x875a84\nBEQ             loc_875A60                                             ; +0xcc, 0x875a88\nB               loc_875A00                                             ; +0xd0, 0x875a8c", "xrefs": ["CMS_add0_crl @ 0x875aa4", "<???> @ 0x6a4dc"], "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"}