//
// GJBaseGameLayer::restoreAllUIObjects from 0x10011cee0 to 0x10011d089 (425 bytes)
//
// 1 xrefs:
// > LevelEditorLayer::onStopPlaytest @ 0x1000c6c2d
//
// This function is hookable on this platform (idp: pc, 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 12:24:36 +0000
//
__int64 __fastcall GJBaseGameLayer::restoreAllUIObjects(__int64 a1)
{
__int64 v2; // rdi
unsigned int *v3; // rax
_DWORD **v4; // r15
_DWORD *v5; // r12
__int64 v6; // rax
_QWORD *v7; // rdi
_QWORD *v8; // r14
__int64 v9; // rsi
__int64 result; // rax
int *v11; // [rsp+0h] [rbp-40h] BYREF
unsigned __int64 v12; // [rsp+8h] [rbp-38h]
int v13; // [rsp+10h] [rbp-30h] BYREF
_BYTE v14[41]; // [rsp+17h] [rbp-29h] BYREF
v2 = *(_QWORD *)(a1 + 13296);
if ( !v2 )
{
sub_1007FF190(0);
if ( !*(_QWORD *)(a1 + 2136) )
goto LABEL_15;
goto LABEL_10;
}
v3 = *(unsigned int **)(v2 + 56);
if ( *v3 )
{
v4 = *((_DWORD ***)v3 + 2);
v12 = (unsigned __int64)&v4[*v3 - 1];
do
{
v5 = *v4;
if ( !*v4 )
break;
v13 = v5[229];
v11 = &v13;
v6 = sub_1001493B0(a1 + 2112, &v13, &unk_100A04ED8, &v11, v14);
sub_1002782D0(&v11, v6 + 20);
(*(void (__fastcall **)(_DWORD *, int **))(*(_QWORD *)v5 + 1368LL))(v5, &v11);
(*(void (__fastcall **)(_DWORD *, __int64))(*(_QWORD *)v5 + 1312LL))(v5, 1);
v5[157] = 0;
*((_BYTE *)v5 + 1345) = 0;
(*(void (__fastcall **)(__int64, _DWORD *))(*(_QWORD *)a1 + 1344LL))(a1, v5);
cocos2d::CCDictionary::setObject_1(*(_QWORD *)(a1 + 3992), v5, (unsigned int)v5[229]);
*((_BYTE *)v5 + 998) = 1;
++v4;
}
while ( (unsigned __int64)v4 <= v12 );
v2 = *(_QWORD *)(a1 + 13296);
}
sub_1007FF190(v2);
if ( *(_QWORD *)(a1 + 2136) )
{
LABEL_10:
v7 = *(_QWORD **)(a1 + 2128);
if ( v7 )
{
do
{
v8 = (_QWORD *)*v7;
operator delete(v7);
v7 = v8;
}
while ( v8 );
}
*(_QWORD *)(a1 + 2128) = 0;
v9 = *(_QWORD *)(a1 + 2120);
if ( v9 )
__bzero(*(_QWORD *)(a1 + 2112), 8 * v9);
*(_QWORD *)(a1 + 2136) = 0;
}
LABEL_15:
result = *(_QWORD *)(a1 + 13504);
*(_QWORD *)(a1 + 13512) = result;
*(_DWORD *)(a1 + 13528) = 0;
return result;
}