//
// sub_65BFEC from 0x65bfec to 0x65c048 (92 bytes)
//
// 2 xrefs:
// > std::_Hashtable,std::__detail::_Identity,std::equal_to,std::hash,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits>::_M_insert>>> @ 0x675678
// > drawTrace @ 0x675f00
//
// 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
//
_QWORD *__fastcall sub_65BFEC(_QWORD *a1, __int64 a2, __int64 *a3)
{
_QWORD *v3; // x7
_QWORD *v4; // x4
__int64 v5; // x8
unsigned __int64 v6; // x6
_QWORD *v7; // x2
v3 = *(_QWORD **)(*a1 + 8 * a2);
if ( !v3 )
return nullptr;
v4 = (_QWORD *)*v3;
v5 = *a3;
v6 = *(_QWORD *)(*v3 + 8LL);
while ( v5 != v6 )
{
v7 = (_QWORD *)*v4;
v3 = v4;
v4 = v7;
if ( v7 )
{
v6 = v7[1];
if ( a2 == v6 % a1[1] )
continue;
}
return nullptr;
}
return v3;
}