//
// sub_100428B5C from 0x100428b5c to 0x100428bf0 (148 bytes)
//
// 1 xrefs:
// > sub_10044D590 @ 0x10044d61c
//
// 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_100428B5C(__int64 a1, __int64 a2)
{
_QWORD *v2; // x20
_QWORD *v3; // x23
_QWORD *v5; // x21
__int64 v6; // x22
v2 = (_QWORD *)(a1 + 40);
v3 = *(_QWORD **)(a1 + 40);
if ( v3 == (_QWORD *)(a1 + 40) )
return nullptr;
while ( 1 )
{
v5 = v3 - 1;
v6 = v3 ? (__int64)(v3 - 1) : 0LL;
if ( (**(unsigned int (__fastcall ***)(__int64))v6)(v6) == *(unsigned __int8 *)(a2 + 8)
&& ((*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v6 + 8LL))(v6) & 1) != 0 )
{
break;
}
v3 = (_QWORD *)*v3;
if ( v3 == v2 )
return nullptr;
}
return v5;
}