//
// GJBaseGameLayer::pickupItem from 0x1402161b0 to 0x140216289 (217 bytes)
//
// 4 xrefs:
// > GJBaseGameLayer::collisionCheckObjects @ 0x140215c48
// > GJBaseGameLayer::collisionCheckObjects @ 0x140215cfe
// > PlayLayer::loadFromCheckpoint @ 0x1403b7d76
// > ??> @ 0x1406cd11c
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
void GJBaseGameLayer::pickupItem(GJBaseGameLayer *a1, EffectGameObject *a2)
{
cocos2d::CCString *v4; // rax
const char *CString; // rax
size_t v6; // r8
void *v7; // rcx
void *Block[2]; // [rsp+20h] [rbp-38h] BYREF
__int128 v9; // [rsp+30h] [rbp-28h]
v4 = cocos2d::CCString::createWithFormat("%i", a2->m_secretCoinID);
CString = cocos2d::CCString::getCString(v4);
*(_OWORD *)Block = 0;
v9 = 0;
v6 = -1;
do
++v6;
while ( CString[v6] );
sub_14003A930(Block, CString, v6);
cocos2d::CCDictionary::setObject(a1->m_collectedItems, a2, Block);
if ( *((_QWORD *)&v9 + 1) > 0xFu )
{
v7 = Block[0];
if ( (unsigned __int64)(*((_QWORD *)&v9 + 1) + 1LL) >= 0x1000 )
{
v7 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v7 - 8) > 0x1F )
invalid_parameter_noinfo_noreturn();
}
j_j_free(v7);
}
}