//
// cocos2d::CCGLProgram::initWithVertexShaderFilename from 0xd82584 to 0xd8268c (264 bytes)
//
// 1 xrefs:
// > ??> @ 0x419c8
//
// 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:08:10 +0000
//
__int64 __fastcall cocos2d::CCGLProgram::initWithVertexShaderFilename(
cocos2d::CCGLProgram *this,
const char *a2,
const char *a3)
{
__int64 v5; // x0
cocos2d::CCString *v6; // x0
cocos2d::CCObject *v7; // x0
char *CString; // x21
cocos2d::CCFileUtils *v9; // x0
__int64 v10; // x0
cocos2d::CCString *v11; // x0
cocos2d::CCObject *v12; // x0
char *v13; // x2
char *v16; // [xsp+48h] [xbp+48h]
cocos2d::CCString *v17[2]; // [xsp+50h] [xbp+50h] BYREF
cocos2d::CCString *v18; // [xsp+60h] [xbp+60h]
v5 = cocos2d::CCFileUtils::sharedFileUtils(_stack_chk_guard);
(*(void (__fastcall **)(cocos2d::CCString **__return_ptr, __int64, const char *, _QWORD))(*(_QWORD *)v5 + 48LL))(
v17,
v5,
a2,
0);
v6 = (cocos2d::CCString *)((char *)v17 + 1);
if ( ((__int64)v17[0] & 1) != 0 )
v6 = v18;
v7 = cocos2d::CCString::createWithContentsOfFile(v6, (const char *)LOBYTE(v17[0]));
CString = cocos2d::CCString::getCString(v7);
v9 = (cocos2d::CCFileUtils *)LOBYTE(v17[0]);
if ( ((__int64)v17[0] & 1) != 0 )
operator delete(v18);
v10 = cocos2d::CCFileUtils::sharedFileUtils(v9);
(*(void (__fastcall **)(cocos2d::CCString **__return_ptr, __int64, const char *, _QWORD))(*(_QWORD *)v10 + 48LL))(
v17,
v10,
a3,
0);
v11 = (cocos2d::CCString *)((char *)v17 + 1);
if ( ((__int64)v17[0] & 1) != 0 )
v11 = v18;
v12 = cocos2d::CCString::createWithContentsOfFile(v11, (const char *)LOBYTE(v17[0]));
v13 = cocos2d::CCString::getCString(v12);
if ( ((__int64)v17[0] & 1) != 0 )
{
v16 = v13;
operator delete(v18);
v13 = v16;
}
return cocos2d::CCGLProgram::initWithVertexShaderByteArray(this, CString, v13);
}