//
// GJItemIcon::createBrowserItem from 0x140383400 to 0x140383525 (293 bytes)
//
// 5 xrefs:
// > GJGarageLayer::getItems @ 0x14037f29e
// > GJGarageLayer::setupSpecialPage @ 0x14037f8e8
// > GJGarageLayer::dialogClosed @ 0x1403811d8
// > ItemInfoPopup::init @ 0x140384b22
// > ??> @ 0x140922a0c
//
// 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:31:06 +0000
//
// Hidden C++ exception states: #wind=2
char *__fastcall GJItemIcon::createBrowserItem(int a1, int a2)
{
char *v4; // rsi
__int16 v6; // [rsp+50h] [rbp-28h] BYREF
char v7; // [rsp+52h] [rbp-26h]
__int16 v8; // [rsp+90h] [rbp+18h] BYREF
char v9; // [rsp+92h] [rbp+1Ah]
char *v10; // [rsp+98h] [rbp+20h]
v8 = -1;
v6 = -20561;
v4 = (char *)operator new(0x278u);
v10 = v4;
cocos2d::CCSprite::CCSprite((cocos2d::CCSprite *)v4);
*(_QWORD *)v4 = &GJItemIcon::`vftable';
*((_QWORD *)v4 + 40) = &GJItemIcon::`vftable';
*((_QWORD *)v4 + 43) = &GJItemIcon::`vftable';
*((_QWORD *)v4 + 75) = 0;
*((_DWORD *)v4 + 152) = 0;
cocos2d::CCSize::CCSize((cocos2d::CCSize *)(v4 + 612));
v4[620] = 0;
*((_QWORD *)v4 + 78) = 0;
v9 = -1;
v7 = -81;
if ( (unsigned __int8)GJItemIcon::init((_DWORD)v4, a1, a2, (unsigned int)&v6, (__int64)&v8, 0) )
{
cocos2d::CCObject::autorelease((cocos2d::CCObject *)v4);
return v4;
}
else
{
(*(void (__fastcall **)(char *, __int64))(*(_QWORD *)v4 + 8LL))(v4, 1);
return nullptr;
}
}