//
// sub_865A4C from 0x865a4c to 0x865b48 (252 bytes)
//
// 3 xrefs:
// > ASN1_str2mask @ 0x86619c
// > ASN1_str2mask @ 0x8661a8
// > ??> @ 0x8661b8
//
// 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 sub_865A4C(const char *a1, size_t a2, _DWORD *a3)
{
size_t v4; // r5
char **v6; // r4
unsigned int v7; // r0
int v9; // r3
if ( !a1 )
return 0;
v4 = a2;
if ( a2 == 3 )
{
if ( !strncmp(a1, "DIR", 3u) )
{
*a3 |= 0x2906u;
return 1;
}
}
else if ( a2 == -1 )
{
v4 = strlen(a1);
}
v6 = &off_A397A4;
dword_AD4860 = (int)&off_A397A4;
while ( v6[1] != (char *)v4 || strncmp(*v6, a1, v4) )
{
v6 += 3;
dword_AD4860 = (int)v6;
if ( v6 == (char **)&unk_A399F0 )
return 0;
}
v7 = (unsigned int)v6[2];
if ( !v7 )
return 0;
if ( (v7 & 0x10000) != 0 )
return 0;
v9 = ASN1_tag2bit(v7);
if ( !v9 )
return 0;
*a3 |= v9;
return 1;
}