//
// cocos2d::CCTexture2D::initWithPVRFile from 0x1800a9560 to 0x1800a9640 (224 bytes)
//
// 3 xrefs:
// > cocos2d::CCTextureCache::addPVRImage @ 0x1800ac2a8
// > ??> @ 0x18014cf68
// > ??> @ 0x1801c1f20
//
// 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 11:22:16 +0000
//
// Hidden C++ exception states: #wind=1
__int64 __fastcall cocos2d::CCTexture2D::initWithPVRFile(cocos2d::CCTexture2D *this, char *a2)
{
__int64 v4; // rax
__int64 v5; // rbx
__int64 result; // rax
unsigned __int8 v7; // di
int v8; // edx
int v9; // ecx
float *v10; // rax
__int64 v11; // [rsp+40h] [rbp+18h] BYREF
v4 = sub_1800E4AC0(0x158u);
v11 = v4;
if ( v4 )
v5 = cocos2d::CCTexturePVR::CCTexturePVR(v4);
else
v5 = 0;
result = cocos2d::CCTexturePVR::initWithContentsOfFile((cocos2d::CCObject *)v5, a2);
v7 = result;
if ( (_BYTE)result )
{
*(_BYTE *)(v5 + 331) = 1;
*((_DWORD *)this + 18) = *(_DWORD *)(v5 + 324);
*((_DWORD *)this + 19) = 1065353216;
*((_DWORD *)this + 20) = 1065353216;
v8 = *(_DWORD *)(v5 + 316);
*((_DWORD *)this + 16) = v8;
v9 = *(_DWORD *)(v5 + 320);
*((_DWORD *)this + 17) = v9;
v10 = kmVec2Fill((float *)&v11, (float)v8, (float)v9);
cocos2d::CCSize::operator=((_DWORD *)this + 21, v10);
*((_BYTE *)this + 92) = byte_1801B3AC8;
*((_DWORD *)this + 15) = *(_DWORD *)(v5 + 332);
*((_BYTE *)this + 93) = *(_DWORD *)(v5 + 312) > 1u;
cocos2d::CCObject::release((cocos2d::CCObject *)v5);
return v7;
}
return result;
}