//
// cocos2d::CCProgressTimer::draw from 0xd69068 to 0xd69224 (444 bytes)
//
// 2 xrefs:
// > ??> @ 0x5abb0
// > ??> @ 0x1527498
//
// 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 13:07:55 +0000
//
int *__fastcall cocos2d::CCProgressTimer::draw(int *this)
{
__int64 v1; // x19
cocos2d::CCGLProgram *v2; // x0
cocos2d::CCGLProgram *v3; // x0
unsigned int v4; // w20
unsigned int v5; // x0^4
unsigned int v6; // w2
unsigned int v7; // w1
__int64 v8; // x0
cocos2d *v9; // x0
unsigned int v10; // w1
int v11; // w0
int v12; // w1
if ( *((_QWORD *)this + 46) && *((_QWORD *)this + 44) )
{
v1 = (__int64)this;
cocos2d::ccGLEnable((unsigned int)*(this + 62));
(*(void (__fastcall **)(__int64))(*(_QWORD *)v1 + 656LL))(v1);
v2 = (cocos2d::CCGLProgram *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v1 + 656LL))(v1);
cocos2d::CCGLProgram::use(v2);
v3 = (cocos2d::CCGLProgram *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v1 + 656LL))(v1);
cocos2d::CCGLProgram::setUniformsForBuiltins(v3);
v4 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(v1 + 352) + 1088LL))(*(_QWORD *)(v1 + 352));
v5 = (unsigned __int64)(*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(v1 + 352) + 1088LL))(*(_QWORD *)(v1 + 352)) >> 32;
cocos2d::ccGLBlendFunc((cocos2d *)v4, v5, v6);
cocos2d::ccGLEnableVertexAttribs((cocos2d *)&byte_7, v7);
v8 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(v1 + 352) + 1072LL))(*(_QWORD *)(v1 + 352));
v9 = (cocos2d *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v8 + 104LL))(v8);
cocos2d::ccGLBindTexture2D(v9, v10);
glVertexAttribPointer();
glVertexAttribPointer();
glVertexAttribPointer();
v11 = *(_DWORD *)(v1 + 340);
if ( v11 )
{
if ( v11 != 1 )
{
LABEL_5:
v12 = g_uNumberOfDraws;
LABEL_6:
this = &g_uNumberOfDraws;
g_uNumberOfDraws = v12 + 1;
return this;
}
if ( *(_BYTE *)(v1 + 392) )
{
glDrawArrays();
glDrawArrays();
v12 = g_uNumberOfDraws + 1;
goto LABEL_6;
}
}
glDrawArrays();
goto LABEL_5;
}
return this;
}