//
// PlayerObject::createRobot from 0x4404c4 to 0x440686 (450 bytes)
//
// 2 xrefs:
// > PlayerObject::updatePlayerRobotFrame @ 0x44069a
// > PlayerObject::init @ 0x44759a
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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:48:25 +0000
//
int __fastcall PlayerObject::createRobot(PlayerObject *this, GJRobotSprite *a2)
{
int v2; // r7
char v3; // r8
char v4; // r9
char v5; // r10
int v6; // r5
int v8; // r6
int v10; // r0
cocos2d::CCSpriteBatchNode *v11; // r0
unsigned int v12; // r2
int v13; // r0
_BYTE *v15; // r3
_BYTE *v16; // r3
int v17; // r8
int v18; // r2
int v19; // r3
char v20; // [sp+0h] [bp-3Ch]
char v21; // [sp+4h] [bp-38h]
char v22; // [sp+8h] [bp-34h]
int v23; // [sp+10h] [bp-2Ch] BYREF
int v24; // [sp+14h] [bp-28h]
int v25; // [sp+18h] [bp-24h]
int v26; // [sp+1Ch] [bp-20h] BYREF
int v27; // [sp+20h] [bp-1Ch]
int v28; // [sp+24h] [bp-18h]
int v29[3]; // [sp+28h] [bp-14h] BYREF
v6 = *((_DWORD *)this + 433);
v8 = v6;
if ( v6 )
v8 = 1;
v23 = 0;
v24 = 0;
v25 = 0;
if ( v8 )
{
v5 = *(_BYTE *)(v6 + 573);
v22 = *(_BYTE *)(v6 + 576);
v4 = *(_BYTE *)(v6 + 574);
v3 = *(_BYTE *)(v6 + 575);
v21 = *(_BYTE *)(v6 + 577);
v20 = *(_BYTE *)(v6 + 578);
v2 = (*(int (__fastcall **)(_DWORD))(**(_DWORD **)(v6 + 584) + 176))(*(_DWORD *)(v6 + 584));
std::string::basic_string(&v26, *(_DWORD *)(*((_DWORD *)this + 434) + 532) + 304);
BYTE1(v23) = v23 & 1;
LOBYTE(v23) = v23 & 1;
std::string::reserve(&v23, 0);
v23 = v26;
v24 = v27;
v25 = v28;
v26 = 0;
v27 = 0;
v28 = 0;
std::string::~string((int)&v26);
(*(void (__fastcall **)(_DWORD))(**((_DWORD **)this + 605) + 268))(*((_DWORD *)this + 605));
cocos2d::CCObject::release(*((cocos2d::CCObject **)this + 605));
*((_DWORD *)this + 433) = 0;
}
v10 = GJRobotSprite::create(a2, (int)a2);
*((_DWORD *)this + 433) = v10;
*(_DWORD *)(v10 + 564) = (char *)this + 1168;
v11 = (cocos2d::CCSpriteBatchNode *)(*(int (__fastcall **)(_DWORD))(**((_DWORD **)this + 433) + 536))(*((_DWORD *)this + 433));
v13 = cocos2d::CCSpriteBatchNode::createWithTexture(v11, (cocos2d::CCTexture2D *)((char *)&dword_18 + 1), v12);
*((_DWORD *)this + 605) = v13;
(*(void (__fastcall **)(int, _DWORD))(*(_DWORD *)v13 + 228))(v13, *((_DWORD *)this + 433));
cocos2d::CCObject::retain(*((cocos2d::CCObject **)this + 605));
if ( v8 )
{
if ( *((_BYTE *)this + 1957) )
(*(void (__fastcall **)(_DWORD, _DWORD, int))(**((_DWORD **)this + 293) + 232))(
*((_DWORD *)this + 293),
*((_DWORD *)this + 605),
2);
v15 = *((_BYTE **)this + 433);
v15[573] = v5;
v15[574] = v4;
v15[575] = v3;
v16 = *((_BYTE **)this + 433);
v16[576] = v22;
v16[577] = v21;
v16[578] = v20;
GJRobotSprite::updateColors(*((GJRobotSprite **)this + 433));
GJRobotSprite::updateGlowColor(
*((_DWORD *)this + 433),
*((unsigned __int8 *)this + 2109)
| (*((unsigned __int8 *)this + 2110) << 8)
| (*((unsigned __int8 *)this + 2111) << 16),
0);
v17 = *((_DWORD *)this + 433);
std::string::basic_string(v29, (int)&v23);
CCAnimatedSprite::runAnimation(v17, (int)v29, v18, v19);
std::string::~string((int)v29);
if ( v2 )
GJRobotSprite::showGlow(*((GJRobotSprite **)this + 433));
}
return std::string::~string((int)&v23);
}