//
// DeathHistogram::rebuildAxis from 0x766d48 to 0x7672a4 (1372 bytes)
//
// 4 xrefs:
// > DeathHistogram::setProgression @ 0x7674f0
// > DeathHistogram::setData @ 0x767b34
// > DeathHistogram::setSurvival @ 0x767e94
// > DeathHistogram::setAttemptLine @ 0x768464
//
// 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:59:08 +0000
//
_DWORD *__fastcall DeathHistogram::rebuildAxis(
cocos2d::CCDrawNode **this,
cocos2d::CCLabelBMFont *a2,
int a3,
float a4,
float a5,
cocos2d::CCLabelBMFont *a6)
{
float v8; // s18
const char *v9; // r2
int v10; // r11
void (__fastcall *v11)(int, _DWORD *); // r2
void (__fastcall *v12)(int, _DWORD *); // r6
float v13; // s16
__int64 v14; // r0
float v15; // s16
int v16; // r11
void (__fastcall *v17)(int, _DWORD *); // r3
void (__fastcall *v18)(int, _DWORD *); // r6
const char *v19; // r1
int v20; // r6
void (__fastcall *v21)(int, _DWORD *); // r3
float v22; // s18
float v23; // r0
float v24; // s18
float v25; // r0
const char *v26; // r2
int v27; // r6
void (__fastcall *v28)(int, _DWORD *); // r11
void (__fastcall *v29)(int, _DWORD *); // r3
void (__fastcall *v30)(int, _DWORD *); // r8
float v31; // s15
float v32; // s16
int v33; // r9
int v34; // r2
int v35; // r3
_DWORD *result; // r0
int v37; // r10
int v38; // r6
float v39; // s15
float v40; // s17
float i; // s18
int v42; // r7
int v43; // r9
float v44; // r1
cocos2d::CCString *v45; // r0
cocos2d::CCLabelBMFont *CString; // r0
const char *v47; // r2
int v48; // r7
void (__fastcall *v49)(int, _BYTE *); // r11
void (__fastcall *v50)(int, _BYTE *); // r3
void (__fastcall *v51)(int, _BYTE *); // r11
cocos2d::CCString *v54; // [sp+14h] [bp-48h]
_BYTE v55[8]; // [sp+24h] [bp-38h] BYREF
_BYTE v56[8]; // [sp+2Ch] [bp-30h] BYREF
_DWORD v57[4]; // [sp+34h] [bp-28h] BYREF
_DWORD v58[4]; // [sp+44h] [bp-18h] BYREF
cocos2d::CCDrawNode::clear(*(this + 69));
(*(void (__fastcall **)(_DWORD))(*(_DWORD *)*(this + 70) + 288))(*(this + 70));
v8 = (float)((float)(*((float *)this + 66) - 22.0) * 0.5) + 22.0;
v10 = cocos2d::CCLabelBMFont::create(a6, "bigFont.fnt", v9);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v10 + 80))(v10, 1048911544);
v11 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v10 + 536);
BYTE2(v58[0]) = 120;
LOWORD(v58[0]) = -14081;
v11(v10, v58);
v12 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v10 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v58, v8, 12.0);
v12(v10, v58);
(*(void (__fastcall **)(_DWORD, int))(*(_DWORD *)*(this + 70) + 228))(*(this + 70), v10);
v13 = *(float *)(*(int (__fastcall **)(int))(*(_DWORD *)v10 + 164))(v10);
v14 = ((__int64 (__fastcall *)(int))*(_DWORD *)(*(_DWORD *)v10 + 84))(v10);
v15 = (float)(v13 * *(float *)&v14) * 0.5;
v16 = cocos2d::CCSprite::createWithSpriteFrameName(
(cocos2d::CCSprite *)"edit_leftBtn_001.png",
(const char *)HIDWORD(v14));
(*(void (__fastcall **)(int, int))(*(_DWORD *)v16 + 64))(v16, 1055286886);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v16 + 72))(v16, 1050757038);
v17 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v16 + 480);
BYTE2(v58[0]) = 120;
LOWORD(v58[0]) = -14081;
v17(v16, v58);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v16 + 456))(v16, 100);
v18 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v16 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v58, (float)(v8 - v15) - 16.0, 12.0);
v18(v16, v58);
(*(void (__fastcall **)(_DWORD, int))(*(_DWORD *)*(this + 70) + 228))(*(this + 70), v16);
v20 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"edit_rightBtn_001.png", v19);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v20 + 64))(v20, 1055286886);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v20 + 72))(v20, 1050757038);
v21 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v20 + 480);
BYTE2(v58[0]) = 120;
LOWORD(v58[0]) = -14081;
v21(v20, v58);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v20 + 456))(v20, 100);
v54 = *(cocos2d::CCString **)(*(_DWORD *)v20 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v58, (float)(v8 + v15) + 16.0, 12.0);
((void (__fastcall *)(int, _DWORD *))v54)(v20, v58);
(*(void (__fastcall **)(_DWORD, int))(*(_DWORD *)*(this + 70) + 228))(*(this + 70), v20);
v22 = COERCE_FLOAT((*(int (__fastcall **)(int))(*(_DWORD *)v16 + 112))(v16));
v23 = (*(float (__fastcall **)(int))(*(_DWORD *)v16 + 120))(v16);
cocos2d::CCRect::CCRect((cocos2d::CCRect *)v58, v22 - 10.0, v23 - 10.0, 20.0, 20.0);
cocos2d::CCRect::operator=(this + 72, v58);
v24 = COERCE_FLOAT((*(int (__fastcall **)(int))(*(_DWORD *)v20 + 112))(v20));
v25 = (*(float (__fastcall **)(int))(*(_DWORD *)v20 + 120))(v20);
cocos2d::CCRect::CCRect((cocos2d::CCRect *)v58, v24 - 10.0, v25 - 10.0, 20.0, 20.0);
cocos2d::CCRect::operator=(this + 76, v58);
v27 = cocos2d::CCLabelBMFont::create(a2, "bigFont.fnt", v26);
v28 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v27 + 148);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v58, 0.0, 0.5);
v28(v27, v58);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v27 + 80))(v27, 1045220557);
v29 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v27 + 536);
BYTE2(v58[0]) = 120;
LOWORD(v58[0]) = -14081;
v29(v27, v58);
v30 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v27 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v58, 12.0, (float)(a4 + a5) + 19.0);
v30(v27, v58);
(*(void (__fastcall **)(_DWORD, int))(*(_DWORD *)*(this + 70) + 228))(*(this + 70), v27);
v31 = *((float *)this + 66);
v57[2] = 1055957975;
v58[2] = 1055957975;
v57[0] = 1065353216;
v32 = v31 - 4.0;
v57[1] = 1061729337;
v58[0] = 1065353216;
v58[1] = 1061729337;
v58[3] = 1041865114;
v33 = (int)*(this + 69);
v57[3] = 0.5;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v55, 22.0, a4);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v56, 22.0, (float)(a4 + a5) + 6.0);
((void (__fastcall *)(_DWORD, _DWORD, _DWORD, _DWORD, _DWORD))cocos2d::CCDrawNode::drawSegment)(
v33,
v55,
v56,
0.5,
v57);
if ( a3 <= 7 )
v34 = 1;
else
v34 = a3 >> 2;
v35 = 0;
while ( 1 )
{
result = dword_BF0A0C;
v37 = dword_BF0A0C[v35];
if ( v37 >= v34 )
break;
if ( ++v35 == 13 )
{
v37 = 10000;
break;
}
}
v38 = 0;
while ( v38 <= a3 )
{
v39 = (float)v38 / (float)a3;
v40 = a4 + (float)(a5 * v39);
if ( !v38 )
{
v42 = (int)*(this + 69);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v55, 22.0, a4 + (float)(a5 * v39));
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v56, v32, a4 + (float)(a5 * v39));
cocos2d::CCDrawNode::drawSegment(v42, v55, v56, 1056964608, v57);
LABEL_19:
v45 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%i", (const char *)v38);
goto LABEL_24;
}
for ( i = 25.0; i < v32; i = i + 5.0 )
{
v43 = (int)*(this + 69);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v55, i, v40);
if ( (float)(i + 2.0) <= v32 )
v44 = i + 2.0;
else
v44 = v32;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v56, v44, v40);
cocos2d::CCDrawNode::drawSegment(v43, v55, v56, 1056964608, v58);
}
if ( v38 < 1000 )
goto LABEL_19;
if ( v38 % 1000 )
v45 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"%i.%ik",
(const char *)(v38 / 1000),
v38 % 1000 / 100);
else
v45 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"%ik",
(const char *)(v38 / 1000));
LABEL_24:
CString = (cocos2d::CCLabelBMFont *)cocos2d::CCString::getCString(v45);
v38 += v37;
v48 = cocos2d::CCLabelBMFont::create(CString, "chatFont.fnt", v47);
v49 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v48 + 148);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v56, 1.0, 0.5);
v49(v48, v56);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v48 + 80))(v48, 1057803469);
v50 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v48 + 536);
v56[0] = -1;
v56[1] = -56;
v56[2] = 120;
v50(v48, v56);
v51 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v48 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v56, 18.0, v40);
v51(v48, v56);
result = (_DWORD *)(*(int (__fastcall **)(_DWORD, int))(*(_DWORD *)*(this + 70) + 228))(*(this + 70), v48);
}
return result;
}