//
// GJBaseGameLayer::refreshCounterLabels from 0x5be470 to 0x5be55c (236 bytes)
//
// 1 xrefs:
// > PlayLayer::resetLevel @ 0x412a14
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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:53:44 +0000
//
int __fastcall GJBaseGameLayer::refreshCounterLabels(int this)
{
_DWORD *v1; // r7
int v2; // r9
GJEffectManager *v3; // r0
int v4; // r0
const char *v5; // r8
size_t v6; // r0
int *v7; // r8
int v8; // t1
const char *v9; // r1
size_t v10; // r0
int *v11; // [sp+4h] [bp-230h]
int v12; // [sp+8h] [bp-22Ch]
const char *v13; // [sp+Ch] [bp-228h]
_DWORD v14[2]; // [sp+14h] [bp-220h] BYREF
const char *v15; // [sp+1Ch] [bp-218h]
int v16[3]; // [sp+20h] [bp-214h] BYREF
unsigned int v17[3]; // [sp+2Ch] [bp-208h] BYREF
char v18; // [sp+38h] [bp-1FCh] BYREF
v1 = *(_DWORD **)(this + 2484);
v2 = this;
while ( v1 )
{
v3 = *(GJEffectManager **)(v2 + 1524);
v15 = nullptr;
v14[0] = 0;
v14[1] = 0;
v17[0] = 0;
v17[1] = 500;
v17[2] = (unsigned int)&v18;
v4 = GJEffectManager::countForItem(v3, v1[2]);
fmt::BasicWriter::operator<<(v17, v4);
v5 = (const char *)fmt::BasicWriter::c_str((int *)v17);
v6 = strlen(v5);
std::string::assign(v14, v5, v6);
v7 = (int *)v1[3];
v11 = (int *)v1[4];
while ( v7 != v11 )
{
v8 = *v7++;
v12 = v8;
v16[0] = 0;
if ( (v14[0] & 1) != 0 )
v9 = v15;
else
v9 = (char *)v14 + 1;
v16[1] = 0;
v16[2] = 0;
v13 = v9;
v10 = strlen(v9);
std::string::__init(v16, v13, v10);
LabelGameObject::updateLabel(v12, (int)v16);
std::string::~string((int)v16);
}
fmt::internal::Array::free((int)v17);
this = std::string::~string((int)v14);
v1 = (_DWORD *)*v1;
}
return this;
}