//
// TableView::cellForTouch from 0x1006fe7e0 to 0x1006fe9b9 (473 bytes)
//
// 1 xrefs:
// > TableView::touchFinish @ 0x1006ffe28
//
// 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:35:57 +0000
//
__int64 __fastcall TableView::cellForTouch(__int64 a1, __int64 a2)
{
__int64 v3; // rax
__int64 v4; // rdi
unsigned int v5; // r15d
__int64 v6; // rax
__int64 v7; // r13
float *v8; // rax
__int64 v9; // rax
__int64 v10; // rax
double v12; // [rsp+Ch] [rbp-54h] BYREF
float v13[4]; // [rsp+14h] [rbp-4Ch] BYREF
unsigned __int64 v14; // [rsp+24h] [rbp-3Ch] BYREF
float v15; // [rsp+2Ch] [rbp-34h]
float v16; // [rsp+30h] [rbp-30h]
float v17; // [rsp+34h] [rbp-2Ch]
cocos2d::CCTouch::getLocationInView((__int64)&v14, a2);
v3 = cocos2d::CCDirector::sharedDirector();
cocos2d::CCDirector::convertToGL(v13, v3, &v14);
sub_100278300(&v14, v13);
v4 = *(_QWORD *)(a1 + 592);
if ( !v4 || !(unsigned int)sub_1007FEF90(v4) || !(unsigned int)sub_1007FEF90(*(_QWORD *)(a1 + 592)) )
return 0;
v5 = 0;
while ( 1 )
{
v6 = sub_1007FEFE0(*(_QWORD *)(a1 + 592), v5);
if ( v6 )
{
v7 = v6;
cocos2d::CCNode::convertToNodeSpace(&v12, v6, (unsigned int *)&v14);
v15 = *(float *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v7 + 192LL))(v7);
v17 = *(float *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v7 + 328LL))(v7);
v8 = (float *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v7 + 304LL))(v7);
v15 = v15 - (float)(v17 * *v8);
v17 = *(float *)((*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v7 + 192LL))(v7) + 4);
v16 = *(float *)((*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v7 + 328LL))(v7) + 4);
v9 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v7 + 304LL))(v7);
v17 = v17 - (float)(v16 * *(float *)(v9 + 4));
v16 = *(float *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v7 + 328LL))(v7);
v10 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v7 + 328LL))(v7);
sub_100278270((__int64)v13, v15, v17, (__m128)LODWORD(v16), (__m128)*(unsigned int *)(v10 + 4));
sub_100278300(v13, &qword_100BE6598);
if ( sub_100278940(v13, (float *)&v12) )
break;
}
if ( ++v5 >= (unsigned int)sub_1007FEF90(*(_QWORD *)(a1 + 592)) )
return 0;
}
return v7;
}