//
// CCSpriteGrayscale::createWithTexture from 0x1006c3fb0 to 0x1006c4087 (215 bytes)
//
// 0 xrefs:
//
// 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:33 +0000
//
_QWORD *__fastcall CCSpriteGrayscale::createWithTexture(__int64 a1)
{
_QWORD *v1; // rax
_QWORD *v2; // rbx
__m128 v4; // [rsp+8h] [rbp-38h] BYREF
_QWORD v5[5]; // [rsp+18h] [rbp-28h] BYREF
v1 = operator new(0x298u, &std::nothrow);
if ( !v1 )
return nullptr;
v2 = v1;
__bzero(v1, 664);
cocos2d::CCSprite::CCSprite((__int64)v2);
*v2 = off_100B8DBB8;
v2[40] = off_100B8E0B8;
v2[43] = off_100B8E138;
sub_1002787F0(&v4, (unsigned __int64 *)&unk_100BE60D8);
(*(void (__fastcall **)(_QWORD *, __int64))(*(_QWORD *)a1 + 144LL))(v5, a1);
sub_100278660(&v4.i64[1], v5);
if ( !(*(unsigned __int8 (__fastcall **)(_QWORD *, __int64, __m128 *))(*v2 + 1016LL))(v2, a1, &v4) )
{
(*(void (__fastcall **)(_QWORD *))(*v2 + 16LL))(v2);
return nullptr;
}
cocos2d::CCObject::autorelease((__int64)v2);
return v2;
}