//
// SongInfoObject::encodeWithCoder from 0x1403465b0 to 0x1403467ae (510 bytes)
//
// 2 xrefs:
// > ??> @ 0x1405ad4e8
// > ??> @ 0x1406d58d0
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
void SongInfoObject::encodeWithCoder(SongInfoObject *a1, DS_Dictionary *a2)
{
__int64 v4; // rbx
char v5; // bl
void *v6; // [rsp+30h] [rbp+8h]
v4 = qword_1406C2ED8;
if ( !qword_1406C2ED8 )
{
v6 = operator new(0x668u);
qword_1406C2ED8 = sub_14017AB00((__int64)v6);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);
v4 = qword_1406C2ED8;
}
v5 = *(_BYTE *)(v4 + 354);
DS_Dictionary::setIntegerForKey(a2, "kCEK", 6);
DS_Dictionary::setIntegerForKey(a2, (const char *)&word_140531EA4, a1->m_songID);
DS_Dictionary::setStringForKey(a2, &word_140531EA0, &a1->m_songName);
DS_Dictionary::setStringForKey(a2, &word_140531E94, &a1->m_artistName);
DS_Dictionary::setIntegerForKey(a2, (const char *)&word_140531E9C, a1->m_artistID);
DS_Dictionary::setFloatForKey(a2, (const char *)&word_140531E90, a1->m_fileSize);
DS_Dictionary::setIntegerForKey(a2, "11", a1->m_nongType);
DS_Dictionary::setBoolForKey(a2, "13", a1->m_isNew);
DS_Dictionary::setIntegerForKey(a2, "14", a1->m_libraryOrder);
if ( !v5 )
{
if ( a1->m_youtubeVideo.m_data.m_size )
DS_Dictionary::setStringForKey(a2, "6", &a1->m_youtubeVideo);
if ( a1->m_youtubeChannel.m_data.m_size )
DS_Dictionary::setStringForKey(a2, &word_140531E88, &a1->m_youtubeChannel);
if ( a1->m_downloadLinkOverride.m_data.m_size )
DS_Dictionary::setStringForKey(a2, &word_140544454, &a1->m_downloadLinkOverride);
DS_Dictionary::setStringForKey(a2, "10", &a1->m_songUrl);
DS_Dictionary::setStringForKey(a2, "12", &a1->m_extraArtists);
DS_Dictionary::setStringForKey(a2, "15", &a1->m_extraArtistNames);
}
DS_Dictionary::setIntegerForKey(a2, "9", a1->m_priority);
}