//
// X509_NAME_hash from 0x83e944 to 0x83e9b0 (108 bytes)
//
// 5 xrefs:
// > j_X509_NAME_hash @ 0x790adc
// > sub_83C074 @ 0x83c11c
// > X509_issuer_name_hash @ 0x83e9b4
// > X509_subject_name_hash @ 0x83e9bc
// > ??> @ 0x5b10c
//
// 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 X509_NAME_hash(int a1)
{
int v2; // r5
int v3; // r4
void *v4; // r0
int result; // r0
_BYTE v6[24]; // [sp+Ch] [bp-18h] BYREF
i2d_X509_NAME(a1, 0);
v2 = *(_DWORD *)(a1 + 12);
v3 = *(_DWORD *)(a1 + 16);
v4 = EVP_sha1();
result = EVP_Digest(v2, v3, (int)v6, nullptr, (int)v4, nullptr);
if ( result )
return (v6[2] << 16) | (v6[1] << 8) | v6[0] | (v6[3] << 24);
return result;
}