//
// GameObject::getColorFrame from 0x7766cc to 0x776804 (312 bytes)
//
// 56 xrefs:
// > GameObject::addColorSprite @ 0x776998
// > GameObject::addColorSprite @ 0x776d54
// > GameObject::addColorSprite @ 0x776e54
// > GameObject::addColorSprite @ 0x777200
// > GameObject::perspectiveColorFrame @ 0xac7c50
// > GameObject::setupCustomSprites @ 0xac7df8
// > GameObject::setupCustomSprites @ 0xac7ebc
// > GameObject::setupCustomSprites @ 0xac7fa8
// > GameObject::setupCustomSprites @ 0xac8094
// > GameObject::setupCustomSprites @ 0xac9f2c
// > GameObject::setupCustomSprites @ 0xac9ff0
// > GameObject::setupCustomSprites @ 0xaca3d0
// > GameObject::setupCustomSprites @ 0xaca464
// > GameObject::setupCustomSprites @ 0xacaa28
// > GameObject::setupCustomSprites @ 0xacaab8
// > GameObject::setupCustomSprites @ 0xacb0dc
// > GameObject::setupCustomSprites @ 0xaccc24
// > GameObject::setupCustomSprites @ 0xacf00c
// > GameObject::setupCustomSprites @ 0xacf14c
// > GameObject::setupCustomSprites @ 0xacfd78
// > GameObject::setupCustomSprites @ 0xacfe70
// > GameObject::setupCustomSprites @ 0xad0740
// > GameObject::setupCustomSprites @ 0xad0950
// > GameObject::setupCustomSprites @ 0xad0f20
// > GameObject::setupCustomSprites @ 0xad1e80
// > GameObject::setupCustomSprites @ 0xad2094
// > GameObject::setupCustomSprites @ 0xad23e0
// > GameObject::setupCustomSprites @ 0xad7308
// > GameObject::setupCustomSprites @ 0xad73bc
// > GameObject::setupCustomSprites @ 0xad7518
// > GameObject::setupCustomSprites @ 0xad7654
// > GameObject::setupCustomSprites @ 0xad8608
// > GameObject::setupCustomSprites @ 0xad86f8
// > GameObject::setupCustomSprites @ 0xad8938
// > GameObject::setupCustomSprites @ 0xad8a28
// > GameObject::setupCustomSprites @ 0xad9bc8
// > GameObject::setupCustomSprites @ 0xad9cb8
// > GameObject::setupCustomSprites @ 0xada29c
// > GameObject::setupCustomSprites @ 0xada30c
// > GameObject::setupCustomSprites @ 0xada750
// > GameObject::setupCustomSprites @ 0xadbbf4
// > GameObject::setupCustomSprites @ 0xadbd30
// > GameObject::setupCustomSprites @ 0xadbdd8
// > GameObject::setupCustomSprites @ 0xadbeb0
// > GameObject::setupCustomSprites @ 0xadbf84
// > GameObject::setupCustomSprites @ 0xadc22c
// > GameObject::setupCustomSprites @ 0xadc31c
// > GameObject::setupCustomSprites @ 0xadd3f4
// > GameObject::setupCustomSprites @ 0xade21c
// > GameObject::setupCustomSprites @ 0xade744
// > GameObject::setupCustomSprites @ 0xade7dc
// > GameObject::setupCustomSprites @ 0xadee98
// > GameObject::setupCustomSprites @ 0xadef74
// > GameObject::setupCustomSprites @ 0xae2524
// > GameObject::playDestroyObjectAnim @ 0xaf3ef4
// > ??> @ 0xd2e08
//
// 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 12:53:14 +0000
//
unsigned __int64 *__usercall GameObject::getColorFrame@(__int64 a1@, unsigned __int64 *a2@)
{
char *v3; // x0
const char *v4; // x23
size_t v5; // x0
size_t v6; // x20
unsigned __int64 v7; // x22
void *v8; // x3
__int64 v10[2]; // [xsp+40h] [xbp+40h] BYREF
void *v11; // [xsp+50h] [xbp+50h]
v3 = (char *)(a1 + 1);
if ( (*(_BYTE *)a1 & 1) != 0 )
v3 = *(char **)(a1 + 16);
v4 = (char *)v10 + 1;
sub_775DC0(v3, "_001.png", "_color_001.png", v10);
if ( (v10[0] & 1) != 0 )
v4 = (const char *)v11;
*a2 = 0;
a2[1] = 0;
a2[2] = 0;
v5 = strlen(v4);
v6 = v5;
if ( v5 > 0xFFFFFFFFFFFFFFEFLL )
sub_62C17C();
if ( v5 > 0x16 )
{
v7 = (v5 + 16) & 0xFFFFFFFFFFFFFFF0LL;
v8 = (void *)operator new(v7);
a2[2] = (unsigned __int64)v8;
a2[1] = v6;
*a2 = v7 | 1;
LABEL_8:
v8 = memcpy(v8, v4, v6);
goto LABEL_9;
}
*(_BYTE *)a2 = 2 * v5;
v8 = (char *)a2 + 1;
if ( v5 )
goto LABEL_8;
LABEL_9:
*((_BYTE *)v8 + v6) = 0;
if ( (v10[0] & 1) != 0 )
operator delete(v11);
return a2;
}