//
// sub_10051CF84 from 0x10051cf84 to 0x10051d044 (192 bytes)
//
// 4 xrefs:
// > sub_10051C1D8 @ 0x10051c210
// > sub_10051C7A4 @ 0x10051c9d0
// > PlatformerControlsPopup::update @ 0x10051d184
// > PlatformerControlsPopup::onClose @ 0x10051d304
//
// 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:09 +0000
//
__int64 __fastcall sub_10051CF84(__int64 a1)
{
_QWORD *v2; // x0
__int64 v3; // x20
__int64 v4; // x8
_BOOL4 v5; // w21
unsigned int *v6; // x22
__int64 i; // x23
const char *v8; // x1
__int64 v9; // x0
v2 = *(_QWORD **)(a1 + 1064);
if ( v2 )
v3 = sub_1004F1170(v2);
else
v3 = *(unsigned int *)(a1 + 1296);
*(_DWORD *)(a1 + 1300) = v3;
v4 = *(_QWORD *)(a1 + 1048);
if ( v4 )
v5 = *(_DWORD *)(v4 + 1840) == 1;
else
v5 = 0;
v6 = dword_100770310;
for ( i = 1144; i != 1168; i += 8 )
{
v8 = "GJ_button_01.png";
if ( v5 )
{
if ( (*v6 & (unsigned int)v3) != 0 )
v8 = "GJ_button_01.png";
else
v8 = "GJ_button_04.png";
}
v9 = *(_QWORD *)(a1 + i);
if ( v9 )
ButtonSprite::updateBGImage(v9, (__int64)v8);
++v6;
}
return sub_10051D044(a1, v3);
}