// // CMS_add0_cert from 0x875878 to 0x875988 (272 bytes) // // 2 xrefs: // > CMS_add1_cert @ 0x8759a0 // > @ 0x6a4bc // // 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 // int __fastcall CMS_add0_cert(int *a1, int a2) { char *v4; // r0 int *v5; // r5 signed int v6; // r4 int v7; // r0 unsigned int v8; // r1 _DWORD *v10; // r0 _DWORD *v12; // r0 v4 = OBJ_obj2nid(*a1); if ( v4 == (_BYTE *)&dword_14 + 2 ) { v5 = (int *)(a1[1] + 12); if ( a1[1] != -12 ) goto LABEL_4; return 0; } if ( v4 != (_BYTE *)&dword_14 + 3 ) { ERR_put_error(46, 128, 152, (int)"crypto/cms/cms_lib.c", 354); return 0; } v5 = *(int **)(a1[1] + 4); if ( !v5 ) return 0; LABEL_4: v6 = 0; while ( 1 ) { v7 = OPENSSL_sk_num(*v5); v8 = v6; if ( v6++ >= v7 ) break; v10 = (_DWORD *)OPENSSL_sk_value((_DWORD *)*v5, v8); if ( !*v10 && !X509_cmp(v10[1], a2) ) { ERR_put_error(46, 164, 175, (int)"crypto/cms/cms_lib.c", 394); return 0; } } v12 = CMS_add0_CertificateChoices(a1); if ( !v12 ) return 0; *v12 = 0; v12[1] = a2; return 1; }
GD Web Decomp Icon

GD Web Decomp

Raw Source