//
// LevelStatsInfoPopup::decodeProgress from 0x140427c70 to 0x140427e2e (446 bytes)
//
// 2 xrefs:
// > LevelStatsInfoPopup::buildInfoText @ 0x140427bc2
// > ??> @ 0x1409269fc
//
// 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:32:11 +0000
//
// Hidden C++ exception states: #wind=2
__int64 __fastcall LevelStatsInfoPopup::decodeProgress(__int64 a1, __int64 a2, _QWORD *a3)
{
__int64 v5; // rcx
__int64 v6; // rbp
int v7; // r14d
unsigned __int64 v8; // rdi
bool v9; // zf
_QWORD *v10; // rax
unsigned __int64 v11; // rcx
_QWORD *v12; // rdx
const char *v13; // rcx
cocos2d::CCString *v14; // rax
char *CString; // rax
size_t v16; // r8
char **v17; // rax
unsigned __int64 v18; // rcx
char *String[2]; // [rsp+30h] [rbp-68h] BYREF
__int64 v21; // [rsp+40h] [rbp-58h]
unsigned __int64 v22; // [rsp+48h] [rbp-50h]
__int128 Src; // [rsp+50h] [rbp-48h] BYREF
__int128 v24; // [rsp+60h] [rbp-38h]
v5 = a3[2];
if ( v5 )
{
Src = 0;
v6 = 0;
*(_QWORD *)&v24 = 0;
*((_QWORD *)&v24 + 1) = 15;
LOBYTE(Src) = 0;
*(_OWORD *)String = 0;
v21 = 0;
v22 = 15;
LOBYTE(String[0]) = 0;
v7 = 0;
v8 = 0;
v9 = v5 == 0;
do
{
if ( v9 )
goto LABEL_11;
v10 = a3;
v11 = a3[3];
if ( v11 > 0xF )
v10 = (_QWORD *)*a3;
if ( *((_BYTE *)v10 + v8) == 44 )
{
LABEL_11:
if ( v21 )
{
v13 = (const char *)String;
if ( v22 > 0xF )
v13 = String[0];
v7 += atoi(v13);
if ( v6 )
sub_140044D80(&Src, " ", 1u);
v14 = cocos2d::CCString::createWithFormat("%i%%", v7);
CString = (char *)cocos2d::CCString::getCString(v14);
v16 = -1;
do
++v16;
while ( CString[v16] );
sub_140044D80(&Src, CString, v16);
v21 = 0;
v17 = String;
if ( v22 > 0xF )
v17 = (char **)String[0];
*(_BYTE *)v17 = 0;
v6 = v24;
}
}
else
{
v12 = a3;
if ( v11 > 0xF )
v12 = (_QWORD *)*a3;
sub_14003DBD0((void **)String, *((_BYTE *)v12 + v8));
}
++v8;
v18 = a3[2];
v9 = v8 == v18;
}
while ( v8 <= v18 );
*(_OWORD *)a2 = Src;
*(_OWORD *)(a2 + 16) = v24;
sub_14003D310((__int64)String);
}
else
{
*(_OWORD *)a2 = 0;
*(_QWORD *)(a2 + 16) = 0;
*(_QWORD *)(a2 + 24) = 15;
*(_BYTE *)a2 = 0;
}
return a2;
}