//
// sub_140059CE0 from 0x140059ce0 to 0x140059d6c (140 bytes)
//
// 21 xrefs:
// > sub_14004E0E0 @ 0x14004e1ef
// > sub_140059AA0 @ 0x140059aa0
// > MultilineBitmapFont::readEmoteInfo @ 0x140079d97
// > ReportPopup::init @ 0x1400c1109
// > sub_1400E4730 @ 0x1400e4b60
// > DeathHistogram::setData @ 0x1401123d6
// > DeathHistogram::setSurvival @ 0x140112e58
// > GJBaseGameLayer::dGJBaseGameLayer @ 0x14030c76b
// > GJEffectManager::dGJEffectManager @ 0x1403649fa
// > NewsPopup::rebuildPage @ 0x14049f898
// > sub_14068F1DC @ 0x14068f1e3
// > sub_14068F33B @ 0x14068f342
// > sub_140690817 @ 0x14069081e
// > sub_140690E12 @ 0x140690e19
// > sub_1406AB9D0 @ 0x1406ab9de
// > sub_1406B2441 @ 0x1406b244f
// > ??> @ 0x140892cce
// > ??> @ 0x140892e40
// > ??> @ 0x140894a89
// > ??> @ 0x140895229
// > ??> @ 0x1409105ec
//
// 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:25:41 +0000
//
void __fastcall sub_140059CE0(__int64 a1)
{
_QWORD *v2; // rcx
v2 = *(_QWORD **)a1;
if ( v2 )
{
if ( (unsigned __int64)(24 * ((*(_QWORD *)(a1 + 16) - (_QWORD)v2) / 24LL)) >= 0x1000 )
{
if ( (unsigned __int64)v2 - *(v2 - 1) - 8 > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
v2 = (_QWORD *)*(v2 - 1);
}
j_j_free(v2);
*(_QWORD *)a1 = 0;
*(_QWORD *)(a1 + 8) = 0;
*(_QWORD *)(a1 + 16) = 0;
}
}