//
// cocos2d::CCProgressTimer::updateBar from 0x18005e320 to 0x18005ea54 (1844 bytes)
//
// 8 xrefs:
// > cocos2d::CCProgressTimer::initWithSprite @ 0x18005de4b
// > cocos2d::CCProgressTimer::setPercentage @ 0x18005e0bd
// > cocos2d::CCProgressTimer::updateProgress @ 0x18005eacf
// > ??> @ 0x18013942c
// > ??> @ 0x180139444
// > ??> @ 0x180139454
// > ??> @ 0x1801438a8
// > ??> @ 0x1801b32b8
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
void __fastcall cocos2d::CCProgressTimer::updateBar(cocos2d::CCProgressTimer *this)
{
float *v2; // rax
float v3; // xmm1_4
float v4; // xmm0_4
float v5; // xmm0_4
float v6; // xmm2_4
float v7; // xmm0_4
cocos2d::ccV2F_C4B_T2F *m_pVertexData; // rax
cocos2d::ccV2F_C4B_T2F *v9; // rax
float *v10; // rax
GLfloat *v11; // rax
cocos2d::ccV2F_C4B_T2F *v12; // rcx
GLfloat v13; // xmm0_4
GLfloat *v14; // rax
cocos2d::ccV2F_C4B_T2F *v15; // rcx
GLfloat v16; // xmm0_4
float *v17; // rax
GLfloat *v18; // rax
cocos2d::ccV2F_C4B_T2F *v19; // rcx
GLfloat v20; // xmm0_4
GLfloat *v21; // rax
cocos2d::ccV2F_C4B_T2F *v22; // rcx
GLfloat v23; // xmm0_4
float *v24; // rax
GLfloat *v25; // rax
cocos2d::ccV2F_C4B_T2F *v26; // rcx
GLfloat v27; // xmm0_4
GLfloat *v28; // rax
cocos2d::ccV2F_C4B_T2F *v29; // rcx
GLfloat v30; // xmm0_4
float *v31; // rax
GLfloat *v32; // rax
cocos2d::ccV2F_C4B_T2F *v33; // rcx
GLfloat v34; // xmm0_4
GLfloat *v35; // rax
cocos2d::ccV2F_C4B_T2F *v36; // rcx
GLfloat v37; // xmm0_4
float *v38; // rax
GLfloat *v39; // rax
cocos2d::ccV2F_C4B_T2F *v40; // rcx
GLfloat v41; // xmm0_4
GLfloat *v42; // rax
cocos2d::ccV2F_C4B_T2F *v43; // rcx
GLfloat v44; // xmm0_4
float *v45; // rax
GLfloat *v46; // rax
cocos2d::ccV2F_C4B_T2F *v47; // rcx
GLfloat v48; // xmm0_4
GLfloat *v49; // rax
cocos2d::ccV2F_C4B_T2F *v50; // rcx
GLfloat v51; // xmm0_4
float *v52; // rax
GLfloat *v53; // rax
cocos2d::ccV2F_C4B_T2F *v54; // rcx
GLfloat v55; // xmm0_4
GLfloat *v56; // rax
cocos2d::ccV2F_C4B_T2F *v57; // rcx
GLfloat v58; // xmm0_4
float *v59; // rax
GLfloat *v60; // rax
cocos2d::ccV2F_C4B_T2F *v61; // rcx
GLfloat v62; // xmm0_4
GLfloat *v63; // rax
cocos2d::ccV2F_C4B_T2F *v64; // rcx
GLfloat v65; // xmm0_4
float *v66; // rax
GLfloat *v67; // rax
cocos2d::ccV2F_C4B_T2F *v68; // rcx
GLfloat v69; // xmm0_4
GLfloat *v70; // rax
cocos2d::ccV2F_C4B_T2F *v71; // rcx
GLfloat v72; // xmm0_4
float *v73; // rax
GLfloat *v74; // rax
cocos2d::ccV2F_C4B_T2F *v75; // rcx
GLfloat v76; // xmm0_4
GLfloat *v77; // rax
cocos2d::ccV2F_C4B_T2F *v78; // rcx
GLfloat v79; // xmm0_4
float *v80; // rax
GLfloat *v81; // rax
cocos2d::ccV2F_C4B_T2F *v82; // rcx
GLfloat v83; // xmm0_4
GLfloat *v84; // rax
cocos2d::ccV2F_C4B_T2F *v85; // rcx
GLfloat v86; // xmm0_4
float *v87; // rax
GLfloat *v88; // rax
cocos2d::ccV2F_C4B_T2F *v89; // rcx
GLfloat v90; // xmm0_4
GLfloat *v91; // rax
cocos2d::ccV2F_C4B_T2F *v92; // rcx
GLfloat v93; // xmm0_4
cocos2d::CCSprite *m_pSprite; // rax
int v95; // ecx
__int64 v96; // r8
__int64 v97; // rdx
_BYTE v98[104]; // [rsp+28h] [rbp-49h] BYREF
float v99; // [rsp+D8h] [rbp+67h] BYREF
float v100; // [rsp+DCh] [rbp+6Bh]
float v101; // [rsp+E0h] [rbp+6Fh] BYREF
float v102; // [rsp+E4h] [rbp+73h]
float v103; // [rsp+E8h] [rbp+77h] BYREF
float v104; // [rsp+F0h] [rbp+7Fh] BYREF
if ( this->m_pSprite )
{
v2 = kmVec2Fill(
&v104,
(float)(this->m_tBarChangeRate.x * (float)(this->m_fPercentage / 100.0))
+ (float)(1.0 - this->m_tBarChangeRate.x),
(float)(this->m_tBarChangeRate.y * (float)(this->m_fPercentage / 100.0))
+ (float)(1.0 - this->m_tBarChangeRate.y));
cocos2d::CCSize::operator*(v2, &v103, 0.5);
cocos2d::CCSize::operator-((float *)&this->m_tMidpoint, &v101, &v103);
cocos2d::CCSize::operator+((float *)&this->m_tMidpoint, &v99, &v103);
v3 = v101;
v4 = v99;
if ( v101 < 0.0 )
{
v4 = v99 - v101;
v3 = 0.0;
v101 = 0.0;
v99 = v4;
}
if ( v4 > 1.0 )
{
v99 = 1.0;
v3 = v3 - (float)(v4 - 1.0);
v101 = v3;
}
v5 = v102;
v6 = v100;
if ( v102 < 0.0 )
{
v6 = v100 - v102;
v5 = 0.0;
v102 = 0.0;
v100 = v6;
}
if ( v6 > 1.0 )
{
v100 = 1.0;
v7 = v5 - (float)(v6 - 1.0);
v6 = 1.0;
v102 = v7;
}
m_pVertexData = this->m_pVertexData;
if ( this->m_bReverseDirection )
{
if ( !m_pVertexData )
{
this->m_nVertexDataCount = 8;
this->m_pVertexData = (cocos2d::ccV2F_C4B_T2F *)malloc(0xA0u);
v38 = kmVec2Fill(&v104, 0.0, 1.0);
v39 = (GLfloat *)cocos2d::CCProgressTimer::textureCoordFromAlphaPoint(this, (struct cocos2d::CCPoint)v98, v38);
v40 = this->m_pVertexData;
v41 = v39[1];
v40->texCoords.u = *v39;
v40->texCoords.v = v41;
kmVec2Fill(&v104, 0.0, 1.0);
v42 = (GLfloat *)cocos2d::CCProgressTimer::vertexFromAlphaPoint(this, (struct cocos2d::CCPoint)v98);
v43 = this->m_pVertexData;
v44 = v42[1];
v43->vertices.x = *v42;
v43->vertices.y = v44;
v45 = kmVec2Fill(&v104, 0.0, 0.0);
v46 = (GLfloat *)cocos2d::CCProgressTimer::textureCoordFromAlphaPoint(this, (struct cocos2d::CCPoint)v98, v45);
v47 = this->m_pVertexData;
v48 = v46[1];
v47[1].texCoords.u = *v46;
v47[1].texCoords.v = v48;
kmVec2Fill(&v104, 0.0, 0.0);
v49 = (GLfloat *)cocos2d::CCProgressTimer::vertexFromAlphaPoint(this, (struct cocos2d::CCPoint)v98);
v50 = this->m_pVertexData;
v51 = v49[1];
v50[1].vertices.x = *v49;
v50[1].vertices.y = v51;
v52 = kmVec2Fill(&v104, 1.0, 1.0);
v53 = (GLfloat *)cocos2d::CCProgressTimer::textureCoordFromAlphaPoint(this, (struct cocos2d::CCPoint)v98, v52);
v54 = this->m_pVertexData;
v55 = v53[1];
v54[6].texCoords.u = *v53;
v54[6].texCoords.v = v55;
kmVec2Fill(&v104, 1.0, 1.0);
v56 = (GLfloat *)cocos2d::CCProgressTimer::vertexFromAlphaPoint(this, (struct cocos2d::CCPoint)v98);
v57 = this->m_pVertexData;
v58 = v56[1];
v57[6].vertices.x = *v56;
v57[6].vertices.y = v58;
v59 = kmVec2Fill(&v104, 1.0, 0.0);
v60 = (GLfloat *)cocos2d::CCProgressTimer::textureCoordFromAlphaPoint(this, (struct cocos2d::CCPoint)v98, v59);
v61 = this->m_pVertexData;
v62 = v60[1];
v61[7].texCoords.u = *v60;
v61[7].texCoords.v = v62;
kmVec2Fill(&v104, 1.0, 0.0);
v63 = (GLfloat *)cocos2d::CCProgressTimer::vertexFromAlphaPoint(this, (struct cocos2d::CCPoint)v98);
v64 = this->m_pVertexData;
v65 = v63[1];
v64[7].vertices.x = *v63;
v64[7].vertices.y = v65;
v3 = v101;
v6 = v100;
}
v66 = kmVec2Fill(&v104, v3, v6);
v67 = (GLfloat *)cocos2d::CCProgressTimer::textureCoordFromAlphaPoint(this, (struct cocos2d::CCPoint)v98, v66);
v68 = this->m_pVertexData;
v69 = v67[1];
v68[2].texCoords.u = *v67;
v68[2].texCoords.v = v69;
kmVec2Fill(&v104, v101, v100);
v70 = (GLfloat *)cocos2d::CCProgressTimer::vertexFromAlphaPoint(this, (struct cocos2d::CCPoint)v98);
v71 = this->m_pVertexData;
v72 = v70[1];
v71[2].vertices.x = *v70;
v71[2].vertices.y = v72;
v73 = kmVec2Fill(&v104, v101, v102);
v74 = (GLfloat *)cocos2d::CCProgressTimer::textureCoordFromAlphaPoint(this, (struct cocos2d::CCPoint)v98, v73);
v75 = this->m_pVertexData;
v76 = v74[1];
v75[3].texCoords.u = *v74;
v75[3].texCoords.v = v76;
kmVec2Fill(&v104, v101, v102);
v77 = (GLfloat *)cocos2d::CCProgressTimer::vertexFromAlphaPoint(this, (struct cocos2d::CCPoint)v98);
v78 = this->m_pVertexData;
v79 = v77[1];
v78[3].vertices.x = *v77;
v78[3].vertices.y = v79;
v80 = kmVec2Fill(&v104, v99, v100);
v81 = (GLfloat *)cocos2d::CCProgressTimer::textureCoordFromAlphaPoint(this, (struct cocos2d::CCPoint)v98, v80);
v82 = this->m_pVertexData;
v83 = v81[1];
v82[4].texCoords.u = *v81;
v82[4].texCoords.v = v83;
kmVec2Fill(&v104, v99, v100);
v84 = (GLfloat *)cocos2d::CCProgressTimer::vertexFromAlphaPoint(this, (struct cocos2d::CCPoint)v98);
v85 = this->m_pVertexData;
v86 = v84[1];
v85[4].vertices.x = *v84;
v85[4].vertices.y = v86;
v87 = kmVec2Fill(&v104, v99, v102);
v88 = (GLfloat *)cocos2d::CCProgressTimer::textureCoordFromAlphaPoint(this, (struct cocos2d::CCPoint)v98, v87);
v89 = this->m_pVertexData;
v90 = v88[1];
v89[5].texCoords.u = *v88;
v89[5].texCoords.v = v90;
kmVec2Fill(&v104, v99, v102);
v91 = (GLfloat *)cocos2d::CCProgressTimer::vertexFromAlphaPoint(this, (struct cocos2d::CCPoint)v98);
v92 = this->m_pVertexData;
v93 = v91[1];
v92[5].vertices.x = *v91;
v92[5].vertices.y = v93;
}
else
{
if ( !m_pVertexData )
{
this->m_nVertexDataCount = 4;
v9 = (cocos2d::ccV2F_C4B_T2F *)malloc(0x50u);
v3 = v101;
v6 = v100;
this->m_pVertexData = v9;
}
v10 = kmVec2Fill(&v104, v3, v6);
v11 = (GLfloat *)cocos2d::CCProgressTimer::textureCoordFromAlphaPoint(this, (struct cocos2d::CCPoint)v98, v10);
v12 = this->m_pVertexData;
v13 = v11[1];
v12->texCoords.u = *v11;
v12->texCoords.v = v13;
kmVec2Fill(&v104, v101, v100);
v14 = (GLfloat *)cocos2d::CCProgressTimer::vertexFromAlphaPoint(this, (struct cocos2d::CCPoint)v98);
v15 = this->m_pVertexData;
v16 = v14[1];
v15->vertices.x = *v14;
v15->vertices.y = v16;
v17 = kmVec2Fill(&v104, v101, v102);
v18 = (GLfloat *)cocos2d::CCProgressTimer::textureCoordFromAlphaPoint(this, (struct cocos2d::CCPoint)v98, v17);
v19 = this->m_pVertexData;
v20 = v18[1];
v19[1].texCoords.u = *v18;
v19[1].texCoords.v = v20;
kmVec2Fill(&v104, v101, v102);
v21 = (GLfloat *)cocos2d::CCProgressTimer::vertexFromAlphaPoint(this, (struct cocos2d::CCPoint)v98);
v22 = this->m_pVertexData;
v23 = v21[1];
v22[1].vertices.x = *v21;
v22[1].vertices.y = v23;
v24 = kmVec2Fill(&v104, v99, v100);
v25 = (GLfloat *)cocos2d::CCProgressTimer::textureCoordFromAlphaPoint(this, (struct cocos2d::CCPoint)v98, v24);
v26 = this->m_pVertexData;
v27 = v25[1];
v26[2].texCoords.u = *v25;
v26[2].texCoords.v = v27;
kmVec2Fill(&v104, v99, v100);
v28 = (GLfloat *)cocos2d::CCProgressTimer::vertexFromAlphaPoint(this, (struct cocos2d::CCPoint)v98);
v29 = this->m_pVertexData;
v30 = v28[1];
v29[2].vertices.x = *v28;
v29[2].vertices.y = v30;
v31 = kmVec2Fill(&v104, v99, v102);
v32 = (GLfloat *)cocos2d::CCProgressTimer::textureCoordFromAlphaPoint(this, (struct cocos2d::CCPoint)v98, v31);
v33 = this->m_pVertexData;
v34 = v32[1];
v33[3].texCoords.u = *v32;
v33[3].texCoords.v = v34;
kmVec2Fill(&v104, v99, v102);
v35 = (GLfloat *)cocos2d::CCProgressTimer::vertexFromAlphaPoint(this, (struct cocos2d::CCPoint)v98);
v36 = this->m_pVertexData;
v37 = v35[1];
v36[3].vertices.x = *v35;
v36[3].vertices.y = v37;
}
m_pSprite = this->m_pSprite;
if ( m_pSprite )
{
if ( this->m_pVertexData )
{
v95 = 0;
v96 = HIDWORD(*(_QWORD *)&m_pSprite->m_sQuad.tl.vertices.z);
if ( this->m_nVertexDataCount > 0 )
{
v97 = 0;
do
{
++v97;
++v95;
this->m_pVertexData[v97 - 1].colors = (cocos2d::ccColor4B)v96;
}
while ( v95 < this->m_nVertexDataCount );
}
}
}
}
}