//
// SongInfoObject::encodeWithCoder from 0x100665630 to 0x1006657ed (445 bytes)
//
// 1 xrefs:
// > ??> @ 0x100b82de8
//
// This function is hookable on this platform (idp: pc, 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:34:58 +0000
//
__int64 __fastcall SongInfoObject::encodeWithCoder(__int64 a1, __int64 a2)
{
char v2; // r15
unsigned int v3; // eax
unsigned int v4; // eax
v2 = *(_BYTE *)(GameManager::sharedState() + 346);
DS_Dictionary::setIntegerForKey_1(a2, (__int64)"kCEK", 6);
DS_Dictionary::setIntegerForKey_1(a2, (__int64)"1", *(unsigned int *)(a1 + 316));
DS_Dictionary::setStringForKey_1(a2, (__int64)"2", a1 + 320);
DS_Dictionary::setStringForKey_1(a2, (__int64)"4", a1 + 344);
DS_Dictionary::setIntegerForKey_1(a2, (__int64)"3", *(unsigned int *)(a1 + 392));
DS_Dictionary::setFloatForKey_1(a2, (__int64)"5");
DS_Dictionary::setIntegerForKey_1(a2, (__int64)"11", *(unsigned int *)(a1 + 400));
DS_Dictionary::setBoolForKey_1(a2, (__int64)"13", *(unsigned __int8 *)(a1 + 448));
DS_Dictionary::setIntegerForKey_1(a2, (__int64)"14", *(unsigned int *)(a1 + 452));
if ( !v2 )
{
v3 = *(unsigned __int8 *)(a1 + 528);
if ( (v3 & 1) != 0 )
{
if ( !*(_QWORD *)(a1 + 536) )
goto LABEL_7;
}
else if ( !(v3 >> 1) )
{
LABEL_7:
v4 = *(unsigned __int8 *)(a1 + 552);
if ( (v4 & 1) != 0 )
{
if ( !*(_QWORD *)(a1 + 560) )
{
LABEL_12:
DS_Dictionary::setStringForKey_1(a2, (__int64)"10", a1 + 368);
DS_Dictionary::setStringForKey_1(a2, (__int64)"12", a1 + 408);
DS_Dictionary::setStringForKey_1(a2, (__int64)"15", a1 + 464);
return DS_Dictionary::setIntegerForKey_1(a2, (__int64)"9", *(unsigned int *)(a1 + 436));
}
}
else if ( !(v4 >> 1) )
{
goto LABEL_12;
}
DS_Dictionary::setStringForKey_1(a2, (__int64)"18", a1 + 552);
goto LABEL_12;
}
DS_Dictionary::setStringForKey_1(a2, (__int64)"17", a1 + 528);
goto LABEL_7;
}
return DS_Dictionary::setIntegerForKey_1(a2, (__int64)"9", *(unsigned int *)(a1 + 436));
}