//
// InfoLayer::onRefreshComments from 0x1403d0330 to 0x1403d0494 (356 bytes)
//
// 4 xrefs:
// > InfoLayer::bulkCommentDeleteFinished @ 0x1403d4160
// > InfoLayer::keyDown @ 0x1403d453e
// > InfoLayer::init @ 0x1403cfc40
// > ??> @ 0x14092468c
//
// 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 11:31:35 +0000
//
// Hidden C++ exception states: #wind=3
__int64 __fastcall InfoLayer::onRefreshComments(__int64 a1)
{
__int64 v2; // rcx
__int64 result; // rax
__int64 v4; // rcx
char v5; // cl
int v6; // edi
__int64 v7; // rax
int ID; // esi
__int64 v9; // rcx
__int64 v10; // r8
void *v11; // [rsp+40h] [rbp+18h]
void *v12; // [rsp+40h] [rbp+18h]
void *v13; // [rsp+40h] [rbp+18h]
v2 = *(_QWORD *)&qword_14090BFB0;
if ( !*(_QWORD *)&qword_14090BFB0 )
{
v11 = operator new(0x690u);
*(_QWORD *)&qword_14090BFB0 = GameLevelManager::GameLevelManager((__int64)v11);
(*(void (__fastcall **)(_QWORD))(**(_QWORD **)&qword_14090BFB0 + 72LL))(*(_QWORD *)&qword_14090BFB0);
v2 = *(_QWORD *)&qword_14090BFB0;
}
result = (unsigned int)GameLevelManager::getTimeLeft(v2, "upd_comments", 5.0) - 1;
if ( (unsigned int)result > 4 )
{
v4 = *(_QWORD *)&qword_14090BFB0;
if ( !*(_QWORD *)&qword_14090BFB0 )
{
v12 = operator new(0x690u);
*(_QWORD *)&qword_14090BFB0 = GameLevelManager::GameLevelManager((__int64)v12);
(*(void (__fastcall **)(_QWORD))(**(_QWORD **)&qword_14090BFB0 + 72LL))(*(_QWORD *)&qword_14090BFB0);
v4 = *(_QWORD *)&qword_14090BFB0;
}
GameLevelManager::makeTimeStamp(v4, "upd_comments");
v5 = *(_BYTE *)(a1 + 888);
if ( v5 )
v6 = (*(_QWORD *)(a1 + 704) != 0) + 4;
else
v6 = *(_DWORD *)(a1 + 884);
v7 = *(_QWORD *)(a1 + 704);
if ( v7 && v5 )
ID = *(_DWORD *)(v7 + 392);
else
ID = InfoLayer::getID((_QWORD *)a1);
v9 = *(_QWORD *)&qword_14090BFB0;
if ( !*(_QWORD *)&qword_14090BFB0 )
{
v13 = operator new(0x690u);
*(_QWORD *)&qword_14090BFB0 = GameLevelManager::GameLevelManager((__int64)v13);
(*(void (__fastcall **)(_QWORD))(**(_QWORD **)&qword_14090BFB0 + 72LL))(*(_QWORD *)&qword_14090BFB0);
v9 = *(_QWORD *)&qword_14090BFB0;
}
GameLevelManager::resetCommentTimersForLevelID(v9, ID, v6);
LOBYTE(v10) = 1;
return InfoLayer::loadPage(a1, 0, v10);
}
return result;
}