// // CMS_get1_certs from 0xe20448 to 0xe2057c (308 bytes) // // 1 xrefs: // > @ 0x3aaa0 // // 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_get1_certs(__int64 *a1) { int v2; // w0 unsigned int **v3; // x21 int v4; // w19 int *v5; // x22 bool v6; // cc int v7; // w1 __int64 v8; // x0 __int64 v9; // x20 int *v11; // x0 v2 = OBJ_obj2nid(*a1); if ( v2 != 22 ) { if ( v2 == 23 ) { v3 = *(unsigned int ***)(a1[1] + 8); if ( v3 ) goto LABEL_4; } else { ERR_put_error(46, 128, 152, (__int64)"crypto/cms/cms_lib.c", 354); } return nullptr; } v3 = (unsigned int **)(a1[1] + 24); if ( a1[1] == -24 ) return nullptr; LABEL_4: v4 = 0; v5 = nullptr; while ( 1 ) { v6 = v4 < (int)OPENSSL_sk_num(*v3); v7 = v4++; if ( !v6 ) return v5; while ( 1 ) { v8 = OPENSSL_sk_value((__int64)*v3, v7); v9 = v8; if ( *(_DWORD *)v8 ) break; if ( v5 ) { if ( !(unsigned int)OPENSSL_sk_push(v5, *(_QWORD *)(v8 + 8)) ) goto LABEL_16; } else { v11 = (int *)OPENSSL_sk_new_null(); v5 = v11; if ( !v11 ) return nullptr; if ( !(unsigned int)OPENSSL_sk_push(v11, *(_QWORD *)(v9 + 8)) ) { LABEL_16: OPENSSL_sk_pop_free(v5, (void (__fastcall *)(__int64))X509_free); return nullptr; } } X509_up_ref(*(_QWORD *)(v9 + 8)); v6 = v4 < (int)OPENSSL_sk_num(*v3); v7 = v4++; if ( !v6 ) return v5; } } }
GD Web Decomp Icon

GD Web Decomp

Raw Source