// // CMS_dataFinal from 0x109ddac to 0x109df54 (424 bytes) // // 2 xrefs: // > sub_109B830 @ 0x109b8bc // > @ 0x786b8 // // This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True! // // Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA // Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings // Generated at Fri, 27 Nov 2026 13:17:30 +0000 // __int64 __fastcall CMS_dataFinal(__int64 *a1, _QWORD *a2) { __int64 result; // x0 __int64 *v5; // x19 int v6; // w0 _QWORD *type; // x0 __int64 v8; // x22 int v9; // w23 __int64 v10; // [xsp+48h] [xbp+48h] BYREF result = CMS_get0_content(a1); v5 = (__int64 *)result; if ( result ) { if ( *(_QWORD *)result && (*(_QWORD *)(*(_QWORD *)result + 16LL) & 0x20) != 0 ) { type = BIO_find_type(a2, 1025); v8 = (__int64)type; if ( !type ) { ERR_put_error(46, 110, 105, (__int64)"crypto/cms/cms_lib.c", 119); return 0; } v9 = BIO_ctrl((__int64)type, 3u, 0, (__int64)&v10); BIO_set_flags(v8, 512); BIO_ctrl(v8, 0x82u, 0, 0); ASN1_STRING_set0(*v5, v10, v9); *(_QWORD *)(*v5 + 16) &= ~0x20uLL; } v6 = OBJ_obj2nid(*a1); if ( v6 != 23 ) { if ( v6 <= 23 ) { if ( v6 != 21 ) { if ( v6 == 22 ) return cms_SignedData_final(a1, a2); goto LABEL_13; } } else if ( v6 != 26 && v6 != 786 ) { if ( v6 == 25 ) return cms_DigestedData_do_final(a1, a2, 0); LABEL_13: ERR_put_error(46, 110, 156, (__int64)"crypto/cms/cms_lib.c", 146); return 0; } } return 1; } return result; }