//
// sub_10051F2B8 from 0x10051f2b8 to 0x10051f3cc (276 bytes)
//
// 2 xrefs:
// > sub_10051E954 @ 0x10051f0e4
// > sub_10051E954 @ 0x10051ec38
//
// 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:11 +0000
//
__int64 __fastcall sub_10051F2B8(__int64 a1, __int64 a2)
{
int v3; // w0
unsigned int v4; // w20
__int64 v5; // x21
__int64 v6; // x22
int v7; // w25
const char *v8; // x1
int v9; // w20
_QWORD *v10; // x0
int v11; // w1
if ( a2 )
v3 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a2 + 64LL))(a2);
else
v3 = -1;
*(_DWORD *)(a1 + 716) = v3;
if ( (unsigned int)sub_1002E757C(*(_QWORD *)(a1 + 696)) )
{
v4 = 0;
do
{
v5 = sub_1002E75A0(*(_QWORD *)(a1 + 696), v4);
v6 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v5 + 1072LL))(v5);
v7 = *(_DWORD *)(a1 + 716);
if ( v7 == (*(unsigned int (__fastcall **)(__int64))(*(_QWORD *)v5 + 64LL))(v5) )
v8 = "GJ_button_01.png";
else
v8 = "GJ_button_04.png";
ButtonSprite::updateBGImage(v6, (__int64)v8);
++v4;
}
while ( v4 < (unsigned int)sub_1002E757C(*(_QWORD *)(a1 + 696)) );
}
v9 = *(_DWORD *)(a1 + 716);
v10 = (_QWORD *)(*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 688) + 1072LL))(*(_QWORD *)(a1 + 688));
if ( v9 == -1 )
v11 = 10921638;
else
v11 = 0xFFFFFF;
ButtonSprite::setColor(v10, v11);
if ( *(_DWORD *)(a1 + 716) != 10 )
*(_DWORD *)(a1 + 756) = 0;
sub_10051F57C(a1);
return sub_10051F618(a1);
}