{"type": "func", "start": 14810684, "end": 14810848, "name": "CMS_set_detached", "pseudocode": "// \n// CMS_set_detached from 0xe1fe3c to 0xe1fee0 (164 bytes)\n// \n// 2 xrefs:\n// > cms_Data_create @ 0xe1ff0c\n// > <???> @ 0x81018\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_set_detached(__int64 *a1, int a2)\n{\n  __int64 *result; // x0\n  __int64 *v3; // x19\n  __int64 v4; // x20\n  __int64 v5; // x0\n\n  result = (__int64 *)CMS_get0_content(a1);\n  v3 = result;\n  if ( result )\n  {\n    if ( a2 )\n    {\n      ASN1_OCTET_STRING_free(*result);\n      *v3 = 0;\n      return (_QWORD *)(dword_0 + 1);\n    }\n    else\n    {\n      v4 = *result;\n      if ( *result || (v5 = ASN1_OCTET_STRING_new(), *v3 = v5, (v4 = v5) != 0) )\n      {\n        *(_QWORD *)(v4 + 16) |= 0x20uLL;\n        return (_QWORD *)(dword_0 + 1);\n      }\n      else\n      {\n        ERR_put_error(46, 147, 65, (__int64)\"crypto/cms/cms_lib.c\", 280);\n        return nullptr;\n      }\n    }\n  }\n  return result;\n}", "assembly": "; \n; CMS_set_detached from 0xe1fe3c to 0xe1fee0 (164 bytes)\n; \n; 2 xrefs:\n; > cms_Data_create @ 0xe1ff0c\n; > <???> @ 0x81018\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, 0xe1fe3c\nMOV             X29, SP                                                ; +0x4, 0xe1fe40\nSTP             X19, X20, [SP,#0x30+var_20]                            ; +0x8, 0xe1fe44\nSTR             X1, [X29,#0x30+var_8]                                  ; +0xc, 0xe1fe48\nBL              CMS_get0_content                                       ; +0x10, 0xe1fe4c\nMOV             X19, X0                                                ; +0x14, 0xe1fe50\nCBZ             X0, loc_E1FEA0                                         ; +0x18, 0xe1fe54\nLDR             X1, [X29,#0x30+var_8]                                  ; +0x1c, 0xe1fe58\nCBNZ            W1, loc_E1FE84                                         ; +0x20, 0xe1fe5c\nLDR             X20, [X0]                                              ; +0x24, 0xe1fe60\nCBZ             X20, loc_E1FEAC                                        ; +0x28, 0xe1fe64\nLDR             X1, [X20,#0x10]                                        ; +0x2c, 0xe1fe68\nMOV             W0, #1                                                 ; +0x30, 0xe1fe6c\nORR             X1, X1, #0x20 ; ' '                                    ; +0x34, 0xe1fe70\nSTR             X1, [X20,#0x10]                                        ; +0x38, 0xe1fe74\nLDP             X19, X20, [SP,#0x30+var_20]                            ; +0x3c, 0xe1fe78\nLDP             X29, X30, [SP+0x30+var_30],#0x30                       ; +0x40, 0xe1fe7c\nRET                                                                    ; +0x44, 0xe1fe80\nLDR             X0, [X0]                                               ; +0x48, 0xe1fe84\nBL              ASN1_OCTET_STRING_free                                 ; +0x4c, 0xe1fe88\nSTR             XZR, [X19]                                             ; +0x50, 0xe1fe8c\nMOV             W0, #1                                                 ; +0x54, 0xe1fe90\nLDP             X19, X20, [SP,#0x30+var_20]                            ; +0x58, 0xe1fe94\nLDP             X29, X30, [SP+0x30+var_30],#0x30                       ; +0x5c, 0xe1fe98\nRET                                                                    ; +0x60, 0xe1fe9c\nLDP             X19, X20, [SP,#0x30+var_20]                            ; +0x64, 0xe1fea0\nLDP             X29, X30, [SP+0x30+var_30],#0x30                       ; +0x68, 0xe1fea4\nRET                                                                    ; +0x6c, 0xe1fea8\nBL              ASN1_OCTET_STRING_new                                  ; +0x70, 0xe1feac\nSTR             X0, [X19]                                              ; +0x74, 0xe1feb0\nMOV             X20, X0                                                ; +0x78, 0xe1feb4\nCBNZ            X0, loc_E1FE68                                         ; +0x7c, 0xe1feb8\nADRP            X3, #aCryptoCmsCmsLi@PAGE; \"crypto/cms/cms_lib.c\"      ; +0x80, 0xe1febc\nMOV             W0, #0x2E ; '.'                                        ; +0x84, 0xe1fec0\nMOV             W1, #0x93                                              ; +0x88, 0xe1fec4\nMOV             W2, #0x41 ; 'A'                                        ; +0x8c, 0xe1fec8\nADD             X3, X3, #aCryptoCmsCmsLi@PAGEOFF; \"crypto/cms/cms_lib.c\" ; +0x90, 0xe1fecc\nMOV             W4, #0x118                                             ; +0x94, 0xe1fed0\nBL              ERR_put_error                                          ; +0x98, 0xe1fed4\nMOV             W0, W20                                                ; +0x9c, 0xe1fed8\nB               loc_E1FE78                                             ; +0xa0, 0xe1fedc", "xrefs": ["cms_Data_create @ 0xe1ff0c", "<???> @ 0x81018"], "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"}