//
// GJBaseGameLayer::updateObjectSection from 0x10011ec10 to 0x10011ed72 (354 bytes)
//
// 3 xrefs:
// > LevelEditorLayer::updateObjectSection @ 0x1000c56ba
// > ??> @ 0x100abb050
// > ??> @ 0x100ac5118
//
// 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:37 +0000
//
__int64 __fastcall GJBaseGameLayer::updateObjectSection(__int64 a1, __int64 a2)
{
__int64 result; // rax
double v3; // xmm1_8
double v4; // xmm0_8
int v5; // ecx
double v6; // xmm1_8
float v7; // xmm2_4
float v8; // xmm0_4
int v9; // eax
result = *(unsigned int *)(a2 + 628);
if ( (int)result < 0 )
return result;
v3 = *(double *)(a2 + 944);
v4 = 0.0;
if ( v3 <= 0.0 )
{
v5 = (int)0.0;
v6 = *(double *)(a2 + 952);
if ( v6 <= 0.0 )
goto LABEL_4;
LABEL_11:
v8 = *(float *)(a1 + 13636);
if ( v6 >= 10000000.0 )
{
v4 = (float)(v8 * 10000000.0);
if ( (_DWORD)result != v5 )
goto LABEL_15;
}
else
{
v4 = v6 * v8;
if ( (_DWORD)result != v5 )
goto LABEL_15;
}
LABEL_5:
result = (unsigned int)(int)v4;
if ( *(_DWORD *)(a2 + 632) == (_DWORD)result )
return result;
goto LABEL_15;
}
v7 = *(float *)(a1 + 13632);
if ( v3 >= 10000000.0 )
{
v5 = (int)(float)(v7 * 10000000.0);
v6 = *(double *)(a2 + 952);
if ( v6 > 0.0 )
goto LABEL_11;
}
else
{
v5 = (int)(v3 * v7);
v6 = *(double *)(a2 + 952);
if ( v6 > 0.0 )
goto LABEL_11;
}
LABEL_4:
if ( (_DWORD)result == v5 )
goto LABEL_5;
LABEL_15:
GJBaseGameLayer::removeObjectFromSection(a1, a2);
result = (*(__int64 (__fastcall **)(__int64, __int64, double))(*(_QWORD *)a1 + 1344LL))(a1, a2, v4);
if ( *(_BYTE *)(a2 + 773) == 1 )
{
v9 = *(_DWORD *)(a2 + 628);
if ( v9 > *(_DWORD *)(a1 + 12224)
|| v9 < *(_DWORD *)(a1 + 12220)
|| (result = *(unsigned int *)(a2 + 632), (int)result > *(_DWORD *)(a1 + 12232))
|| (int)result < *(_DWORD *)(a1 + 12228) )
{
result = cocos2d::CCDictionary::setObject_1(*(_QWORD *)(a1 + 3992), a2, *(unsigned int *)(a2 + 916));
*(_BYTE *)(a2 + 998) = 1;
}
}
return result;
}