// // CMS_set1_signers_certs from 0xe21584 to 0xe21724 (416 bytes) // // 1 xrefs: // > @ 0x86b20 // // This function is hookable on this platform! // // Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA // Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings // __int64 __fastcall CMS_set1_signers_certs(__int64 *a1, unsigned int *a2, char a3) { __int64 v5; // x24 __int64 result; // x0 unsigned int v7; // w25 int v8; // w20 unsigned int *v9; // x26 __int64 v10; // x0 __int64 v11; // x19 __int64 v12; // x21 __int64 v13; // x23 bool v14; // cc int v15; // w1 __int64 v16; // x19 int v17; // w1 __int64 v18; // x0 __int64 v19; // x23 if ( (unsigned int)OBJ_obj2nid(*a1) == 22 ) { v5 = a1[1]; result = 0xFFFFFFFFLL; if ( v5 ) { v7 = 0; v8 = 0; v9 = *(unsigned int **)(v5 + 24); while ( v8 < (int)OPENSSL_sk_num(*(unsigned int **)(v5 + 40)) ) { v10 = OPENSSL_sk_value(*(_QWORD *)(v5 + 40), v8); v11 = *(_QWORD *)(v10 + 56); v12 = v10; if ( !v11 ) { do { v14 = (int)v11 < (int)OPENSSL_sk_num(a2); v15 = v11; LODWORD(v11) = v11 + 1; if ( !v14 ) { v16 = *(_QWORD *)(v12 + 56); if ( v16 ) goto LABEL_5; goto LABEL_12; } v13 = OPENSSL_sk_value((__int64)a2, v15); } while ( (unsigned int)CMS_SignerInfo_cert_cmp(v12, v13) ); ++v7; CMS_SignerInfo_set1_signer_cert(v12, v13); v16 = *(_QWORD *)(v12 + 56); if ( v16 ) goto LABEL_5; LABEL_12: if ( (a3 & 0x10) == 0 ) { while ( 1 ) { v14 = (int)v16 < (int)OPENSSL_sk_num(v9); v17 = v16; LODWORD(v16) = v16 + 1; if ( !v14 ) break; v18 = OPENSSL_sk_value((__int64)v9, v17); if ( !*(_DWORD *)v18 ) { v19 = *(_QWORD *)(v18 + 8); if ( !(unsigned int)CMS_SignerInfo_cert_cmp(v12, v19) ) { ++v7; ++v8; CMS_SignerInfo_set1_signer_cert(v12, v19); goto LABEL_6; } } } } } LABEL_5: ++v8; LABEL_6: ; } return v7; } } else { ERR_put_error(46, 133, 108, (__int64)"crypto/cms/cms_sd.c", 26); return 0xFFFFFFFFLL; } return result; }