//
// LevelBrowserLayer::shareCommentClosed from 0x1402ce130 to 0x1402ce23b (267 bytes)
//
// 3 xrefs:
// > ??> @ 0x140584d58
// > ??> @ 0x1406d2d8c
// > ??> @ 0x1406d2d98
//
// 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
//
// Hidden C++ exception states: #wind=3
void __fastcall LevelBrowserLayer::shareCommentClosed(__int64 a1, std::string *a2, __int64 a3)
{
GJLevelList *NewLevelList; // rsi
__int64 v6; // rcx
std::string *m_bigStorage; // rdx
void *v8; // [rsp+20h] [rbp-28h]
void *v9; // [rsp+20h] [rbp-28h]
if ( *(_DWORD *)(a3 + 664) == 5 )
{
if ( !qword_1406C2EC0 )
{
v8 = operator new(0x3D0u);
qword_1406C2EC0 = sub_140141280((__int64)v8);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EC0 + 72LL))(qword_1406C2EC0);
}
NewLevelList = GameLevelManager::createNewLevelList((GameLevelManager *)a1);
v6 = qword_1406C2EC0;
if ( !qword_1406C2EC0 )
{
v9 = operator new(0x3D0u);
qword_1406C2EC0 = sub_140141280((__int64)v9);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EC0 + 72LL))(qword_1406C2EC0);
v6 = qword_1406C2EC0;
}
*(_BYTE *)(v6 + 712) = 1;
if ( &NewLevelList->m_listName != a2 )
{
m_bigStorage = a2;
if ( a2->m_data.m_capacity > 0xF )
m_bigStorage = (std::string *)a2->m_data.m_bigStorage;
sub_14003CCE0((void **)&NewLevelList->m_listName, m_bigStorage, a2->m_data.m_size);
}
LevelBrowserLayer::loadPage((LevelBrowserLayer *)(a1 - 584), *(GJSearchObject **)(a1 + 80));
}
sub_14003A830((__int64)a2);
}