//
// GJPathPage::onIconInfo from 0x100300bd0 to 0x100300d1f (335 bytes)
//
// 1 xrefs:
// > GJPathPage::init @ 0x1002ffff9
//
// 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 __fastcall GJPathPage::onIconInfo(GJPathPage *a1, cocos2d::CCObject *a2)
{
double v2; // xmm0_8
cocos2d::CCString *v3; // rax
const char *CString; // r14
size_t v5; // rax
size_t v6; // rbx
char *v7; // r15
size_t v8; // r12
GameManager *v9; // rbx
char v10; // r14
ItemInfoPopup *v11; // rax
__int128 v12; // [rsp+0h] [rbp-60h] BYREF
void *__p; // [rsp+10h] [rbp-50h]
__int128 __dst; // [rsp+20h] [rbp-40h] BYREF
void *v15; // [rsp+30h] [rbp-30h]
int v16; // [rsp+38h] [rbp-28h] BYREF
UnlockType v17[9]; // [rsp+3Ch] [rbp-24h] BYREF
((void (__fastcall *)(cocos2d::CCObject *))a2->getTag)(a2);
v3 = (cocos2d::CCString *)sub_1007AB580("geometry.ach.path%02d.%02d", v12);
CString = cocos2d::CCString::getCString(v3);
v5 = strlen(CString);
if ( v5 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100006BF0(v2);
v6 = v5;
if ( v5 >= 0x17 )
{
v8 = 26;
if ( (v5 | 7) != 0x17 )
v8 = (v5 | 7) + 1;
v7 = (char *)operator new(v8);
v15 = v7;
*(_QWORD *)&__dst = v8 + 1;
*((_QWORD *)&__dst + 1) = v6;
goto LABEL_8;
}
LOBYTE(__dst) = 2 * v5;
v7 = (char *)&__dst + 1;
if ( v5 )
LABEL_8:
memmove(v7, CString, v6);
v7[v6] = 0;
v16 = 0;
v17[0] = 0;
v9 = GameManager::sharedState();
v10 = __dst & 1;
if ( (__dst & 1) != 0 )
{
sub_100006B70(&v12, v15, *((unsigned __int64 *)&__dst + 1), v2);
}
else
{
__p = v15;
v12 = __dst;
}
GameManager::getUnlockForAchievement(v9, &v12, &v16, v17);
if ( (v12 & 1) != 0 )
operator delete(__p);
if ( v17[0] > 0 )
{
v11 = ItemInfoPopup::create(v16, v17[0]);
((void (__fastcall *)(ItemInfoPopup *))v11->show)(v11);
}
if ( v10 )
operator delete(v15);
}