//
// sub_18001DA70 from 0x18001da70 to 0x18001db1e (174 bytes)
//
// 4 xrefs:
// > cocos2d::extension::CCControl::CCControl @ 0x18001aefc
// > cocos2d::extension::CCScrollView::CCScrollView @ 0x18001c1ab
// > sub_18001D600 @ 0x18001d66e
// > ??> @ 0x18004cfbc
//
// 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:15:44 +0000
//
__int64 __fastcall sub_18001DA70(_QWORD *a1, _QWORD *a2)
{
__int64 v2; // rbx
_QWORD *v5; // r8
__int64 **v6; // rdx
__int64 *i; // rcx
__int64 v8; // rcx
__int64 result; // rax
v2 = *a1;
*(_QWORD *)(v2 + 8) = sub_18001DB40(a1, *(_QWORD *)(*a2 + 8LL), *a1);
v5 = (_QWORD *)*a1;
a1[1] = a2[1];
v6 = (__int64 **)v5[1];
if ( *((_BYTE *)v6 + 25) )
{
*v5 = v5;
result = *a1;
*(_QWORD *)(*a1 + 16LL) = *a1;
}
else
{
for ( i = *v6; !*((_BYTE *)i + 25); i = (__int64 *)*i )
v6 = (__int64 **)i;
*v5 = v6;
v8 = *(_QWORD *)(*a1 + 8LL);
for ( result = *(_QWORD *)(v8 + 16); !*(_BYTE *)(result + 25); result = *(_QWORD *)(result + 16) )
v8 = result;
*(_QWORD *)(*a1 + 16LL) = v8;
}
return result;
}