//
// PlayerObject::createSpider from 0x4406a0 to 0x44086e (462 bytes)
//
// 2 xrefs:
// > PlayerObject::updatePlayerSpiderFrame @ 0x440886
// > PlayerObject::init @ 0x4475d6
//
// 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:26 +0000
//
int __fastcall PlayerObject::createSpider(PlayerObject *this, GJSpiderSprite *a2)
{
char v2; // r8
char v3; // r9
char v4; // r10
_BOOL4 v7; // r7
int v8; // r1
int v9; // r3
_BYTE *v10; // r2
int v11; // r3
int v12; // r0
cocos2d::CCSpriteBatchNode *v13; // r0
unsigned int v14; // r2
int v15; // r0
_BYTE *v17; // r3
_BYTE *v18; // r3
int v19; // r9
int v20; // r2
int v21; // r3
int v22; // [sp+0h] [bp-3Ch]
char v23; // [sp+4h] [bp-38h]
char v24; // [sp+8h] [bp-34h]
char v25; // [sp+Ch] [bp-30h]
int v26; // [sp+10h] [bp-2Ch] BYREF
int v27; // [sp+14h] [bp-28h]
_BYTE *v28; // [sp+18h] [bp-24h]
int v29; // [sp+1Ch] [bp-20h] BYREF
int v30; // [sp+20h] [bp-1Ch]
_BYTE *v31; // [sp+24h] [bp-18h]
int v32[3]; // [sp+28h] [bp-14h] BYREF
v7 = *((_DWORD *)this + 434) != 0;
v26 = 0;
v27 = 0;
v28 = nullptr;
std::string::__init(&v26, &unk_B6B226, 0);
if ( v7 )
{
v9 = *((_DWORD *)this + 434);
v4 = *(_BYTE *)(v9 + 573);
v25 = *(_BYTE *)(v9 + 575);
v3 = *(_BYTE *)(v9 + 574);
v2 = *(_BYTE *)(v9 + 578);
v24 = *(_BYTE *)(v9 + 576);
v23 = *(_BYTE *)(v9 + 577);
v22 = (*(int (__fastcall **)(_DWORD))(**(_DWORD **)(v9 + 584) + 176))(*(_DWORD *)(v9 + 584));
std::string::basic_string(&v29, *(_DWORD *)(*((_DWORD *)this + 434) + 532) + 304);
v11 = v26 & 1;
if ( (v26 & 1) != 0 )
{
v10 = v28;
v11 = 0;
}
else
{
BYTE1(v26) = v26 & 1;
}
if ( (v26 & 1) != 0 )
{
*v10 = v11;
v27 = v11;
}
else
{
LOBYTE(v26) = v11;
}
std::string::reserve(&v26, 0);
v26 = v29;
v27 = v30;
v28 = v31;
v29 = 0;
v30 = 0;
v31 = nullptr;
std::string::~string((int)&v29);
(*(void (__fastcall **)(_DWORD))(**((_DWORD **)this + 606) + 268))(*((_DWORD *)this + 606));
cocos2d::CCObject::release(*((cocos2d::CCObject **)this + 606));
*((_DWORD *)this + 434) = 0;
}
v12 = GJSpiderSprite::create(a2, v8);
*((_DWORD *)this + 434) = v12;
*(_DWORD *)(v12 + 564) = (char *)this + 1168;
v13 = (cocos2d::CCSpriteBatchNode *)(*(int (__fastcall **)(_DWORD))(**((_DWORD **)this + 434) + 536))(*((_DWORD *)this + 434));
v15 = cocos2d::CCSpriteBatchNode::createWithTexture(v13, (cocos2d::CCTexture2D *)((char *)&dword_18 + 1), v14);
*((_DWORD *)this + 606) = v15;
(*(void (__fastcall **)(int, _DWORD))(*(_DWORD *)v15 + 228))(v15, *((_DWORD *)this + 434));
cocos2d::CCObject::retain(*((cocos2d::CCObject **)this + 606));
if ( v7 )
{
if ( *((_BYTE *)this + 1958) )
(*(void (__fastcall **)(_DWORD, _DWORD, int))(**((_DWORD **)this + 293) + 232))(
*((_DWORD *)this + 293),
*((_DWORD *)this + 606),
2);
v17 = *((_BYTE **)this + 434);
v17[573] = v4;
v17[575] = v25;
v17[574] = v3;
v18 = *((_BYTE **)this + 434);
v18[576] = v24;
v18[578] = v2;
v18[577] = v23;
GJRobotSprite::updateColors(*((GJRobotSprite **)this + 434));
GJRobotSprite::updateGlowColor(
*((_DWORD *)this + 434),
*((unsigned __int8 *)this + 2109)
| (*((unsigned __int8 *)this + 2110) << 8)
| (*((unsigned __int8 *)this + 2111) << 16),
0);
v19 = *((_DWORD *)this + 434);
std::string::basic_string(v32, (int)&v26);
CCAnimatedSprite::runAnimation(v19, (int)v32, v20, v21);
std::string::~string((int)v32);
if ( v22 )
GJRobotSprite::showGlow(*((GJRobotSprite **)this + 434));
}
return std::string::~string((int)&v26);
}