//
// cocos2d::CCTexture2D::initWithString from 0x1800a9640 to 0x1800a9747 (263 bytes)
//
// 3 xrefs:
// > ??> @ 0x18014cf68
// > ??> @ 0x1801c1f20
// > ??> @ 0x1801c1f2c
//
// 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:17 +0000
//
// Hidden C++ exception states: #wind=1
char __fastcall cocos2d::CCTexture2D::initWithString(cocos2d::CCTexture2D *this, const char *a2, char *a3, float a4)
{
float *v7; // rdi
cocos2d::CCImage *v8; // rax
unsigned __int16 *v9; // rbx
char result; // al
unsigned int v11; // esi
unsigned int v12; // edi
cocos2d::CCInteger *v13; // rax
unsigned int Value; // eax
char inited; // di
float v16; // [rsp+40h] [rbp-28h] BYREF
cocos2d::CCImage *v17; // [rsp+48h] [rbp-20h]
v7 = kmVec2Fill(&v16, 0.0, 0.0);
v8 = (cocos2d::CCImage *)sub_1800E4AC0(0x50u);
v17 = v8;
if ( v8 )
v9 = (unsigned __int16 *)cocos2d::CCImage::CCImage(v8);
else
v9 = nullptr;
if ( !v9 )
return 0;
result = cocos2d::CCImage::initWithString((__int64)v9, a2, (int)*v7, (int)v7[1], 19, a3, (int)a4);
if ( result )
{
v11 = v9[28];
v12 = v9[29];
v13 = cocos2d::CCConfiguration::sharedConfiguration();
Value = cocos2d::CCInteger::getValue(v13);
if ( v11 > Value || v12 > Value )
{
cocos2d::CCObject::release((cocos2d::CCObject *)v9);
return 0;
}
else
{
inited = cocos2d::CCTexture2D::initPremultipliedATextureWithImage(this, (struct cocos2d::CCImage *)v9, v11, v12);
cocos2d::CCObject::release((cocos2d::CCObject *)v9);
return inited;
}
}
return result;
}