//
// CustomizeObjectLayer::determineStartValues from 0x140142800 to 0x140142a21 (545 bytes)
//
// 2 xrefs:
// > CustomizeObjectLayer::init @ 0x14013f994
// > ??> @ 0x140917384
//
// 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 11:27:10 +0000
//
unsigned int __fastcall CustomizeObjectLayer::determineStartValues(__int64 a1)
{
__int64 v2; // rcx
__int16 v3; // ax
char v4; // al
int v5; // edx
__int64 v6; // rsi
__int16 v7; // ax
char v8; // al
__int64 v9; // rax
int v10; // edx
unsigned int result; // eax
cocos2d::CCArray *v12; // rcx
unsigned int v13; // edi
struct cocos2d::CCObject *v14; // rax
struct cocos2d::CCObject *v15; // rcx
__int16 v16; // ax
char v17; // al
int v18; // edx
__int64 v19; // rax
__int16 v20; // ax
char v21; // al
__int64 v22; // rax
int v23; // edx
v2 = *(_QWORD *)(a1 + 688);
if ( !v2 )
{
v12 = *(cocos2d::CCArray **)(a1 + 696);
v13 = 0;
*(_BYTE *)(a1 + 754) = 1;
result = cocos2d::CCArray::count(v12);
if ( !result )
return result;
while ( 1 )
{
v14 = cocos2d::CCArray::objectAtIndex(*(cocos2d::CCArray **)(a1 + 696), v13);
v15 = v14;
if ( !*(_BYTE *)(a1 + 752) )
break;
if ( !*(_BYTE *)(a1 + 753) )
goto LABEL_33;
LABEL_43:
if ( !*((_BYTE *)v15 + 1028) )
*(_BYTE *)(a1 + 754) = 0;
++v13;
result = cocos2d::CCArray::count(*(cocos2d::CCArray **)(a1 + 696));
if ( v13 >= result )
return result;
}
v16 = *((_WORD *)v14 + 524);
if ( v16 )
v17 = v16 == 1;
else
v17 = *((_BYTE *)v15 + 1300);
if ( v17
|| *((_QWORD *)v15 + 112)
|| (v18 = *(_DWORD *)(*((_QWORD *)v15 + 138) + 4LL), v18 == 1004)
|| (v19 = 0, !v18) )
{
v19 = *((_QWORD *)v15 + 138);
}
*(_BYTE *)(a1 + 752) = v19 != 0;
LABEL_33:
if ( !*(_BYTE *)(a1 + 753) )
{
v20 = *((_WORD *)v15 + 524);
if ( v20 )
v21 = v20 == 1;
else
v21 = *((_BYTE *)v15 + 1300);
if ( v21
|| *((_QWORD *)v15 + 112)
|| (v22 = *((_QWORD *)v15 + 138), v23 = *(_DWORD *)(v22 + 4), v23 == 1004)
|| !v23 )
{
v22 = *((_QWORD *)v15 + 139);
}
*(_BYTE *)(a1 + 753) = v22 != 0;
}
goto LABEL_43;
}
v3 = *(_WORD *)(v2 + 1048);
if ( v3 )
v4 = v3 == 1;
else
v4 = *(_BYTE *)(v2 + 1300);
if ( v4 || *(_QWORD *)(v2 + 896) || (v5 = *(_DWORD *)(*(_QWORD *)(v2 + 1104) + 4LL), v5 == 1004) || !v5 )
v6 = *(_QWORD *)(v2 + 1104);
else
v6 = 0;
*(_BYTE *)(a1 + 752) = v6 != 0;
v7 = *(_WORD *)(v2 + 1048);
if ( v7 )
v8 = v7 == 1;
else
v8 = *(_BYTE *)(v2 + 1300);
if ( v8 || *(_QWORD *)(v2 + 896) || (v9 = *(_QWORD *)(v2 + 1104), v10 = *(_DWORD *)(v9 + 4), v10 == 1004) || !v10 )
v9 = *(_QWORD *)(v2 + 1112);
*(_BYTE *)(a1 + 753) = v9 != 0;
result = *(unsigned __int8 *)(v2 + 1028);
*(_BYTE *)(a1 + 754) = result;
return result;
}