//
// TableView::checkLastCell from 0x1400895e0 to 0x140089a96 (1206 bytes)
//
// 3 xrefs:
// > TableView::checkBoundaryOfContent @ 0x140088e50
// > TableView::checkBoundaryOfContent @ 0x140088ea3
// > ??> @ 0x140912698
//
// 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:25:58 +0000
//
// Hidden C++ exception states: #wind=1
void __fastcall TableView::checkLastCell(_QWORD *a1, _DWORD *a2)
{
const struct cocos2d::CCPoint *v4; // rax
__int64 v5; // rax
float v6; // xmm6_4
int v7; // ebx
int v8; // edi
cocos2d::CCObject *v9; // r14
double v10; // xmm0_8
float v11; // xmm8_4
struct cocos2d::CCObject *v12; // r13
float v13; // xmm6_4
float *v14; // rax
float v15; // xmm7_4
struct cocos2d::CCObject *v16; // r15
const struct cocos2d::CCSize *v17; // rax
__int64 v18; // rdi
__int64 v19; // rbx
__int64 v20; // rax
__int64 v21; // rax
signed int i; // ebp
struct cocos2d::CCObject *v23; // rdi
float v24; // xmm6_4
float *v25; // rax
__int64 v26; // rax
float v27; // xmm6_4
float *v28; // rax
__int64 v29; // rax
cocos2d::CCObject **v30; // rcx
__int64 v31; // rbx
float v32; // xmm6_4
float *v33; // rax
__int64 v34; // rbx
__int64 v35; // rax
__int64 v36; // rbx
float *v37; // rax
__int64 v38; // rax
__int64 v39; // rcx
__int64 v40; // rcx
_BYTE v41[4]; // [rsp+20h] [rbp-A8h] BYREF
float v42; // [rsp+24h] [rbp-A4h]
char v43[4]; // [rsp+28h] [rbp-A0h] BYREF
float v44; // [rsp+2Ch] [rbp-9Ch]
char v45[8]; // [rsp+30h] [rbp-98h] BYREF
char v46[8]; // [rsp+38h] [rbp-90h] BYREF
char v47[48]; // [rsp+40h] [rbp-88h] BYREF
cocos2d::CCObject *v48; // [rsp+E0h] [rbp+18h] BYREF
float v49; // [rsp+E8h] [rbp+20h] BYREF
float v50; // [rsp+ECh] [rbp+24h]
if ( (unsigned int)TableView::checkBoundaryOfCell_1(a1, (__int64)a2) != 1 )
{
v4 = (const struct cocos2d::CCPoint *)(*(__int64 (__fastcall **)(_DWORD *))(*(_QWORD *)a2 + 200LL))(a2);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v43, v4);
v5 = (*(__int64 (__fastcall **)(_QWORD))(*(_QWORD *)a1[60] + 320LL))(a1[60]);
v6 = v44 - *(float *)(v5 + 4);
if ( (float)(v6 + *(float *)((*(__int64 (__fastcall **)(_QWORD))(*(_QWORD *)a1[60] + 200LL))(a1[60]) + 4)) > 0.0 )
{
v7 = a2[120] + 1;
v8 = a2[121];
v9 = (cocos2d::CCObject *)operator new(0x40u);
v48 = v9;
cocos2d::CCObject::CCObject(v9);
*(_QWORD *)v9 = &CCIndexPath::`vftable';
*((_DWORD *)v9 + 14) = v7;
*((_DWORD *)v9 + 15) = v8;
cocos2d::CCObject::autorelease(v9);
if ( *((_DWORD *)v9 + 14) < (**(int (__fastcall ***)(_QWORD, _QWORD, _QWORD *))a1[77])(
a1[77],
(unsigned int)a2[121],
a1)
&& !TableView::isDuplicateInVisibleCellArray((__int64)a1, (__int64)v9) )
{
v10 = (*(double (__fastcall **)(_QWORD, cocos2d::CCObject *, _QWORD *))(*(_QWORD *)a1[76] + 40LL))(
a1[76],
v9,
a1);
v11 = *(float *)&v10;
v12 = (struct cocos2d::CCObject *)(*(__int64 (__fastcall **)(_QWORD, cocos2d::CCObject *, _QWORD *))(*(_QWORD *)a1[77] + 24LL))(
a1[77],
v9,
a1);
v13 = *(float *)((*(__int64 (__fastcall **)(_DWORD *))(*(_QWORD *)a2 + 200LL))(a2) + 4) - *(float *)&v10;
v14 = (float *)(*(__int64 (__fastcall **)(_QWORD *))(*a1 + 320LL))(a1);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v41, (float)-*v14 * 0.5, v13);
v15 = v42;
v16 = nullptr;
if ( v42 < 0.0 && !TableView::isDuplicateIndexPath((__int64)a1, (__int64)v9) )
{
v17 = (const struct cocos2d::CCSize *)(*(__int64 (__fastcall **)(_QWORD))(*(_QWORD *)a1[60] + 320LL))(a1[60]);
cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v49, v17);
v18 = *(_QWORD *)a1[60];
v19 = a1[60];
cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v48, v49, v50 - v15);
(*(void (__fastcall **)(__int64, __int64))(v18 + 312))(v19, v20);
v21 = (*(__int64 (__fastcall **)(_QWORD))(*(_QWORD *)a1[60] + 320LL))(a1[60]);
cocos2d::CCSize::operator=(&v49, v21);
for ( i = cocos2d::CCArray::count((cocos2d::CCArray *)a1[73]) - 1; i >= 0; --i )
{
v23 = cocos2d::CCArray::objectAtIndex((cocos2d::CCArray *)a1[73], i);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v48);
if ( i == cocos2d::CCArray::count((cocos2d::CCArray *)a1[73]) - 1 )
{
v24 = *(float *)((*(__int64 (__fastcall **)(_DWORD *))(*(_QWORD *)a2 + 200LL))(a2) + 4) - v15;
v25 = (float *)(*(__int64 (__fastcall **)(struct cocos2d::CCObject *))(*(_QWORD *)v23 + 200LL))(v23);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v45, *v25, v24);
cocos2d::CCPoint::operator=(&v48, v26);
v27 = *((float *)&v48 + 1) - v11;
v28 = (float *)(*(__int64 (__fastcall **)(struct cocos2d::CCObject *))(*(_QWORD *)v23 + 200LL))(v23);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v46, *v28, v27);
v30 = (cocos2d::CCObject **)v41;
}
else
{
v31 = (*(__int64 (__fastcall **)(struct cocos2d::CCObject *))(*(_QWORD *)v16 + 320LL))(v16);
v32 = *(float *)(v31 + 4)
+ *(float *)((*(__int64 (__fastcall **)(struct cocos2d::CCObject *))(*(_QWORD *)v16 + 200LL))(v16) + 4);
v33 = (float *)(*(__int64 (__fastcall **)(struct cocos2d::CCObject *))(*(_QWORD *)v23 + 200LL))(v23);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v47, *v33, v32);
v30 = &v48;
}
cocos2d::CCPoint::operator=(v30, v29);
(*(void (__fastcall **)(struct cocos2d::CCObject *, cocos2d::CCObject **))(*(_QWORD *)v23 + 184LL))(
v23,
&v48);
v16 = v23;
}
}
if ( v12 )
{
v34 = *(_QWORD *)v12;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v48, 0.0, 1.0);
(*(void (__fastcall **)(struct cocos2d::CCObject *, __int64))(v34 + 288))(v12, v35);
v36 = *(_QWORD *)v12;
v37 = (float *)(*(__int64 (__fastcall **)(_QWORD *))(*a1 + 320LL))(a1);
cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v48, *v37, v11);
(*(void (__fastcall **)(struct cocos2d::CCObject *, __int64))(v36 + 312))(v12, v38);
(*(void (__fastcall **)(struct cocos2d::CCObject *, _BYTE *))(*(_QWORD *)v12 + 184LL))(v12, v41);
cocos2d::CCObject::operator=((char *)v12 + 424, v9);
*((_DWORD *)v12 + 120) = *((_DWORD *)v9 + 14);
*((_DWORD *)v12 + 121) = *((_DWORD *)v9 + 15);
cocos2d::CCArray::addObject((cocos2d::CCArray *)a1[73], v12);
if ( !TableView::isDuplicateIndexPath((__int64)a1, (__int64)v9) )
cocos2d::CCArray::addObject((cocos2d::CCArray *)a1[75], v9);
v39 = a1[76];
if ( v39 )
(*(void (__fastcall **)(__int64, cocos2d::CCObject *, struct cocos2d::CCObject *, _QWORD *))(*(_QWORD *)v39 + 16LL))(
v39,
v9,
v12,
a1);
(*(void (__fastcall **)(_QWORD, struct cocos2d::CCObject *))(*(_QWORD *)a1[60] + 464LL))(a1[60], v12);
v40 = a1[76];
if ( v40 )
(*(void (__fastcall **)(__int64, cocos2d::CCObject *, struct cocos2d::CCObject *, _QWORD *))(*(_QWORD *)v40 + 24LL))(
v40,
v9,
v12,
a1);
}
}
}
}
}