//
// GJMapPack::parsePackColors from 0x1000afa24 to 0x1000afb88 (356 bytes)
//
// 1 xrefs:
// > GJMapPack::create @ 0x100095cfc
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
__int64 __fastcall GJMapPack::parsePackColors(__int64 a1, char *a2, char *a3)
{
__int64 v5; // x20
__int64 v6; // x19
__int64 v7; // x23
cocos2d::CCString *v8; // x0
unsigned __int8 v9; // w21
cocos2d::CCString *v10; // x0
__int16 v11; // w22
cocos2d::CCString *v12; // x0
__int64 result; // x0
cocos2d::CCString *v14; // x0
unsigned __int8 v15; // w20
cocos2d::CCString *v16; // x0
__int16 v17; // w21
cocos2d::CCString *v18; // x0
std::string __p; // [xsp+8h] [xbp-48h] BYREF
if ( a2[23] < 0 )
a2 = *(char **)a2;
sub_100009900(&__p, a2);
v5 = sub_100093338(&__p, ",");
if ( SHIBYTE(__p.__r_.__value_.__r.__words[2]) < 0 )
operator delete(__p.__r_.__value_.__l.__data_);
if ( a3[23] < 0 )
a3 = *(char **)a3;
sub_100009900(&__p, a3);
v6 = sub_100093338(&__p, ",");
v7 = a1 + 392;
if ( SHIBYTE(__p.__r_.__value_.__r.__words[2]) < 0 )
operator delete(__p.__r_.__value_.__l.__data_);
*(_WORD *)(a1 + 396) = -1;
*(_DWORD *)v7 = -1;
if ( (unsigned int)sub_10024A36C(v5) >= 3 )
{
v8 = (cocos2d::CCString *)sub_10024A388(v5, 0);
v9 = cocos2d::CCString::intValue(v8);
v10 = (cocos2d::CCString *)sub_10024A388(v5, 1);
v11 = cocos2d::CCString::intValue(v10);
v12 = (cocos2d::CCString *)sub_10024A388(v5, 2);
*(_BYTE *)(v7 + 2) = cocos2d::CCString::intValue(v12);
*(_WORD *)v7 = v9 | (unsigned __int16)(v11 << 8);
}
result = sub_10024A36C(v6);
if ( (unsigned int)result >= 3 )
{
v14 = (cocos2d::CCString *)sub_10024A388(v6, 0);
v15 = cocos2d::CCString::intValue(v14);
v16 = (cocos2d::CCString *)sub_10024A388(v6, 1);
v17 = cocos2d::CCString::intValue(v16);
v18 = (cocos2d::CCString *)sub_10024A388(v6, 2);
result = cocos2d::CCString::intValue(v18);
*(_BYTE *)(v7 + 5) = result;
*(_WORD *)(v7 + 3) = v15 | (unsigned __int16)(v17 << 8);
}
return result;
}