//
// SongCell::loadFromObject from 0x427374 to 0x427660 (748 bytes)
//
// 1 xrefs:
// > CustomListView::loadCell @ 0x434102
//
// 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:05 +0000
//
int __fastcall SongCell::loadFromObject(SongCell *this, LevelTools **a2)
{
int v4; // r1
int v5; // r9
cocos2d::CCLabelBMFont *v6; // r0
int v7; // r4
void (__fastcall *v8)(int, _DWORD *); // r10
void (__fastcall *v9)(int, _DWORD *); // r10
void (__fastcall *v10)(int, _DWORD); // r8
float *v11; // r0
void (__fastcall *v12)(int, int); // r8
int v13; // r1
ButtonSprite *v14; // r0
ButtonSprite *v15; // r11
cocos2d::CCMenu *v16; // r10
int v17; // r10
float v18; // s18
float *v19; // r0
cocos2d::CCLabelBMFont *v20; // r1
cocos2d::CCString *v21; // r0
cocos2d::CCLabelBMFont *CString; // r9
const char *v23; // r2
int v24; // r5
void (__fastcall *v25)(int, _BYTE *); // r6
void (__fastcall *v26)(int, _BYTE *); // r6
int v27; // r9
void (__fastcall *v28)(int, _DWORD); // r4
float *v29; // r0
int (__fastcall *v30)(int, int); // r4
int v31; // r1
float v33; // [sp+10h] [bp-34h]
void (__fastcall *v34)(int, _BYTE *); // [sp+14h] [bp-30h]
_BYTE v35[8]; // [sp+18h] [bp-2Ch] BYREF
_BYTE v36[8]; // [sp+20h] [bp-24h] BYREF
_DWORD v37[2]; // [sp+28h] [bp-1Ch] BYREF
unsigned __int8 v38; // [sp+30h] [bp-14h] BYREF
_BYTE v39[7]; // [sp+31h] [bp-13h] BYREF
cocos2d::CCLabelBMFont *v40; // [sp+38h] [bp-Ch]
(*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 103) + 292))(*((_DWORD *)this + 103), 1);
*((_DWORD *)this + 105) = a2;
v5 = LevelTools::artistForAudio(a2[13], v4);
LevelTools::getAudioTitle((LevelTools *)&v38, (int)a2[13]);
if ( (v38 & 1) != 0 )
v6 = v40;
else
v6 = (cocos2d::CCLabelBMFont *)v39;
v7 = cocos2d::CCLabelBMFont::create(v6, "bigFont.fnt", (const char *)(v38 << 31));
std::string::~string((int)&v38);
(*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 103) + 228))(*((_DWORD *)this + 103), v7);
v8 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v7 + 148);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v37, 0.0, 0.5);
v8(v7, v37);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v7 + 80))(v7, 1065353216);
v9 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v7 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v37, 10.0, (float)(*((float *)this + 101) * 0.5) + 10.0);
v9(v7, v37);
if ( *(float *)(*(int (__fastcall **)(int))(*(_DWORD *)v7 + 164))(v7) > 240.0 )
{
v10 = *(void (__fastcall **)(int, _DWORD))(*(_DWORD *)v7 + 80);
v11 = (float *)(*(int (__fastcall **)(int))(*(_DWORD *)v7 + 164))(v7);
v10(v7, 240.0 / *v11);
}
v12 = *(void (__fastcall **)(int, int))(*(_DWORD *)v7 + 80);
if ( (*(float (__fastcall **)(int))(*(_DWORD *)v7 + 84))(v7) > 0.7 )
v13 = 1060320051;
else
v13 = (*(int (__fastcall **)(int))(*(_DWORD *)v7 + 84))(v7);
v12(v7, v13);
v14 = ButtonSprite::create(
(ButtonSprite *)"View",
(const char *)&word_32,
0,
0.6,
0,
"bigFont.fnt",
"GJ_button_01.png",
(const char *)0x41F00000,
v33);
v37[0] = SongCell::onClick;
v37[1] = 0;
v15 = v14;
v16 = (cocos2d::CCMenu *)CCMenuItemSpriteExtra::create((int)v14, 0, (int)this, (int)SongCell::onClick, 0);
CCMenuItemSpriteExtra::setSizeMult((int)v16, 1.5);
v17 = cocos2d::CCMenu::create(v16, nullptr);
(*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 103) + 228))(*((_DWORD *)this + 103), v17);
v18 = *((float *)this + 100);
v34 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v17 + 92);
v19 = (float *)(*(int (__fastcall **)(ButtonSprite *))(*(_DWORD *)v15 + 164))(v15);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v36,
(float)(v18 - (float)(*v19 * 0.5)) - 9.0,
*((float *)this + 101) * 0.5);
v34(v17, v36);
LevelTools::nameForArtist((LevelTools *)&v38, v5);
if ( (v38 & 1) != 0 )
v20 = v40;
else
v20 = (cocos2d::CCLabelBMFont *)v39;
v21 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"By %s", (const char *)v20);
CString = (cocos2d::CCLabelBMFont *)cocos2d::CCString::getCString(v21);
std::string::~string((int)&v38);
v24 = cocos2d::CCLabelBMFont::create(CString, "goldFont.fnt", v23);
(*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 103) + 228))(*((_DWORD *)this + 103), v24);
v25 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v24 + 148);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v36, 0.0, 0.5);
v25(v24, v36);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v24 + 80))(v24, 1065353216);
v26 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v24 + 92);
v27 = (*(int (__fastcall **)(int))(*(_DWORD *)v7 + 96))(v7);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v35, 2.0, -21.0);
cocos2d::CCPoint::operator+(v36, v27, v35);
v26(v24, v36);
if ( *(float *)(*(int (__fastcall **)(int))(*(_DWORD *)v24 + 164))(v24) > 140.0 )
{
v28 = *(void (__fastcall **)(int, _DWORD))(*(_DWORD *)v24 + 80);
v29 = (float *)(*(int (__fastcall **)(int))(*(_DWORD *)v24 + 164))(v24);
v28(v24, 140.0 / *v29);
}
v30 = *(int (__fastcall **)(int, int))(*(_DWORD *)v24 + 80);
if ( (*(float (__fastcall **)(int))(*(_DWORD *)v24 + 84))(v24) > 0.7 )
v31 = 1060320051;
else
v31 = (*(int (__fastcall **)(int))(*(_DWORD *)v24 + 84))(v24);
return v30(v24, v31);
}