//
// GJBaseGameLayer::processAreaRotateGroupAction from 0x9b580c to 0x9b5f9c (1936 bytes)
//
// 2 xrefs:
// > GJBaseGameLayer::processAreaEffects @ 0x9d72bc
// > ??> @ 0xc1870
//
// 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 12:58:23 +0000
//
__int64 __fastcall GJBaseGameLayer::processAreaRotateGroupAction(
__int64 a1,
cocos2d::CCArray *a2,
__int64 a3,
float *a4,
int a5,
int a6,
int a7,
int a8,
int a9,
char a10,
unsigned __int8 a11)
{
int v14; // w0
unsigned int *v15; // x2
__int64 *v16; // x27
__int64 v17; // x1
char *v18; // x20
__int64 v19; // x28
int v20; // w25
int v21; // w19
int v22; // w0
int v23; // w21
long double v24; // q0
__int64 v25; // x2
int v26; // w0
float v27; // s2
float v28; // s1
float v29; // s3
float v30; // s2
const cocos2d::CCPoint *v31; // x2
float v32; // s2
bool v33; // nf
_BOOL4 v34; // w1
float v35; // s3
float v36; // s2
float v37; // s3
float v38; // s1
bool v39; // nf
int v40; // w19
int v41; // w1
float v43; // s11
float v44; // s11
int v45; // w0
int v46; // w0
int v47; // w1
float v48; // s1
float v49; // s0
float v50; // s0
double v51; // d1
float v52; // s0
double v53; // d1
float v54; // s0
float v55; // s5
float v56; // s4
float v57; // s2
float v58; // s0
float v59; // s1
float v60; // s2
float v61; // s4
float v62; // s1
float v63; // s0
int v64; // w2
int v65; // w1
__int64 *v66; // x3
float v67; // s4
float v68; // s3
float v69; // s2
float v70; // s1
float v71; // s0
float v72; // s0
float v73; // s1
int v74; // w3
_DWORD *v75; // x6
_BOOL4 v76; // w0
float v77; // s2
float v78; // s1
int v79; // w1
GameObject *TargetGroupOrigin; // [xsp+88h] [xbp+88h]
cocos2d::CCArray *TargetGroup; // [xsp+90h] [xbp+90h]
__int64 v87; // [xsp+B8h] [xbp+B8h]
__int64 v88; // [xsp+C0h] [xbp+C0h] BYREF
float v89; // [xsp+C8h] [xbp+C8h] BYREF
float v90; // [xsp+CCh] [xbp+CCh]
char v91[8]; // [xsp+D0h] [xbp+D0h] BYREF
v14 = cocos2d::CCArray::count(a2) + *(_DWORD *)(a1 + 13716);
*(_DWORD *)(a1 + 13716) = v14;
if ( !a2
|| (v15 = *((unsigned int **)a2 + 7), !*v15)
|| (v16 = *((__int64 **)v15 + 2), v17 = 8LL * *v15 - 8,
v18 = (char *)v16 + v17,
v16 > (__int64 *)((char *)v16 + v17))
|| (v19 = *v16) == 0 )
{
v40 = 0;
v20 = 0;
goto LABEL_33;
}
v20 = 0;
v21 = 0;
v87 = 4LL * a9;
do
{
if ( *(_BYTE *)(v19 + 773) )
{
v22 = *(_DWORD *)(a1 + 944);
++v21;
if ( *(_DWORD *)(v19 + 1240) >= v22 )
goto LABEL_8;
}
else
{
v45 = *(_DWORD *)(v19 + 628);
if ( v45 > a6 )
goto LABEL_29;
if ( v45 < a5 )
goto LABEL_29;
v46 = *(_DWORD *)(v19 + 632);
if ( v46 > a8 || v46 < a7 )
goto LABEL_29;
v22 = *(_DWORD *)(a1 + 944);
++v21;
if ( *(_DWORD *)(v19 + 1240) >= v22 )
{
LABEL_8:
v23 = 0;
goto LABEL_9;
}
}
if ( !*(_BYTE *)(v19 + 1290) )
{
v47 = *(_DWORD *)(v19 + 1236);
if ( v22 != v47 )
{
v48 = *(double *)(v19 + 944);
v49 = *(double *)(v19 + 952);
*(float *)(v19 + 1224) = v48;
*(float *)(v19 + 1228) = v49;
*(_DWORD *)(v19 + 1236) = *(_DWORD *)(a1 + 944);
GameObject::dirtifyObjectRect(v19);
v47 = *(_DWORD *)(a1 + 944);
}
if ( *(_DWORD *)(v19 + 1244) != v47 )
{
*(_QWORD *)(v19 + 988) = *(_QWORD *)(v19 + 1152);
*(_DWORD *)(v19 + 1244) = *(_DWORD *)(a1 + 944);
GameObject::dirtifyObjectRect(v19);
}
}
v50 = *(float *)(v19 + 668);
v23 = 0;
if ( v50 != 0.0 )
{
v51 = *(double *)(v19 + 944);
*(_BYTE *)(v19 + 842) = 1;
v23 = 1;
*(_DWORD *)(v19 + 668) = 0;
*(double *)(v19 + 944) = v51 - v50;
}
v52 = *(float *)(v19 + 672);
if ( v52 != 0.0 )
{
v53 = *(double *)(v19 + 952);
*(_BYTE *)(v19 + 842) = 1;
v23 = 1;
*(_DWORD *)(v19 + 672) = 0;
*(double *)(v19 + 952) = v53 - v52;
}
v54 = *(float *)(v19 + 700);
v55 = *(float *)(v19 + 704);
if ( v54 != 0.0 || v55 != 0.0 )
{
v56 = *(float *)(v19 + 692) - v54;
v57 = *(float *)(v19 + 696) - v55;
v58 = *(float *)(v19 + 1152) - v54;
v59 = *(float *)(v19 + 1156) - v55;
*(float *)(v19 + 692) = v56;
*(_DWORD *)(v19 + 700) = 0;
*(float *)(v19 + 1152) = v58;
*(float *)(v19 + 696) = v57;
*(float *)(v19 + 1156) = v59;
*(_DWORD *)(v19 + 704) = 0;
}
v60 = *(float *)(v19 + 680);
v61 = *(float *)(v19 + 688);
if ( v60 != 0.0 || v61 != 0.0 )
{
v62 = *(float *)(v19 + 676) - v60;
v63 = *(float *)(v19 + 684) - v61;
*(_DWORD *)(v19 + 680) = 0;
*(float *)(v19 + 676) = v62;
*(float *)(v19 + 684) = v63;
*(_DWORD *)(v19 + 688) = 0;
}
*(_DWORD *)(v19 + 1240) = *(_DWORD *)(a1 + 944);
v88 = v19;
v64 = *(_DWORD *)(a1 + 3584);
v65 = *(_DWORD *)(a1 + 3564);
if ( v64 > v65 )
{
*(_QWORD *)(*(_QWORD *)(a1 + 3400) + 8LL * v65) = v19;
v65 = *(_DWORD *)(a1 + 3564);
}
else
{
v66 = *(__int64 **)(a1 + 3408);
if ( v66 == *(__int64 **)(a1 + 3416) )
{
std::vector::__push_back_slow_path(a1 + 3400, &v88);
v64 = *(_DWORD *)(a1 + 3584);
v65 = *(_DWORD *)(a1 + 3564);
}
else
{
if ( v66 )
{
*v66 = v19;
v66 = *(__int64 **)(a1 + 3408);
v64 = *(_DWORD *)(a1 + 3584);
v65 = *(_DWORD *)(a1 + 3564);
}
*(_QWORD *)(a1 + 3408) = v66 + 1;
}
*(_DWORD *)(a1 + 3584) = v64 + 1;
}
*(_DWORD *)(a1 + 3564) = v65 + 1;
LABEL_9:
(*(void (__fastcall **)(__int64))(*(_QWORD *)v19 + 1360LL))(v19);
v25 = *(_QWORD *)(a3 + 168);
v26 = *(_DWORD *)(v25 + 1968);
if ( v26 == 1 )
{
v67 = *(float *)(a3 + 36);
v68 = v89;
v69 = *a4;
v70 = 0.0;
v71 = v89 - *a4;
if ( v67 == 0.0 )
goto LABEL_77;
goto LABEL_76;
}
if ( v26 == 2 )
{
v67 = *(float *)(a3 + 36);
v68 = v90;
v69 = a4[1];
v71 = v90 - v69;
if ( v67 == 0.0 )
{
v72 = v71 + 0.0;
if ( v72 < 0.0 )
goto LABEL_84;
goto LABEL_78;
}
LABEL_76:
v70 = v67 * *(float *)(a1 + 4LL * (*(__int16 *)(v19 + 1004) + 1) + 4108);
LABEL_77:
v72 = v71 + v70;
if ( v72 < 0.0 )
{
LABEL_84:
v73 = *(float *)(a3 + 48);
LABEL_79:
*(float *)&v24 = v72 * v73;
v33 = v68 < v69;
if ( *(_BYTE *)(a3 + 176) )
{
v34 = v68 <= v69;
goto LABEL_20;
}
goto LABEL_17;
}
LABEL_78:
v73 = *(float *)(a3 + 52);
goto LABEL_79;
}
v27 = *(float *)(a3 + 36);
v28 = 0.0;
if ( v27 != 0.0 )
v28 = v27 * *(float *)(a1 + 4LL * (*(__int16 *)(v19 + 1004) + 1) + 4108);
v29 = *(float *)(a3 + 44);
v30 = 0.0;
if ( v29 != 0.0 )
v30 = v29 * *(float *)(a1 + 4LL * (*(__int16 *)(v19 + 1004) + 2) + 4108);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v91, *a4 + v28, a4[1] + v30);
cocos2d::ccpDistance((cocos2d *)&v89, (const cocos2d::CCPoint *)v91, v31);
v32 = *a4;
v25 = *(_QWORD *)(a3 + 168);
if ( !*(_BYTE *)(a3 + 176) )
{
v34 = v32 <= v90;
goto LABEL_20;
}
v33 = v32 < v89;
LABEL_17:
v34 = !v33;
LABEL_20:
v35 = *(float *)(a3 + 28);
v36 = 0.0;
if ( v35 != 0.0 )
v36 = v35 * *(float *)(a1 + 4LL * *(__int16 *)(v19 + 1004) + 4108);
v37 = *(float *)(a3 + 56);
v38 = (float)(int)(float)(*(float *)(a3 + 24) + v36);
if ( v37 == 0.0 )
{
*(float *)&v24 = *(float *)&v24 / v38;
v39 = *(float *)&v24 < 1.0;
if ( *(float *)&v24 < 1.0 )
goto LABEL_24;
}
else
{
*(float *)&v24 = (float)((float)(*(float *)&v24 / v38) - v37) / (float)(1.0 - v37);
v39 = *(float *)&v24 < 1.0;
if ( *(float *)&v24 < 1.0 )
{
LABEL_24:
if ( *(float *)&v24 > 0.0 )
{
if ( *(_BYTE *)(v25 + 2012) )
*(float *)&v24 = 1.0 - *(float *)&v24;
}
else
{
if ( !*(_BYTE *)(v25 + 2012) )
{
LODWORD(v24) = 0;
goto LABEL_35;
}
LODWORD(v24) = 1.0;
}
goto LABEL_27;
}
}
if ( v39 )
{
if ( !*(_BYTE *)(v25 + 2012) )
goto LABEL_35;
*(float *)&v24 = 1.0 - *(float *)&v24;
}
else
{
LODWORD(v24) = 0;
if ( !*(_BYTE *)(v25 + 2012) )
goto LABEL_28;
}
LABEL_27:
if ( *(float *)&v24 >= 1.0 )
goto LABEL_28;
LABEL_35:
v43 = *(float *)(a3 + 112)
+ (float)(*(float *)(a3 + 116) * *(float *)(a1 + 4LL * (*(__int16 *)(v19 + 1004) + 18) + 4108));
if ( v43 == 0.0 )
{
if ( !a10 )
goto LABEL_28;
v44 = 0.0;
}
else
{
if ( !*(_BYTE *)(v25 + 1973) )
goto LABEL_98;
if ( *(float *)&v24 > 0.01 && *(float *)&v24 < 0.99 )
{
v74 = *(_DWORD *)(a3 + 192);
v75 = (_DWORD *)(*(_QWORD *)(a3 + 208) + v87);
if ( *v75 == v74 - 2 )
{
v76 = 0;
v34 = 0;
}
else
{
if ( *v75 == v74 - 1 )
v34 = 1;
v76 = v34;
}
*v75 = v74 + v76;
}
if ( v34 )
LABEL_98:
*(float *)&v24 = GJBaseGameLayer::getEnterEasingValue(
(GJBaseGameLayer *)a1,
*(float *)&v24,
*(_DWORD *)(v25 + 1920),
*(float *)(v25 + 1924),
*(_DWORD *)(v25 + 1928));
else
*(float *)&v24 = GJBaseGameLayer::getEnterEasingValue(
(GJBaseGameLayer *)a1,
*(float *)&v24,
*(_DWORD *)(v25 + 1932),
*(float *)(v25 + 1936),
*(_DWORD *)(v25 + 1940));
*(float *)&v24 = 1.0 - *(float *)&v24;
v44 = *(float *)&v24 * v43;
if ( !a10 )
{
if ( v44 != 0.0 )
{
v77 = *(float *)(v19 + 680) + v44;
v78 = *(float *)(v19 + 684) + v44;
*(float *)&v24 = *(float *)(v19 + 688) + v44;
*(float *)(v19 + 676) = *(float *)(v19 + 676) + v44;
*(float *)(v19 + 680) = v77;
*(float *)(v19 + 684) = v78;
*(_DWORD *)(v19 + 688) = LODWORD(v24);
if ( a11 )
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v19 + 1480LL))(v19, 0.0);
if ( *(_DWORD *)(v19 + 920) != 7 )
{
v79 = *(unsigned __int8 *)(v19 + 744);
*(_BYTE *)(v19 + 864) = 1;
*(_BYTE *)(v19 + 865) = 1;
if ( !v79 )
GameObject::calculateOrientedBox((GameObject *)v19);
}
}
LABEL_28:
if ( v23 )
goto LABEL_41;
goto LABEL_29;
}
}
TargetGroup = (cocos2d::CCArray *)GJBaseGameLayer::getTargetGroup(
(cocos2d::CCArray **)a1,
*(_DWORD *)(a3 + 200),
*(_DWORD *)(v19 + 916));
TargetGroupOrigin = (GameObject *)GJBaseGameLayer::getTargetGroupOrigin(
(cocos2d::CCArray **)a1,
*(_DWORD *)(a3 + 200),
*(_DWORD *)(v19 + 916));
v20 = v20 - 1 + cocos2d::CCArray::count(TargetGroup);
if ( *(_BYTE *)(*(_QWORD *)(a3 + 168) + 2021LL) )
*(_BYTE *)(v19 + 1304) = 1;
GJBaseGameLayer::rotateAreaObjects((GJBaseGameLayer *)a1, TargetGroupOrigin, TargetGroup, v44, a11);
*(_BYTE *)(v19 + 1304) = 0;
if ( v23 )
LABEL_41:
(*(void (__fastcall **)(__int64, __int64, long double))(*(_QWORD *)a1 + 1368LL))(a1, v19, v24);
LABEL_29:
if ( v18 < (char *)++v16 )
break;
v19 = *v16;
v87 += 4;
}
while ( *v16 );
v14 = *(_DWORD *)(a1 + 13716);
v40 = v21 + v20;
LABEL_33:
v41 = *(_DWORD *)(a1 + 13732);
*(_DWORD *)(a1 + 13716) = v20 + v14;
*(_DWORD *)(a1 + 13732) = v41 + v40;
return _stack_chk_guard;
}