//
// UILayer::resolveLevelControls from 0x100050e34 to 0x100050ee0 (172 bytes)
//
// 2 xrefs:
// > UILayer::refreshDpad @ 0x100051030
// > UILayer::editorPlaytest @ 0x10005181c
//
// 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
//
void __fastcall UILayer::resolveLevelControls(__int64 a1)
{
__int64 v2; // x0
__int64 v3; // x8
__int64 v4; // x0
unsigned __int64 v5; // x8
__int64 v6; // x0
void *__p[2]; // [xsp+8h] [xbp-28h] BYREF
unsigned __int8 v8; // [xsp+1Fh] [xbp-11h]
v2 = *(_QWORD *)(a1 + 640);
if ( v2 )
{
cocos2d::CCObject::release(v2);
*(_QWORD *)(a1 + 640) = 0;
}
v3 = *(_QWORD *)(a1 + 600);
if ( v3 )
{
v4 = *(_QWORD *)(v3 + 1936);
if ( v4 )
{
if ( *(_DWORD *)(v4 + 1840) == 1 )
{
if ( (*(char *)(v4 + 1839) & 0x8000000000000000LL) != 0 )
{
if ( !*(_QWORD *)(v4 + 1824) )
return;
}
else if ( !*(_BYTE *)(v4 + 1839) )
{
return;
}
sub_100050EFC(__p);
v5 = v8;
if ( (v8 & 0x80u) != 0 )
v5 = (unsigned __int64)__p[1];
if ( v5 )
{
v6 = sub_1004F10AC(__p);
*(_QWORD *)(a1 + 640) = v6;
if ( v6 )
cocos2d::CCObject::retain(v6);
}
if ( (char)v8 < 0 )
operator delete(__p[0]);
}
}
}
}