//
// sub_1005E2604 from 0x1005e2604 to 0x1005e2664 (96 bytes)
//
// 3 xrefs:
// > sub_1005E33B0 @ 0x1005e344c
// > sub_1005F6DC0 @ 0x1005f6e18
// > sub_1005F71F8 @ 0x1005f7268
//
// 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:09:41 +0000
//
__int64 __fastcall sub_1005E2604(__int64 a1, int a2, _DWORD *a3)
{
_QWORD *v3; // x9
int v4; // w10
__int64 v5; // x11
if ( !a3 )
return 31;
v3 = *(_QWORD **)(a1 + 320);
if ( v3 == (_QWORD *)(a1 + 320) )
return 31;
v4 = 0;
while ( 1 )
{
v5 = v3[2];
if ( *(_DWORD *)(v5 + 24) != 1010 )
break;
LABEL_4:
v3 = (_QWORD *)*v3;
if ( v3 == (_QWORD *)(a1 + 320) )
return 31;
}
if ( v4 != a2 )
{
++v4;
goto LABEL_4;
}
*a3 = *(_DWORD *)(v5 + 20);
return 0;
}