//
// cocos2d::CCProgressTimer::draw from 0x1006de0d0 to 0x1006de286 (438 bytes)
//
// 1 xrefs:
// > ??> @ 0x100b922d8
//
// This function is hookable on this platform (idp: pc, 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 12:35:43 +0000
//
void __fastcall cocos2d::CCProgressTimer::draw(__int64 a1, __m128 a2)
{
__int64 v2; // rax
__int64 v3; // rax
GLenum v4; // r14d
GLenum v5; // rax^4
__int64 v6; // rax
GLuint v7; // eax
int v8; // eax
GLsizei v9; // edx
GLenum v10; // edi
if ( *(_QWORD *)(a1 + 368) && *(_QWORD *)(a1 + 352) )
{
cocos2d::ccGLEnable();
(*(void (__fastcall **)(__int64))(*(_QWORD *)a1 + 656LL))(a1);
v2 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a1 + 656LL))(a1);
cocos2d::CCGLProgram::use(v2);
v3 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a1 + 656LL))(a1);
cocos2d::CCGLProgram::setUniformsForBuiltins(v3, a2);
v4 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 352) + 1088LL))(*(_QWORD *)(a1 + 352));
v5 = (unsigned __int64)(*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 352) + 1088LL))(*(_QWORD *)(a1 + 352)) >> 32;
cocos2d::ccGLBlendFunc(v4, v5);
cocos2d::ccGLEnableVertexAttribs(7);
v6 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 352) + 1072LL))(*(_QWORD *)(a1 + 352));
v7 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v6 + 104LL))(v6);
cocos2d::ccGLBindTexture2D(v7);
glVertexAttribPointer(0, 2, 0x1406u, 0, 20, *(const GLvoid **)(a1 + 368));
glVertexAttribPointer(2u, 2, 0x1406u, 0, 20, (const GLvoid *)(*(_QWORD *)(a1 + 368) + 12LL));
glVertexAttribPointer(1u, 4, 0x1401u, 1u, 20, (const GLvoid *)(*(_QWORD *)(a1 + 368) + 8LL));
v8 = *(_DWORD *)(a1 + 340);
if ( v8 == 1 )
{
v9 = *(_DWORD *)(a1 + 360);
if ( !*(_BYTE *)(a1 + 392) )
{
v10 = 5;
goto LABEL_9;
}
glDrawArrays(5u, 0, v9 / 2);
glDrawArrays(5u, 4, *(_DWORD *)(a1 + 360) / 2);
++dword_100BE8BE8;
}
else if ( !v8 )
{
v9 = *(_DWORD *)(a1 + 360);
v10 = 6;
LABEL_9:
glDrawArrays(v10, 0, v9);
}
++dword_100BE8BE8;
}
}