//
// TeleportPortalObject::create from 0x1001bdb40 to 0x1001bdc6c (300 bytes)
//
// 3 xrefs:
// > PlayLayer::addObject @ 0x1000b2352
// > GameObject::createWithKey @ 0x10059d51a
// > GameObject::createWithKey @ 0x10059d66f
//
// 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
//
TeleportPortalObject *__fastcall TeleportPortalObject::create(const char *a1, bool a2)
{
char *v2; // rbx
v2 = (char *)operator new(0x770u);
EffectGameObject::EffectGameObject((EffectGameObject *)v2);
*((_WORD *)v2 + 918) = 0;
*(_QWORD *)v2 = off_1008CE198;
*((_QWORD *)v2 + 40) = off_1008CE8F8;
*((_QWORD *)v2 + 43) = off_1008CE978;
*((_QWORD *)v2 + 230) = 0;
v2[1848] = 0;
*((_DWORD *)v2 + 463) = 0;
*((_WORD *)v2 + 928) = 0;
*((_DWORD *)v2 + 465) = 0;
v2[1864] = 0;
*((_DWORD *)v2 + 467) = 1065353216;
*((_QWORD *)v2 + 234) = 0;
*(_DWORD *)(v2 + 1879) = 0;
*(_QWORD *)(v2 + 1884) = 0;
sub_10028CC30(v2 + 1892);
if ( EnhancedGameObject::init((EnhancedGameObject *)v2, a1) )
{
*((_DWORD *)v2 + 312) = 1;
v2[1450] = -1;
*((_WORD *)v2 + 724) = -1;
*((_DWORD *)v2 + 363) = 1056964608;
v2[1636] = 1;
if ( !a2 )
v2[1472] = 1;
cocos2d::CCObject::autorelease((cocos2d::CCObject *)v2);
}
else
{
(*(void (__fastcall **)(char *))(*(_QWORD *)v2 + 16LL))(v2);
return nullptr;
}
return (TeleportPortalObject *)v2;
}