//
// sub_1004CF638 from 0x1004cf638 to 0x1004cf85c (548 bytes)
//
// 2 xrefs:
// > EditorSoundConfigCell::loadFromConfig @ 0x1004cf014
// > EditorSoundConfigCell::loadFromConfig @ 0x1004cf508
//
// This function is hookable on this platform (idp: arm, 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:06:27 +0000
//
__int64 __fastcall sub_1004CF638(__int64 a1, float a2, float a3, float a4)
{
__int64 *v8; // x20
__int64 v9; // x22
void *v10; // x0
const char *CString; // x0
__int64 v12; // x23
void *v13; // x21
__int64 *v14; // x19
void *v15; // x0
const char *v16; // x0
__int64 v17; // x21
void *v18; // x19
float v20; // [xsp+8h] [xbp-68h] BYREF
v8 = *(__int64 **)a1;
v9 = *(_QWORD *)(a1 + 8);
v10 = sub_1003065B0("Actions: %d", *(_DWORD *)(*(_QWORD *)(v9 + 552) + 352LL));
CString = (const char *)cocos2d::CCString::getCString((__int64)v10);
v12 = *v8;
v13 = cocos2d::CCLabelBMFont::create_1(CString, "chatFont.fnt");
sub_1000262BC(&v20, 1.0, 0.5);
(*(void (__fastcall **)(void *, float *))(*(_QWORD *)v13 + 296LL))(v13, &v20);
BYTE2(v20) = 0;
LOWORD(v20) = 0;
(*(void (__fastcall **)(void *, float *))(*(_QWORD *)v13 + 1072LL))(v13, &v20);
(*(void (__fastcall **)(void *, __int64))(*(_QWORD *)v13 + 1024LL))(v13, 175);
cocos2d::CCLabelBMFont::limitLabelWidth((__int64)v13, 90.0, 0.6, 0.0);
sub_1000262BC(&v20, (float)(*(float *)(v12 + 520) - a2) + -21.0, a3);
(*(void (__fastcall **)(void *, float *))(*(_QWORD *)v13 + 184LL))(v13, &v20);
(*(void (__fastcall **)(_QWORD, void *))(**(_QWORD **)(v12 + 536) + 456LL))(*(_QWORD *)(v12 + 536), v13);
v14 = *(__int64 **)a1;
v15 = sub_1003065B0("Sounds: %d", *(_DWORD *)(*(_QWORD *)(v9 + 552) + 356LL));
v16 = (const char *)cocos2d::CCString::getCString((__int64)v15);
v17 = *v14;
v18 = cocos2d::CCLabelBMFont::create_1(v16, "chatFont.fnt");
sub_1000262BC(&v20, 1.0, 0.5);
(*(void (__fastcall **)(void *, float *))(*(_QWORD *)v18 + 296LL))(v18, &v20);
BYTE2(v20) = 0;
LOWORD(v20) = 0;
(*(void (__fastcall **)(void *, float *))(*(_QWORD *)v18 + 1072LL))(v18, &v20);
(*(void (__fastcall **)(void *, __int64))(*(_QWORD *)v18 + 1024LL))(v18, 175);
cocos2d::CCLabelBMFont::limitLabelWidth((__int64)v18, 90.0, 0.6, 0.0);
sub_1000262BC(&v20, (float)(*(float *)(v17 + 520) - a2) + -21.0, a4);
(*(void (__fastcall **)(void *, float *))(*(_QWORD *)v18 + 184LL))(v18, &v20);
return (*(__int64 (__fastcall **)(_QWORD, void *))(**(_QWORD **)(v17 + 536) + 456LL))(*(_QWORD *)(v17 + 536), v18);
}