//
// sub_51B70 from 0x51b70 to 0x51bb0 (64 bytes)
//
// 3 xrefs:
// > sub_536F8 @ 0x53744
// > sub_58910 @ 0x5893e
// > sub_58BB0 @ 0x58bfc
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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:40:43 +0000
//
int __fastcall sub_51B70(int a1, int a2, _DWORD *a3)
{
_DWORD *v3; // r0
int v4; // r12
_DWORD *v5; // r5
int v6; // r6
if ( a3 )
{
v3 = (_DWORD *)(a1 + 300);
v4 = 0;
v5 = v3;
while ( 1 )
{
v5 = (_DWORD *)*v5;
if ( v5 == v3 )
break;
v6 = v5[2];
if ( *(_DWORD *)(v6 + 16) != 1010 )
{
if ( v4 == a2 )
{
*a3 = *(_DWORD *)(v6 + 12);
return 0;
}
++v4;
}
}
}
return 31;
}