//
// PlayerObject::resetTouchedRings from 0x1404f6600 to 0x1404f673a (314 bytes)
//
// 5 xrefs:
// > GJBaseGameLayer::update @ 0x140340d83
// > GJBaseGameLayer::update @ 0x140340d9a
// > ??> @ 0x1408d5214
// > ??> @ 0x1408d5224
// > ??> @ 0x14092a1c4
//
// 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:33:20 +0000
//
__int64 __fastcall PlayerObject::resetTouchedRings(__int64 a1, char a2)
{
cocos2d::CCArray *v3; // rcx
unsigned int v5; // ebx
unsigned int v6; // r8d
__int64 *v7; // rcx
__int64 v8; // rax
__int64 v9; // rcx
v3 = *(cocos2d::CCArray **)(a1 + 2624);
if ( a2 )
{
cocos2d::CCArray::removeAllObjects(v3);
return sub_14003EB60((_QWORD *)(a1 + 2632));
}
v5 = 0;
if ( cocos2d::CCArray::count(v3) )
{
while ( 1 )
{
v6 = *((_DWORD *)cocos2d::CCArray::objectAtIndex(*(cocos2d::CCArray **)(a1 + 2624), v5) + 231);
v7 = (__int64 *)(*(_QWORD *)(a1 + 2656)
+ 16
* (*(_QWORD *)(a1 + 2680)
& (0x100000001B3LL
* (((unsigned __int64)v6 >> 24)
^ (0x100000001B3LL
* ((0x100000001B3LL
* ((0x100000001B3LL * ((unsigned __int8)v6 ^ 0xCBF29CE484222325uLL)) ^ BYTE1(v6)))
^ BYTE2(v6)))))));
v8 = v7[1];
if ( v8 == *(_QWORD *)(a1 + 2640) )
goto LABEL_9;
v9 = *v7;
if ( v6 != *(_DWORD *)(v8 + 16) )
break;
LABEL_10:
if ( v8 )
++v5;
else
cocos2d::CCArray::removeObjectAtIndex(*(cocos2d::CCArray **)(a1 + 2624), v5, 1);
if ( v5 >= cocos2d::CCArray::count(*(cocos2d::CCArray **)(a1 + 2624)) )
return sub_14003EB60((_QWORD *)(a1 + 2632));
}
while ( v8 != v9 )
{
v8 = *(_QWORD *)(v8 + 8);
if ( v6 == *(_DWORD *)(v8 + 16) )
goto LABEL_10;
}
LABEL_9:
v8 = 0;
goto LABEL_10;
}
return sub_14003EB60((_QWORD *)(a1 + 2632));
}