//
// SongUsagePopup::buildStatRow from 0x1401033d0 to 0x14010373c (876 bytes)
//
// 4 xrefs:
// > SongUsagePopup::songUsageFinished @ 0x140102d9c
// > ??> @ 0x140895880
// > ??> @ 0x1408958c8
// > ??> @ 0x1409158e4
//
// 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:26:43 +0000
//
__int64 __fastcall SongUsagePopup::buildStatRow(__int64 a1, __int64 a2, const char *a3, int a4, float a5)
{
__int64 v9; // rax
__int64 v10; // r14
float v11; // xmm6_4
__int64 v12; // r12
const char *v13; // r15
const char *v14; // rcx
struct cocos2d::CCSprite *v15; // rdi
__int64 v16; // rbx
__int64 v17; // rax
__int64 v18; // rcx
__int64 v19; // rbx
float v20; // xmm7_4
__int64 v21; // rax
const char *v22; // rcx
struct cocos2d::CCLabelBMFont *v23; // rdi
__int64 v24; // rbx
__int64 v25; // rax
__int64 v26; // rbx
__int64 v27; // rax
float v28; // xmm6_4
__int64 v29; // rbx
__int64 v30; // rax
char v32[8]; // [rsp+20h] [rbp-C8h] BYREF
char v33[8]; // [rsp+28h] [rbp-C0h] BYREF
char v34[8]; // [rsp+30h] [rbp-B8h] BYREF
char v35[8]; // [rsp+38h] [rbp-B0h] BYREF
_BYTE v36[16]; // [rsp+40h] [rbp-A8h] BYREF
float v37; // [rsp+F0h] [rbp+8h] BYREF
v9 = cocos2d::CCDirector::sharedDirector(a1);
cocos2d::CCDirector::getWinSize(v9, &v37);
v10 = cocos2d::CCNode::create();
(*(void (__fastcall **)(_QWORD, __int64, __int64))(**(_QWORD **)(a1 + 584) + 456LL))(*(_QWORD *)(a1 + 584), v10, 2);
v11 = 0.0;
if ( a4 > 0 )
{
v12 = (unsigned int)a4;
v13 = &a3[-a2];
do
{
v14 = (const char *)a2;
if ( *(_QWORD *)(a2 + 24) > 0xFu )
v14 = *(const char **)a2;
v15 = cocos2d::CCSprite::createWithSpriteFrameName(v14);
v16 = *(_QWORD *)v15;
(*(__int64 (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v15 + 320LL))(v15);
(*(void (__fastcall **)(struct cocos2d::CCSprite *))(v16 + 160))(v15);
v17 = a2;
if ( *(_QWORD *)(a2 + 24) > 0xFu )
v17 = *(_QWORD *)a2;
if ( *(_QWORD *)(a2 + 16) == 18 )
{
v18 = *(_QWORD *)v17 - 0x634974726F707865LL;
if ( *(_QWORD *)v17 == 0x634974726F707865LL )
{
v18 = *(_QWORD *)(v17 + 8) - 0x702E3130305F6E6FLL;
if ( *(_QWORD *)(v17 + 8) == 0x702E3130305F6E6FLL )
v18 = *(unsigned __int16 *)(v17 + 16) - 26478LL;
}
if ( !v18 )
{
v19 = *(_QWORD *)v15;
(*(void (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v15 + 168LL))(v15);
(*(void (__fastcall **)(struct cocos2d::CCSprite *))(v19 + 160))(v15);
}
}
(*(void (__fastcall **)(__int64, struct cocos2d::CCSprite *, __int64))(*(_QWORD *)v10 + 456LL))(v10, v15, 2);
v20 = *(float *)(*(__int64 (__fastcall **)(struct cocos2d::CCSprite *, char *))(*(_QWORD *)v15 + 328LL))(v15, v32);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v33, (float)(v20 * 0.5) + v11, 0.0);
(*(void (__fastcall **)(struct cocos2d::CCSprite *, __int64))(*(_QWORD *)v15 + 184LL))(v15, v21);
v22 = a3;
if ( *(_QWORD *)&v13[a2 + 24] > 0xFu )
v22 = *(const char **)&v13[a2];
v23 = cocos2d::CCLabelBMFont::create(v22, (const char *)&qword_140704F78);
v24 = *(_QWORD *)v23;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v34, 0.0, 0.5);
(*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *, __int64))(v24 + 288))(v23, v25);
(*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *))(*(_QWORD *)v23 + 160LL))(v23);
(*(void (__fastcall **)(__int64, struct cocos2d::CCLabelBMFont *, __int64))(*(_QWORD *)v10 + 456LL))(v10, v23, 2);
v26 = *(_QWORD *)v23;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v35, (float)(v20 + v11) + 6.0, 0.0);
(*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *, __int64))(v26 + 184))(v23, v27);
a3 += 32;
a2 += 32;
v11 = v11
+ (float)((float)((float)(v20 + 6.0)
+ *(float *)(*(__int64 (__fastcall **)(struct cocos2d::CCLabelBMFont *, _BYTE *))(*(_QWORD *)v23 + 328LL))(
v23,
v36))
+ 22.0);
--v12;
}
while ( v12 );
}
v28 = v11 - 22.0;
if ( v28 > 340.0 )
{
(*(void (__fastcall **)(__int64))(*(_QWORD *)v10 + 160LL))(v10);
v28 = 340.0;
}
v29 = *(_QWORD *)v10;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v36, (float)(v37 * 0.5) - (float)(v28 * 0.5), a5);
return (*(__int64 (__fastcall **)(__int64, __int64))(v29 + 184))(v10, v30);
}