//
// GJChallengeItem::createFromString from 0x51dc4c to 0x51dd1c (208 bytes)
//
// 1 xrefs:
// > GameLevelManager::onGetGJChallengesCompleted @ 0x4ca0c2
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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:51:50 +0000
//
cocos2d::CCObject *__fastcall GJChallengeItem::createFromString(_DWORD *a1)
{
cocos2d::CCArray *v1; // r4
cocos2d::CCString *v2; // r0
int v3; // r7
cocos2d::CCString *v4; // r0
int v5; // r10
cocos2d::CCString *v6; // r0
int v7; // r9
cocos2d::CCString *v8; // r0
int v9; // r8
cocos2d::CCString *v10; // r0
const char *CString; // r5
size_t v12; // r0
cocos2d::CCObject *v13; // r7
int v15[3]; // [sp+Ch] [bp-1Ch] BYREF
int v16[3]; // [sp+18h] [bp-10h] BYREF
v1 = sub_519534(a1, ",");
if ( cocos2d::CCArray::count(v1) <= 4u )
return nullptr;
v2 = (cocos2d::CCString *)cocos2d::CCArray::stringAtIndex(v1, 0);
v3 = cocos2d::CCString::intValue(v2);
v4 = (cocos2d::CCString *)cocos2d::CCArray::stringAtIndex(v1, 1u);
v5 = cocos2d::CCString::intValue(v4);
v6 = (cocos2d::CCString *)cocos2d::CCArray::stringAtIndex(v1, 2u);
v7 = cocos2d::CCString::intValue(v6);
v8 = (cocos2d::CCString *)cocos2d::CCArray::stringAtIndex(v1, 3u);
v9 = cocos2d::CCString::intValue(v8);
v10 = (cocos2d::CCString *)cocos2d::CCArray::stringAtIndex(v1, 4u);
memset(v15, 0, sizeof(v15));
CString = (const char *)cocos2d::CCString::getCString(v10);
v12 = strlen(CString);
std::string::__init(v15, CString, v12);
std::string::basic_string(v16, (int)v15);
v13 = GJChallengeItem::create(v5, v7, v9, v3, (int)v16);
std::string::~string((int)v16);
std::string::~string((int)v15);
return v13;
}