//
// GJBaseGameLayer::refreshCounterLabels from 0x14033e280 to 0x14033e455 (469 bytes)
//
// 2 xrefs:
// > PlayLayer::resetLevel @ 0x140519981
// > ??> @ 0x14091fc7c
//
// 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:30:38 +0000
//
// Hidden C++ exception states: #wind=2
void __fastcall GJBaseGameLayer::refreshCounterLabels(__int64 a1)
{
_QWORD *v2; // r14
_QWORD *v3; // rbx
__m128i si128; // xmm6
unsigned int v5; // eax
_BYTE *v6; // rax
size_t v7; // r8
__int64 *v8; // rdi
__int64 *i; // rbp
__int64 v10; // rsi
__int128 *v11; // rdx
size_t v12; // r8
void *v13; // rcx
__int128 v14; // [rsp+30h] [rbp-2A8h] BYREF
__int64 v15; // [rsp+40h] [rbp-298h]
__int64 v16; // [rsp+48h] [rbp-290h]
__int128 v17; // [rsp+58h] [rbp-280h] BYREF
__m128i v18; // [rsp+68h] [rbp-270h]
_BYTE v19[528]; // [rsp+80h] [rbp-258h] BYREF
v2 = *(_QWORD **)(a1 + 4384);
v3 = (_QWORD *)*v2;
if ( (_QWORD *)*v2 != v2 )
{
si128 = _mm_load_si128((const __m128i *)&Size);
do
{
v17 = 0;
v18 = si128;
LOBYTE(v17) = 0;
fmt::BasicWriter::BasicWriter(v19);
v5 = GJEffectManager::countForItem(*(_QWORD *)(a1 + 2408), *((unsigned int *)v3 + 4));
fmt::BasicWriter::operator<<(v19, v5);
v6 = (_BYTE *)fmt::BasicWriter::c_str(v19);
v7 = -1;
do
++v7;
while ( v6[v7] );
sub_1400405A0((void **)&v17, v6, v7);
v8 = (__int64 *)v3[3];
for ( i = (__int64 *)v3[4]; v8 != i; ++v8 )
{
v10 = *v8;
v11 = &v17;
if ( v18.m128i_i64[1] > 0xFuLL )
v11 = (__int128 *)v17;
v14 = 0;
v15 = 0;
v16 = 0;
v12 = -1;
do
++v12;
while ( *((_BYTE *)v11 + v12) );
sub_14003D230(&v14, v11, v12);
LabelGameObject::updateLabel(v10, &v14);
}
fmt::BasicWriter::~BasicWriter(v19);
if ( v18.m128i_i64[1] > 0xFuLL )
{
v13 = (void *)v17;
if ( (unsigned __int64)(v18.m128i_i64[1] + 1) >= 0x1000 )
{
v13 = *(void **)(v17 - 8);
if ( (unsigned __int64)(v17 - (_QWORD)v13 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v13);
}
v3 = (_QWORD *)*v3;
}
while ( v3 != v2 );
}
}