//
// GJBaseGameLayer::positionUIObjects from 0x10027be44 to 0x10027c208 (964 bytes)
//
// 1 xrefs:
// > GJBaseGameLayer::updateSpecialGroupData @ 0x10027a240
//
// 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 11:01:53 +0000
//
void __fastcall GJBaseGameLayer::positionUIObjects(__int64 a1)
{
__int64 v2; // x0
float *v3; // x0
__int64 v4; // kr00_8
__int64 v5; // x8
unsigned int *v6; // x9
__int64 v7; // x8
float v8; // s10
__int64 *v9; // x24
unsigned __int64 v10; // x25
float v11; // s11
__int64 v12; // x27
__int64 Group; // x21
__int64 v14; // x22
__int64 MainObject; // x23
__n128 v16; // q0
__int64 v17; // x20
unsigned int *v19; // x9
__int64 v20; // x8
_QWORD *v21; // x28
unsigned __int64 v22; // x26
_BYTE *v23; // x23
int v24; // w10
int v25; // w9
int v26; // w8
bool v27; // zf
float v28; // s2
float v29; // s2
float v30; // s2
float v31; // s0
float v32; // s0
float v33; // s0
double v34; // d0
unsigned int *v35; // x9
__int64 v36; // x8
_QWORD *v37; // x20
unsigned __int64 v38; // x25
_BYTE *v39; // x23
double v40; // d0
unsigned __int64 v41; // [xsp+0h] [xbp-C0h]
__int64 v42; // [xsp+8h] [xbp-B8h]
float32x2_t v43; // [xsp+10h] [xbp-B0h] BYREF
float32x2_t v44; // [xsp+18h] [xbp-A8h] BYREF
float32x2_t v45; // [xsp+20h] [xbp-A0h] BYREF
float32x2_t v46; // [xsp+28h] [xbp-98h] BYREF
float32x2_t v47; // [xsp+30h] [xbp-90h] BYREF
__int64 v48; // [xsp+38h] [xbp-88h] BYREF
float v49; // [xsp+40h] [xbp-80h] BYREF
__int64 v50; // [xsp+48h] [xbp-78h] BYREF
v2 = cocos2d::CCDirector::sharedDirector();
cocos2d::CCDirector::getWinSize(v2, &v50);
v3 = sub_1000262BC(&v49, *(float *)&v50 * 0.5, *((float *)&v50 + 1) * 0.5);
v4 = v50;
v42 = sub_1002E736C(v3);
v5 = *(_QWORD *)(a1 + 3280);
if ( v5 )
{
v6 = *(unsigned int **)(v5 + 56);
v7 = *v6;
if ( (_DWORD)v7 )
{
v8 = (float)(*(float *)&v4 * 0.5) / 240.0;
v9 = *((__int64 **)v6 + 2);
v10 = (unsigned __int64)&v9[v7 - 1];
v11 = (float)(*((float *)&v4 + 1) * 0.5) / 160.0;
v41 = v10;
do
{
v12 = *v9;
if ( !*v9 )
return;
if ( *(_DWORD *)(v12 + 1028) == 3613 )
{
Group = GJBaseGameLayer::getGroup(a1, *(unsigned int *)(v12 + 1464));
v14 = sub_10028E320(a1, *(unsigned int *)(v12 + 1464));
MainObject = GJBaseGameLayer::tryGetMainObject(a1);
v17 = Group;
if ( v14 )
{
v17 = v42;
sub_1002E7674(v42);
v16 = sub_1002E74E0(v42, v14);
}
if ( MainObject && v17 != 0 )
{
(*(void (__fastcall **)(__int64 *__return_ptr, __int64, __n128))(*(_QWORD *)MainObject + 1816LL))(
&v48,
MainObject,
v16);
v19 = *(unsigned int **)(v17 + 56);
v20 = *v19;
if ( (_DWORD)v20 )
{
v21 = *((_QWORD **)v19 + 2);
v22 = (unsigned __int64)&v21[v20 - 1];
while ( 1 )
{
v23 = (_BYTE *)*v21;
if ( !*v21 )
goto LABEL_66;
if ( (v23[1345] & 1) == 0 )
break;
LABEL_16:
if ( (unsigned __int64)++v21 > v22 )
goto LABEL_66;
}
GJBaseGameLayer::addUIObject(a1, *v21);
(*(void (__fastcall **)(float32x2_t *__return_ptr, _BYTE *))(*(_QWORD *)v23 + 1816LL))(&v47, v23);
sub_1000262F4(&v46, (double *)&v47);
v24 = *(_DWORD *)(v12 + 1844);
if ( v47.f32[0] >= *(float *)&v48 )
v25 = 4;
else
v25 = 3;
if ( *(_DWORD *)(v12 + 1840) >= 2u )
v25 = *(_DWORD *)(v12 + 1840);
if ( v47.f32[1] >= *((float *)&v48 + 1) )
v26 = 8;
else
v26 = 7;
if ( v24 )
v27 = v24 == 5;
else
v27 = 1;
if ( !v27 )
v26 = *(_DWORD *)(v12 + 1844);
switch ( v25 )
{
case 4:
v30 = v47.f32[0] - (float)(*(float *)&v48 + 240.0);
if ( *(_BYTE *)(v12 + 1848) )
v30 = v8 * v30;
v29 = *(float *)&v50 + v30;
break;
case 3:
v29 = v47.f32[0] - (float)(*(float *)&v48 + -240.0);
if ( *(_BYTE *)(v12 + 1848) )
v29 = v8 * v29;
break;
case 2:
v28 = v47.f32[0] - *(float *)&v48;
if ( *(_BYTE *)(v12 + 1848) )
v28 = v8 * v28;
v29 = (float)(*(float *)&v4 * 0.5) + v28;
break;
default:
LABEL_44:
switch ( v26 )
{
case 8:
v33 = v47.f32[1] - (float)(*((float *)&v48 + 1) + 160.0);
if ( *(_BYTE *)(v12 + 1849) )
v33 = v11 * v33;
v32 = *((float *)&v50 + 1) + v33;
break;
case 7:
v32 = v47.f32[1] - (float)(*((float *)&v48 + 1) + -160.0);
if ( *(_BYTE *)(v12 + 1849) )
v32 = v11 * v32;
break;
case 6:
v31 = v47.f32[1] - *((float *)&v48 + 1);
if ( *(_BYTE *)(v12 + 1849) )
v31 = v11 * v31;
v32 = (float)(*((float *)&v4 + 1) * 0.5) + v31;
break;
default:
LABEL_57:
v34 = sub_1000262F4(&v45, (double *)&v46);
(*(void (__fastcall **)(_BYTE *, float32x2_t *, double))(*(_QWORD *)v23 + 1368LL))(v23, &v45, v34);
if ( v23 == (_BYTE *)v14 )
{
if ( Group )
{
sub_10002632C(&v46, &v47, &v45);
v35 = *(unsigned int **)(Group + 56);
v36 = *v35;
if ( (_DWORD)v36 )
{
v37 = *((_QWORD **)v35 + 2);
v38 = (unsigned __int64)&v37[v36 - 1];
do
{
v39 = (_BYTE *)*v37;
if ( !*v37 )
break;
if ( (v39[1345] & 1) == 0 )
{
GJBaseGameLayer::addUIObject(a1, *v37);
(*(void (__fastcall **)(float32x2_t *__return_ptr, _BYTE *))(*(_QWORD *)v39 + 1816LL))(
&v43,
v39);
*(float32x2_t *)&v40 = sub_100026318(&v43, &v45, &v44);
(*(void (__fastcall **)(_BYTE *, float32x2_t *, double))(*(_QWORD *)v39 + 1368LL))(
v39,
&v44,
v40);
}
++v37;
}
while ( (unsigned __int64)v37 <= v38 );
}
}
}
goto LABEL_16;
}
v46.f32[1] = v32;
goto LABEL_57;
}
v46.f32[0] = v29;
goto LABEL_44;
}
LABEL_66:
v10 = v41;
}
}
++v9;
}
while ( (unsigned __int64)v9 <= v10 );
}
}
}