//
// sub_1007212A0 from 0x1007212a0 to 0x10072133e (158 bytes)
//
// 0 xrefs:
//
// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 12:36:14 +0000
//
__int64 __fastcall sub_1007212A0(const char *a1, const char *a2)
{
char v2; // dl
char *v3; // rax
unsigned int v4; // ecx
unsigned int v5; // eax
__int64 v6; // r14
unsigned int v7; // eax
v2 = *a2;
if ( *a2 )
{
v3 = (char *)(a2 + 1);
v4 = 0;
do
{
v4 = (1025 * (v4 + v2)) ^ ((1025 * (v4 + v2)) >> 6);
v2 = *v3++;
}
while ( v2 );
v5 = 9 * v4;
}
else
{
v5 = 0;
}
v6 = *(_QWORD *)&a1[8 * (((unsigned __int8)v5 ^ (unsigned __int8)(v5 >> 11)) & 0x3F)];
if ( !v6 )
return 0;
while ( 1 )
{
v7 = *(_DWORD *)v6 - 1;
if ( v7 >= 4 )
sub_1009A82A0(a1);
a1 = (const char *)(v6 + qword_100A12170[v7]);
if ( !strcmp(a1, a2) )
break;
v6 = *(_QWORD *)(v6 + 8);
if ( !v6 )
return 0;
}
return v6;
}