//
// sub_10054ECC4 from 0x10054ecc4 to 0x10054ed58 (148 bytes)
//
// 1 xrefs:
// > sub_1005736F8 @ 0x100573784
//
// This function is hookable on this platform (idp: arm, 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 11:07:52 +0000
//
_QWORD *__fastcall sub_10054ECC4(__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;
}