// // sub_E6F8EC from 0xe6f8ec to 0xe6fc74 (904 bytes) // // 1 xrefs: // > @ 0x1227ae0 // // 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 sub_E6F8EC(__int64 a1, __int64 a2, unsigned int *a3) { int v4; // w19 bool v6; // cc int v7; // w26 int v8; // w25 int v9; // w1 __int64 i; // x0 __int64 v11; // x0 const char *v12; // x21 __int64 v13; // x20 const char *v14; // x0 __int64 v15; // x19 bool v16; // w0 __int64 v17; // x23 _QWORD *v18; // x19 __int64 v19; // x22 int *v20; // x20 __int64 result; // x0 const char *v22; // x0 __int64 issuer_name; // x0 __int64 v24; // x24 __int64 serialNumber; // x0 __int64 v26; // x21 __int64 ext; // x0 v4 = 0; v6 = (int)OPENSSL_sk_num(a3) > 0; v7 = 0; v8 = 0; v9 = 0; for ( i = (__int64)a3; v6; i = (__int64)a3 ) { v11 = OPENSSL_sk_value(i, v9); v12 = *(const char **)(v11 + 8); v13 = v11; if ( !strcmp(v12, "keyid") ) { v14 = *(const char **)(v13 + 16); if ( v14 ) { ++v4; if ( !strcmp(v14, "always") ) v8 = 2; else v8 = 1; } else { v8 = 1; ++v4; } } else { if ( strcmp(v12, "issuer") ) { ERR_put_error(34, 119, 120, (__int64)"crypto/x509v3/v3_akey.c", 94); ERR_add_error_data(2, "name=", *(_QWORD *)(v13 + 8)); return 0; } v22 = *(const char **)(v13 + 16); if ( v22 ) { ++v4; if ( !strcmp(v22, "always") ) v7 = 2; else v7 = 1; } else { v7 = 1; ++v4; } } v6 = v4 < (int)OPENSSL_sk_num(a3); v9 = v4; } if ( !a2 ) { LABEL_42: ERR_put_error(34, 119, 121, (__int64)"crypto/x509v3/v3_akey.c", 104); return 0; } v15 = *(_QWORD *)(a2 + 8); if ( !v15 ) { if ( *(_DWORD *)a2 == 1 ) return AUTHORITY_KEYID_new(); goto LABEL_42; } if ( v8 ) { if ( (X509_get_ext_by_NID(*(_QWORD *)(a2 + 8)) & 0x80000000) != 0 || (ext = X509_get_ext(v15)) == 0 ) { v16 = 1; v17 = 0; } else { v17 = X509V3_EXT_d2i(ext); v16 = v17 == 0; if ( v17 ) goto LABEL_13; } if ( v8 == 2 ) { ERR_put_error(34, 119, 123, (__int64)"crypto/x509v3/v3_akey.c", 116); return 0; } } else { v16 = 1; v17 = 0; } LABEL_13: if ( v16 && v7 != 0 || v7 == 2 ) { issuer_name = X509_get_issuer_name(v15); v24 = X509_NAME_dup(issuer_name); serialNumber = X509_get_serialNumber(v15); v19 = ASN1_INTEGER_dup(serialNumber); if ( v19 && v24 ) { v18 = (_QWORD *)AUTHORITY_KEYID_new(); if ( v18 ) { v20 = (int *)OPENSSL_sk_new_null(); if ( v20 && (v26 = GENERAL_NAME_new()) != 0 ) { if ( (unsigned int)OPENSSL_sk_push(v20, v26) ) { *(_QWORD *)(v26 + 8) = v24; *(_DWORD *)v26 = 4; goto LABEL_17; } } else { v26 = 0; } ERR_put_error(34, 119, 65, (__int64)"crypto/x509v3/v3_akey.c", 138); } else { v26 = 0; v20 = nullptr; } } else { v26 = 0; ERR_put_error(34, 119, 122, (__int64)"crypto/x509v3/v3_akey.c", 126); v20 = nullptr; } LABEL_45: OPENSSL_sk_free((void **)v20); GENERAL_NAME_free(v26); X509_NAME_free(v24); ASN1_INTEGER_free(v19); ASN1_OCTET_STRING_free(v17); return 0; } v18 = (_QWORD *)AUTHORITY_KEYID_new(); if ( !v18 ) { v19 = 0; v26 = 0; v20 = nullptr; v24 = 0; goto LABEL_45; } v19 = 0; v20 = nullptr; LABEL_17: v18[1] = v20; result = (__int64)v18; v18[2] = v19; *v18 = v17; return result; }
GD Web Decomp Icon

GD Web Decomp

Raw Source