//
// CustomSongWidget::positionInfoObjects from 0x4e2b70 to 0x4e2fc4 (1108 bytes)
//
// 2 xrefs:
// > CustomSongWidget::updateSongInfo @ 0x4e33fc
// > CustomSongWidget::init @ 0x4e4c16
//
// 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:51:02 +0000
//
int __fastcall CustomSongWidget::positionInfoObjects(CustomSongWidget *this)
{
int v2; // r6
float v3; // s16
float v4; // s15
int v5; // r7
float v6; // s16
void (__fastcall *v7)(int, _BYTE *); // r8
float v8; // s19
int v9; // r8
void (__fastcall *v10)(int, _BYTE *); // r9
int v11; // r10
int v12; // r8
void (__fastcall *v13)(int, _BYTE *); // r9
int v14; // r10
int v15; // r7
void (__fastcall *v16)(int, _BYTE *); // r8
float *v17; // r0
int v18; // r7
void (__fastcall *v19)(int, _BYTE *); // r8
int v20; // r0
int v21; // r0
_BYTE *v22; // r1
float v23; // s16
int v24; // r7
void (__fastcall *v25)(int, _BYTE *); // r8
int v26; // r7
void (__fastcall *v27)(int, _BYTE *); // r8
int v28; // r7
void (__fastcall *v29)(int, _BYTE *); // r9
int v30; // r10
int v31; // r7
int result; // r0
_BOOL4 v33; // r7
const char *v34; // r6
size_t v35; // r0
char *v36; // r1
const char *v37; // r2
cocos2d::CCString *v38; // r0
const char *CString; // r6
size_t v40; // r0
cocos2d::CCSpriteFrameCache *v41; // r0
int v42; // r6
void (__fastcall *v43)(int, int); // r8
cocos2d::CCSpriteFrameCache *v44; // r0
char *v45; // r1
int v46; // r0
int v47; // r0
int v48; // r8
int v49; // r11
int v50; // r5
void (__fastcall *v51)(int, _BYTE *); // r8
int v52; // r11
float v53; // r1
int v54; // r11
int v55; // r8
float v56; // r7
int v57; // r11
void (__fastcall *v58)(int, _BYTE *); // [sp+0h] [bp-3Ch]
void (__fastcall *v59)(int, _BYTE *); // [sp+0h] [bp-3Ch]
void (__fastcall *v60)(int, _BYTE *); // [sp+0h] [bp-3Ch]
_BYTE v61[8]; // [sp+Ch] [bp-30h] BYREF
_BYTE v62[8]; // [sp+14h] [bp-28h] BYREF
int v63[2]; // [sp+1Ch] [bp-20h] BYREF
char *v64; // [sp+24h] [bp-18h]
int v65[2]; // [sp+28h] [bp-14h] BYREF
char *v66; // [sp+30h] [bp-Ch]
v2 = *((_DWORD *)this + 68);
v3 = 320.0;
if ( !*((_BYTE *)this + 357) )
v3 = 300.0;
v4 = 90.0;
if ( *((_BYTE *)this + 357) )
v4 = 50.0;
if ( v2 )
v2 = *(_DWORD *)(v2 + 312) > 0;
v5 = *((_DWORD *)this + 70);
v6 = -v3;
v7 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v5 + 92);
v8 = -v4;
if ( *((_BYTE *)this + 357) )
{
v23 = v6 * 0.5;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v62, v23 + 10.0, (float)(v4 * 0.5) - 16.0);
v7(v5, v62);
v24 = *((_DWORD *)this + 72);
v25 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v24 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v62, v23 + 11.0, (float)(v4 * 0.5) - 34.0);
v25(v24, v62);
v26 = *((_DWORD *)this + 73);
v27 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v26 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v62, 0.0, (float)(v8 * 0.5) + 3.0);
v27(v26, v62);
v28 = *((_DWORD *)this + 83);
v29 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v28 + 92);
v30 = (*(int (__fastcall **)(_DWORD))(**((_DWORD **)this + 73) + 96))(*((_DWORD *)this + 73));
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v61, 0.0, -0.5);
cocos2d::CCPoint::operator+(v62, v30, v61);
v29(v28, v62);
v31 = *((_DWORD *)this + 86);
v19 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v31 + 92);
v22 = (_BYTE *)(*(int (__fastcall **)(_DWORD))(**((_DWORD **)this + 83) + 96))(*((_DWORD *)this + 83));
v21 = v31;
}
else
{
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v62, (float)(v6 * 0.5) + 10.0, (float)(v4 * 0.5) - 16.0);
v7(v5, v62);
v9 = *((_DWORD *)this + 71);
v10 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v9 + 92);
v11 = (*(int (__fastcall **)(_DWORD))(**((_DWORD **)this + 70) + 96))(*((_DWORD *)this + 70));
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v61, 1.0, -24.0);
cocos2d::CCPoint::operator+(v62, v11, v61);
v10(v9, v62);
v12 = *((_DWORD *)this + 73);
v13 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v12 + 92);
v14 = (*(int (__fastcall **)(_DWORD))(**((_DWORD **)this + 71) + 96))(*((_DWORD *)this + 71));
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v61, 1.0, -20.0);
cocos2d::CCPoint::operator+(v62, v14, v61);
v13(v12, v62);
v15 = *((_DWORD *)this + 72);
v16 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v15 + 92);
v17 = (float *)(*(int (__fastcall **)(_DWORD))(**((_DWORD **)this + 70) + 96))(*((_DWORD *)this + 70));
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v62, *v17 + 1.0, (float)(v8 * 0.5) + 14.0);
v16(v15, v62);
v18 = *((_DWORD *)this + 83);
v19 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v18 + 92);
v20 = (*(int (__fastcall **)(_DWORD))(**((_DWORD **)this + 73) + 96))(*((_DWORD *)this + 73));
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v62, -34.0, *(float *)(v20 + 4));
v21 = v18;
v22 = v62;
}
v19(v21, v22);
result = (*(int (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 85) + 172))(*((_DWORD *)this + 85), v2);
if ( v2 )
{
v33 = *(_DWORD *)(*((_DWORD *)this + 68) + 312) == 2;
if ( *(_DWORD *)(*((_DWORD *)this + 68) + 312) == 2 )
v34 = "chompo";
else
v34 = "ncs";
v63[0] = 0;
v63[1] = 0;
v64 = nullptr;
v35 = strlen(v34);
std::string::__init(v63, v34, v35);
if ( (v63[0] & 1) != 0 )
v36 = v64;
else
v36 = (char *)v63 + 1;
if ( *((_BYTE *)this + 357) )
v37 = "small";
else
v37 = "med";
v38 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"%s_%s_001.png",
v36,
v37,
*((unsigned __int8 *)this + 357));
CString = (const char *)cocos2d::CCString::getCString(v38);
v65[0] = 0;
v65[1] = 0;
v66 = nullptr;
v40 = strlen(CString);
v41 = (cocos2d::CCSpriteFrameCache *)std::string::__init(v65, CString, v40);
v42 = *((_DWORD *)this + 85);
v43 = *(void (__fastcall **)(int, int))(*(_DWORD *)v42 + 580);
v44 = (cocos2d::CCSpriteFrameCache *)cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(v41);
if ( (v65[0] & 1) != 0 )
v45 = v66;
else
v45 = (char *)v65 + 1;
v46 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v44, v45);
v43(v42, v46);
v47 = *((_DWORD *)this + 70);
v48 = *((_DWORD *)this + 85);
if ( *((_BYTE *)this + 357) )
{
v59 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v48 + 92);
v54 = (*(int (__fastcall **)(int))(*(_DWORD *)v47 + 96))(v47);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v61, 0.0, -1.0);
cocos2d::CCPoint::operator+(v62, v54, v61);
v59(v48, v62);
v55 = *((_DWORD *)this + 70);
if ( v33 )
v56 = 45.0;
else
v56 = 37.0;
v60 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v55 + 92);
v57 = (*(int (__fastcall **)(_DWORD))(*(_DWORD *)v55 + 96))(*((_DWORD *)this + 70));
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v61, v56, 0.0);
cocos2d::CCPoint::operator+(v62, v57, v61);
v60(v55, v62);
v50 = *((_DWORD *)this + 71);
v51 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v50 + 92);
v52 = (*(int (__fastcall **)(int))(*(_DWORD *)v50 + 96))(v50);
v53 = v56;
}
else
{
v58 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v48 + 92);
v49 = (*(int (__fastcall **)(int))(*(_DWORD *)v47 + 96))(v47);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v61, 0.0, -2.0);
cocos2d::CCPoint::operator+(v62, v49, v61);
v58(v48, v62);
v50 = *((_DWORD *)this + 70);
v51 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v50 + 92);
v52 = (*(int (__fastcall **)(int))(*(_DWORD *)v50 + 96))(v50);
if ( v33 )
v53 = 61.0;
else
v53 = 53.0;
}
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v61, v53, 0.0);
cocos2d::CCPoint::operator+(v62, v52, v61);
v51(v50, v62);
std::string::~string((int)v65);
return std::string::~string((int)v63);
}
return result;
}