//
// UILayer::resetUINodeState from 0x100051684 to 0x1000516d4 (80 bytes)
//
// 9 xrefs:
// > UILayer::reapplyLevelControls @ 0x100051000
// > UILayer::resetAllButtons @ 0x10005113c
// > UILayer::editorPlaytest @ 0x1000517ec
// > UILayer::handleAction @ 0x100051974
// > UILayer::handleAction @ 0x100051d10
// > UILayer::handleAction @ 0x100052134
// > UILayer::handleAction @ 0x10005244c
// > UILayer::doPause @ 0x100052708
// > UILayer::toggleMenuVisibility @ 0x10005276c
//
// 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 10:57:43 +0000
//
__int64 __fastcall UILayer::resetUINodeState(__int64 result)
{
__int64 v1; // x8
unsigned int *v2; // x9
__int64 v3; // x8
__int64 *v4; // x19
unsigned __int64 v5; // x20
v1 = *(_QWORD *)(result + 616);
if ( v1 )
{
v2 = *(unsigned int **)(v1 + 56);
v3 = *v2;
if ( (_DWORD)v3 )
{
v4 = *((__int64 **)v2 + 2);
v5 = (unsigned __int64)&v4[v3 - 1];
do
{
result = *v4;
if ( !*v4 )
break;
result = sub_1000516D4();
++v4;
}
while ( (unsigned __int64)v4 <= v5 );
}
}
return result;
}