//
// PlayerObject::createRobot from 0x75e094 to 0x75e364 (720 bytes)
//
// 4 xrefs:
// > PlayerObject::updatePlayerRobotFrame @ 0x75e378
// > PlayerObject::updatePlayerRobotFrame @ 0x75e380
// > PlayerObject::init @ 0x767638
// > ??> @ 0xfdd50
//
// This function is hookable on this platform (idp: arm, 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 12:53:02 +0000
//
__int64 __fastcall PlayerObject::createRobot(PlayerObject *this, unsigned int a2)
{
char v2; // w24
char v3; // w25
char v4; // w26
char v5; // w27
char v6; // w28
__int64 v9; // x1
_BOOL4 v10; // w21
unsigned __int8 v11; // w0
__int64 v12; // x1
__int64 v13; // x0
__int64 *v14; // x2
__int64 v15; // x0
size_t v16; // x1
__int64 v17; // x1
__int64 v18; // x0
cocos2d::CCSpriteBatchNode *v19; // x0
unsigned int v20; // w2
__int64 v21; // x0
_BYTE *v22; // x0
_BYTE *v23; // x0
__int64 v24; // x22
int v26; // [xsp+68h] [xbp+68h]
char v27; // [xsp+6Ch] [xbp+6Ch]
__int64 v28; // [xsp+70h] [xbp+70h] BYREF
size_t v29; // [xsp+78h] [xbp+78h]
void *v30; // [xsp+80h] [xbp+80h]
__int64 v31; // [xsp+88h] [xbp+88h] BYREF
size_t v32; // [xsp+90h] [xbp+90h]
void *v33; // [xsp+98h] [xbp+98h]
__int64 v34; // [xsp+A0h] [xbp+A0h] BYREF
size_t v35; // [xsp+A8h] [xbp+A8h]
void *v36; // [xsp+B0h] [xbp+B0h]
v9 = *((_QWORD *)this + 267);
v28 = 0;
v29 = 0;
v10 = v9 != 0;
v30 = nullptr;
if ( v9 )
{
v6 = *(_BYTE *)(v9 + 729);
v5 = *(_BYTE *)(v9 + 730);
v4 = *(_BYTE *)(v9 + 731);
v3 = *(_BYTE *)(v9 + 732);
v2 = *(_BYTE *)(v9 + 733);
v27 = *(_BYTE *)(v9 + 734);
v11 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(v9 + 744) + 352LL))(*(_QWORD *)(v9 + 744));
v12 = *((_QWORD *)this + 268);
v26 = v11;
v31 = 0;
v13 = *(_QWORD *)(v12 + 648);
v32 = 0;
v14 = (__int64 *)(v13 + 400);
v33 = nullptr;
if ( (*(_BYTE *)(v13 + 400) & 1) != 0 )
{
std::string::__init(&v31, *(void **)(v13 + 416), *(_QWORD *)(v13 + 408));
}
else
{
v15 = *v14;
v16 = v14[1];
v33 = (void *)v14[2];
v31 = v15;
v32 = v16;
}
LOWORD(v28) = 0;
std::string::reserve(&v28, 0);
v17 = *((_QWORD *)this + 372);
v30 = v33;
v28 = v31;
v29 = v32;
(*(void (__fastcall **)(__int64))(*(_QWORD *)v17 + 536LL))(v17);
cocos2d::CCObject::release(*((cocos2d::CCObject **)this + 372));
*((_QWORD *)this + 267) = 0;
}
v18 = GJRobotSprite::create((GJRobotSprite *)a2, v9);
*((_QWORD *)this + 267) = v18;
*(_QWORD *)(v18 + 712) = (char *)this + 1352;
v19 = (cocos2d::CCSpriteBatchNode *)(*(__int64 (__fastcall **)(_QWORD))(**((_QWORD **)this + 267) + 1072LL))(*((_QWORD *)this + 267));
v21 = cocos2d::CCSpriteBatchNode::createWithTexture(v19, (cocos2d::CCTexture2D *)((char *)&off_18 + 1), v20);
*((_QWORD *)this + 372) = v21;
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v21 + 456LL))(v21, *((_QWORD *)this + 267));
cocos2d::CCObject::retain(*((cocos2d::CCObject **)this + 372));
if ( v10 )
{
if ( *((_BYTE *)this + 2421) )
(*(void (__fastcall **)(_QWORD, _QWORD, __int64))(**((_QWORD **)this + 170) + 464LL))(
*((_QWORD *)this + 170),
*((_QWORD *)this + 372),
2);
v22 = *((_BYTE **)this + 267);
v22[729] = v6;
v22[730] = v5;
v22[731] = v4;
v23 = *((_BYTE **)this + 267);
v23[732] = v3;
v23[733] = v2;
v23[734] = v27;
GJRobotSprite::updateColors(*((GJRobotSprite **)this + 267));
GJRobotSprite::updateGlowColor(*((_QWORD *)this + 267), *(_QWORD *)((char *)this + 2605), 0);
v34 = 0;
v35 = 0;
v36 = nullptr;
v24 = *((_QWORD *)this + 267);
if ( (v28 & 1) != 0 )
{
std::string::__init(&v34, v30, v29);
}
else
{
v34 = v28;
v35 = v29;
v36 = v30;
}
CCAnimatedSprite::runAnimation(v24, (char *)&v34);
if ( (v34 & 1) != 0 )
operator delete(v36);
if ( v26 )
GJRobotSprite::showGlow(*((GJRobotSprite **)this + 267));
}
if ( (v28 & 1) != 0 )
operator delete(v30);
return _stack_chk_guard;
}