//
// cocos2d::extension::CCScrollView::registerScriptHandler from 0x7af070 to 0x7af116 (166 bytes)
//
// 0 xrefs:
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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:00:05 +0000
//
void __fastcall cocos2d::extension::CCScrollView::registerScriptHandler(
cocos2d::extension::CCScrollView *this,
int a2,
int a3)
{
_DWORD *v6; // r3
int v7; // r2
_DWORD *v8; // r2
_DWORD *v9; // r4
_DWORD *v10; // r5
_DWORD *v11; // r0
int v12; // r3
int v13; // r3
_DWORD v14[3]; // [sp+0h] [bp-Ch] BYREF
v14[0] = this;
v14[1] = a2;
v14[2] = a3;
cocos2d::extension::CCScrollView::unregisterScriptHandler(this, a3, a3);
v6 = *((_DWORD **)this + 110);
if ( v6 )
{
while ( 1 )
{
v7 = v6[4];
if ( a3 >= v7 )
{
if ( v7 >= a3 )
{
v14[0] = v6;
v9 = v14;
goto LABEL_11;
}
v8 = (_DWORD *)v6[1];
if ( !v8 )
{
v14[0] = v6;
v9 = v6 + 1;
goto LABEL_11;
}
}
else
{
v8 = (_DWORD *)*v6;
if ( !*v6 )
{
v14[0] = v6;
v9 = v6;
goto LABEL_11;
}
}
v6 = v8;
}
}
v9 = (_DWORD *)((char *)this + 440);
v14[0] = (char *)this + 440;
LABEL_11:
v10 = (_DWORD *)*v9;
if ( !*v9 )
{
v11 = (_DWORD *)operator new(0x18u);
v11[5] = 0;
v10 = v11;
*v11 = 0;
v11[1] = 0;
v12 = v14[0];
v11[4] = a3;
v11[2] = v12;
*v9 = v11;
v13 = **((_DWORD **)this + 109);
if ( v13 )
*((_DWORD *)this + 109) = v13;
std::__tree_balance_after_insert *>(*((_DWORD **)this + 110), (_DWORD *)*v9);
++*((_DWORD *)this + 111);
}
v10[5] = a2;
}