//
// cocos2d::CCImage::_initWithRawData from 0x18007eb30 to 0x18007ebca (154 bytes)
//
// 6 xrefs:
// > cocos2d::CCImage::initWithImageData @ 0x18007fc33
// > ??> @ 0x1801453d0
// > ??> @ 0x1801453e4
// > ??> @ 0x1801453f4
// > ??> @ 0x18014cf68
// > ??> @ 0x1801bf028
//
// 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:01 +0000
//
bool __fastcall cocos2d::CCImage::_initWithRawData(
cocos2d::CCImage *this,
void *a2,
__int64 a3,
int a4,
int a5,
int a6,
bool a7)
{
size_t v9; // rdi
void *v10; // rax
if ( a4 && a5 )
{
*((_WORD *)this + 28) = a4;
*((_DWORD *)this + 15) = a6;
*((_WORD *)this + 29) = a5;
*((_BYTE *)this + 72) = 1;
*((_BYTE *)this + 73) = a7;
v9 = 4 * a5 * a4;
v10 = (void *)sub_1800E4C6C(v9);
*((_QWORD *)this + 8) = v10;
if ( v10 )
{
memcpy(v10, a2, v9);
LOBYTE(v10) = 1;
}
}
else
{
LOBYTE(v10) = 0;
}
return (char)v10;
}