//
// sub_1403BCDF0 from 0x1403bcdf0 to 0x1403bd033 (579 bytes)
//
// 2 xrefs:
// > sub_1403B54D0 @ 0x1403b5b3f
// > ??> @ 0x1406d7340
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
// Hidden C++ exception states: #wind=2
void __fastcall sub_1403BCDF0(void ****a1, __int64 *a2, __int64 *a3)
{
void **v6; // r14
void **v7; // rsi
__int64 v8; // r15
void ***v9; // r14
__int64 v10; // rcx
void ***v11; // r13
__int64 *i; // rbx
void *v13; // rsi
void ***v14; // rax
__int64 v15; // rbp
void **v16; // rbx
void **v17; // rcx
void **v18; // rax
v6 = (void **)*a1;
v7 = **a1;
if ( v7 == (void **)*a1 )
{
LABEL_4:
v8 = 0;
if ( a2 == a3 )
{
v9 = nullptr;
v11 = nullptr;
}
else
{
v9 = (void ***)operator new(0x48u);
sub_1403BE360(v10, v9 + 2, a2 + 2);
v11 = v9;
v8 = 1;
for ( i = (__int64 *)*a2; i != a3; i = (__int64 *)*i )
{
v13 = operator new(0x48u);
*((_DWORD *)v13 + 4) = *((_DWORD *)i + 4);
*((_QWORD *)v13 + 3) = i[3];
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v13 + 4);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v13 + 5);
*((_DWORD *)v13 + 12) = *((_DWORD *)i + 12);
*((_DWORD *)v13 + 13) = *((_DWORD *)i + 13);
*((_DWORD *)v13 + 14) = *((_DWORD *)i + 14);
*((_DWORD *)v13 + 15) = *((_DWORD *)i + 15);
*((_DWORD *)v13 + 16) = *((_DWORD *)i + 16);
*v11 = (void **)v13;
*((_QWORD *)v13 + 1) = v11;
v11 = (void ***)v13;
++v8;
}
}
v17 = (void **)*a1;
if ( v8 )
{
v18 = (void **)v17[1];
v9[1] = v18;
*v18 = v9;
*v11 = v17;
v17[1] = v11;
a1[1] = (void ***)((char *)a1[1] + v8);
}
}
else
{
while ( a2 != a3 )
{
*((_DWORD *)v7 + 4) = *((_DWORD *)a2 + 4);
v7[3] = (void *)a2[3];
cocos2d::CCPoint::operator=(v7 + 4, a2 + 4);
cocos2d::CCPoint::operator=(v7 + 5, a2 + 5);
*((_DWORD *)v7 + 12) = *((_DWORD *)a2 + 12);
*((_DWORD *)v7 + 13) = *((_DWORD *)a2 + 13);
*((_DWORD *)v7 + 14) = *((_DWORD *)a2 + 14);
*((_DWORD *)v7 + 15) = *((_DWORD *)a2 + 15);
*((_DWORD *)v7 + 16) = *((_DWORD *)a2 + 16);
v7 = (void **)*v7;
a2 = (__int64 *)*a2;
if ( v7 == v6 )
goto LABEL_4;
}
if ( v7 != v6 )
{
v14 = (void ***)v7[1];
*v14 = v6;
v6[1] = v14;
v15 = 0;
do
{
v16 = (void **)*v7;
j_j_free(v7);
v7 = v16;
++v15;
}
while ( v16 != v6 );
a1[1] = (void ***)((char *)a1[1] - v15);
}
}
}