//
// sub_3653B2 from 0x3653b2 to 0x3653f8 (70 bytes)
//
// 2 xrefs:
// > sub_373778 @ 0x373792
// > drawTrace @ 0x378948
//
// 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_3653B2(_DWORD *a1, int a2, _QWORD *a3)
{
_QWORD **v4; // r5
_QWORD *i; // r1
v4 = *(_QWORD ***)(*a1 + 4 * a2);
if ( !v4 )
return nullptr;
for ( i = *v4; *a3 != i[1]; i = *(_QWORD **)i )
{
if ( !*(_DWORD *)i )
return nullptr;
v4 = (_QWORD **)i;
if ( *(_DWORD *)(*(_DWORD *)i + 8) % a1[1] != a2 )
return nullptr;
}
return v4;
}