//
// StartPosObject::init from 0x140653340 to 0x14065344b (267 bytes)
//
// 5 xrefs:
// > GameObject::createWithKey @ 0x140288a2f
// > GameObject::createWithKey @ 0x140288a36
// > GameObject::createWithKey @ 0x140288a20
// > ??> @ 0x1408252c0
// > ??> @ 0x140931550
//
// 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:35:44 +0000
//
// Hidden C++ exception states: #wind=1
char __fastcall StartPosObject::init(__int64 a1)
{
__int64 v2; // rax
cocos2d::CCObject *v3; // rbx
cocos2d::CCObject *v4; // rax
cocos2d::CCObject *v5; // rcx
void *v7; // [rsp+30h] [rbp+8h]
*(_DWORD *)(a1 + 28) = 13;
if ( !cocos2d::CCSprite::initWithSpriteFrameName((cocos2d::CCSprite *)a1, "edit_eStartPosBtn_001.png") )
return 0;
GameObject::commonSetup(a1);
*(_BYTE *)(a1 + 313) = 0;
*(_DWORD *)(a1 + 1256) = 1;
*(_WORD *)(a1 + 1465) = -1;
*(_BYTE *)(a1 + 1467) = -1;
*(_DWORD *)(a1 + 1468) = 1056964608;
*(_BYTE *)(a1 + 1652) = 1;
v7 = operator new(0x2D8u);
v2 = sub_1403ECAC0((__int64)v7);
v3 = (cocos2d::CCObject *)v2;
if ( v2 )
{
if ( (*(unsigned __int8 (__fastcall **)(__int64))(*(_QWORD *)v2 + 72LL))(v2) )
{
cocos2d::CCObject::autorelease(v3);
}
else
{
(*(void (__fastcall **)(cocos2d::CCObject *, __int64))(*(_QWORD *)v3 + 8LL))(v3, 1);
v3 = nullptr;
}
}
v4 = *(cocos2d::CCObject **)(a1 + 1856);
if ( v4 != v3 )
{
if ( v3 )
cocos2d::CCObject::retain(v3);
v5 = *(cocos2d::CCObject **)(a1 + 1856);
if ( v5 )
cocos2d::CCObject::release(v5);
*(_QWORD *)(a1 + 1856) = v3;
v4 = v3;
}
*((_BYTE *)v4 + 368) = 1;
return 1;
}