//
// ScrollableContentLayer::scrollWheel from 0x140081ed0 to 0x14008203e (366 bytes)
//
// 2 xrefs:
// > ??> @ 0x140712420
// > ??> @ 0x1409121dc
//
// 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:55 +0000
//
char __fastcall ScrollableContentLayer::scrollWheel(__int64 a1, float a2)
{
cocos2d::CCNode *v2; // rsi
__int64 v4; // rdx
__int64 v5; // rcx
__int64 v6; // rbx
__int64 v7; // r8
__int64 v8; // r9
float v9; // xmm0_4
__int64 v10; // rax
__int64 v11; // rbx
__int64 v12; // rax
_BYTE v14[8]; // [rsp+30h] [rbp-38h] BYREF
_BYTE v15[24]; // [rsp+38h] [rbp-30h] BYREF
char v16; // [rsp+70h] [rbp+8h] BYREF
char v17; // [rsp+88h] [rbp+20h] BYREF
v2 = (cocos2d::CCNode *)(a1 - 352);
if ( (*(unsigned __int8 (__fastcall **)(__int64))(*(_QWORD *)(a1 - 352) + 344LL))(a1 - 352) )
{
v6 = (*(__int64 (__fastcall **)(cocos2d::CCNode *))(*(_QWORD *)v2 + 504LL))(v2);
if ( v6 )
{
while ( (*(unsigned __int8 (__fastcall **)(__int64))(*(_QWORD *)v6 + 344LL))(v6) )
{
v6 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v6 + 504LL))(v6);
if ( !v6 )
goto LABEL_5;
}
}
else
{
LABEL_5:
if ( *(_BYTE *)(a1 + 216) )
v9 = *(float *)(a1 + 72);
else
v9 = *(float *)(a1 + 76);
if ( v9 < *(float *)(a1 + 80) )
{
v10 = cocos2d::CCEGLView::sharedOpenGLView(v5, v4, v7, v8);
if ( v10 )
{
v11 = (*(__int64 (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v10 + 176LL))(v10, v14);
v12 = cocos2d::CCDirector::sharedDirector();
cocos2d::CCDirector::convertToGL(v12, &v16, v11);
cocos2d::CCNode::convertToNodeSpace(v2, &v17, &v16);
cocos2d::CCRect::CCRect((cocos2d::CCRect *)v15, 0.0, 0.0, *(float *)(a1 + 72), *(float *)(a1 + 76));
if ( cocos2d::CCRect::containsPoint((cocos2d::CCRect *)v15, (const struct cocos2d::CCPoint *)&v17) )
{
cocos2d::CCNode::unscheduleUpdate(v2);
*(_DWORD *)(a1 + 120) = 0;
*(float *)(a1 + 124) = (float)(a2 + a2) + *(float *)(a1 + 124);
cocos2d::CCNode::scheduleUpdate(v2);
return 1;
}
}
}
}
}
return 0;
}