//
// GJGameLevel::getSongName from 0x4ca668 to 0x4ca73e (214 bytes)
//
// 3 xrefs:
// > LevelCell::loadLocalLevelCell @ 0x4287cc
// > LevelCell::loadCustomLevelCell @ 0x42f744
// > EditLevelLayer::setupLevelInfo @ 0x4a09b2
//
// 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:50:37 +0000
//
GJGameLevel *__fastcall GJGameLevel::getSongName(GJGameLevel *this, int a2)
{
int v4; // r1
int v5; // r0
int v6; // r0
int v7; // r1
_BYTE *v8; // r2
int v9; // r0
int v10; // r1
_BYTE *v11; // r2
int v13; // [sp+4h] [bp-20h] BYREF
int v14; // [sp+8h] [bp-1Ch]
_BYTE *v15; // [sp+Ch] [bp-18h]
int v16; // [sp+10h] [bp-14h] BYREF
int v17; // [sp+14h] [bp-10h]
_BYTE *v18; // [sp+18h] [bp-Ch]
if ( *(_DWORD *)(a2 + 436) )
{
v13 = 0;
v14 = 0;
v15 = nullptr;
std::string::__init(&v13, &unk_B6B226, 0);
v5 = SongInfoObject::create(*(SongInfoObject **)(a2 + 436), v4);
if ( !v5 || *(_BYTE *)(v5 + 328) )
{
std::string::assign(&v13, "Unknown");
}
else
{
std::string::basic_string(&v16, v5 + 268);
if ( (v13 & 1) != 0 )
{
*v15 = 0;
v14 = 0;
}
else
{
LOWORD(v13) = 0;
}
std::string::reserve(&v13, 0);
v6 = v16;
v7 = v17;
v8 = v18;
v16 = 0;
v17 = 0;
v18 = nullptr;
v13 = v6;
v14 = v7;
v15 = v8;
std::string::~string((int)&v16);
}
v9 = v13;
v10 = v14;
v11 = v15;
v13 = 0;
v14 = 0;
v15 = nullptr;
*(_DWORD *)this = v9;
*((_DWORD *)this + 1) = v10;
*((_DWORD *)this + 2) = v11;
std::string::~string((int)&v13);
}
else
{
LevelTools::getAudioTitle(this, *(_DWORD *)(a2 + 432));
}
return this;
}