//
// GJLevelList::create from 0x100543160 to 0x100543755 (1525 bytes)
//
// 1 xrefs:
// > GameLevelManager::createAndGetLevelLists @ 0x1005430c2
//
// 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:31:58 +0000
//
std::string *__fastcall GJLevelList::create(__int64 a1)
{
__int64 v1; // rbx
void *v2; // rax
void *v3; // rax
const char *CString; // r15
size_t v5; // rax
std::string::size_type v6; // r12
char *data; // r13
size_t v8; // rbx
void *v9; // rax
const char *v10; // r15
size_t v11; // rax
std::string::size_type v12; // r12
char *v13; // r13
size_t v14; // rbx
std::string *v15; // rbx
void *v16; // rax
void *v17; // rax
void *v18; // rax
const char *v19; // r15
size_t v20; // rax
std::string::size_type v21; // r12
char *v22; // r13
size_t v23; // rbx
std::string *v24; // r13
void *v25; // rax
void *v26; // rax
void *v27; // rax
void *v28; // rax
void *v29; // rax
void *v30; // rax
void *v31; // rax
void *v32; // rax
void *v33; // rax
const char *v34; // r14
size_t v35; // rax
size_t v36; // r15
char *v37; // r12
size_t v38; // rbx
std::string __dst; // [rsp+8h] [rbp-A8h] BYREF
std::string __str; // [rsp+20h] [rbp-90h] BYREF
std::string v42; // [rsp+38h] [rbp-78h] BYREF
_QWORD v43[2]; // [rsp+50h] [rbp-60h] BYREF
void *v44; // [rsp+60h] [rbp-50h]
std::string *v45; // [rsp+68h] [rbp-48h]
_WORD v46[8]; // [rsp+70h] [rbp-40h] BYREF
void *__p; // [rsp+80h] [rbp-30h]
v1 = GJLevelList::create_1();
v46[0] = 12546;
LOBYTE(v46[1]) = 0;
v2 = cocos2d::CCDictionary::valueForKey(a1, (__int64)v46);
v45 = (std::string *)v1;
*(_DWORD *)(v1 + 344) = cocos2d::CCString::intValue(v2);
if ( (v46[0] & 1) != 0 )
operator delete(__p);
v46[0] = 12802;
LOBYTE(v46[1]) = 0;
v3 = cocos2d::CCDictionary::valueForKey(a1, (__int64)v46);
CString = (const char *)cocos2d::CCString::getCString(v3);
v5 = strlen(CString);
if ( v5 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100003630();
v6 = v5;
if ( v5 >= 0x17 )
{
v8 = 26;
if ( (v5 | 7) != 0x17 )
v8 = (v5 | 7) + 1;
data = (char *)operator new(v8);
__dst.__r_.__value_.__r.__words[2] = (std::string::size_type)data;
__dst.__r_.__value_.__r.__words[0] = v8 | 1;
__dst.__r_.__value_.__l.__size_ = v6;
goto LABEL_10;
}
__dst.__r_.__value_.__s.0 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)(2 * v5);
data = __dst.__r_.__value_.__s.__data_;
if ( v5 )
LABEL_10:
memmove(data, CString, v6);
data[v6] = 0;
std::string::operator=(v45 + 18, &__dst);
if ( (*(_BYTE *)&__dst.__r_.__value_.__s.0 & 1) != 0 )
operator delete(__dst.__r_.__value_.__l.__data_);
if ( (v46[0] & 1) != 0 )
operator delete(__p);
v46[0] = 13058;
LOBYTE(v46[1]) = 0;
v9 = cocos2d::CCDictionary::valueForKey(a1, (__int64)v46);
v10 = (const char *)cocos2d::CCString::getCString(v9);
v11 = strlen(v10);
if ( v11 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100003630();
v12 = v11;
if ( v11 >= 0x17 )
{
v14 = 26;
if ( (v11 | 7) != 0x17 )
v14 = (v11 | 7) + 1;
v13 = (char *)operator new(v14);
__str.__r_.__value_.__r.__words[2] = (std::string::size_type)v13;
__str.__r_.__value_.__r.__words[0] = v14 | 1;
__str.__r_.__value_.__l.__size_ = v12;
goto LABEL_22;
}
__str.__r_.__value_.__s.0 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)(2 * v11);
v13 = __str.__r_.__value_.__s.__data_;
if ( v11 )
LABEL_22:
memmove(v13, v10, v12);
v13[v12] = 0;
v15 = v45;
std::string::operator=(v45 + 21, &__str);
if ( (*(_BYTE *)&__str.__r_.__value_.__s.0 & 1) != 0 )
operator delete(__str.__r_.__value_.__l.__data_);
if ( (v46[0] & 1) != 0 )
operator delete(__p);
v46[0] = 13570;
LOBYTE(v46[1]) = 0;
v16 = cocos2d::CCDictionary::valueForKey(a1, (__int64)v46);
HIDWORD(v15[14].__r_.__value_.__r.__words[1]) = cocos2d::CCString::intValue(v16);
if ( (v46[0] & 1) != 0 )
operator delete(__p);
LOBYTE(v46[0]) = 4;
strcpy((char *)v46 + 1, "49");
v17 = cocos2d::CCDictionary::valueForKey(a1, (__int64)v46);
HIDWORD(v15[15].__r_.__value_.__r.__words[0]) = cocos2d::CCString::intValue(v17);
if ( (v46[0] & 1) != 0 )
operator delete(__p);
LOBYTE(v46[0]) = 4;
strcpy((char *)v46 + 1, "50");
v18 = cocos2d::CCDictionary::valueForKey(a1, (__int64)v46);
v19 = (const char *)cocos2d::CCString::getCString(v18);
v20 = strlen(v19);
if ( v20 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100003630();
v21 = v20;
if ( v20 >= 0x17 )
{
v23 = 26;
if ( (v20 | 7) != 0x17 )
v23 = (v20 | 7) + 1;
v22 = (char *)operator new(v23);
v42.__r_.__value_.__r.__words[2] = (std::string::size_type)v22;
v42.__r_.__value_.__r.__words[0] = v23 | 1;
v42.__r_.__value_.__l.__size_ = v21;
goto LABEL_38;
}
v42.__r_.__value_.__s.0 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)(2 * v20);
v22 = v42.__r_.__value_.__s.__data_;
if ( v20 )
LABEL_38:
memmove(v22, v19, v21);
v22[v21] = 0;
v24 = v45;
std::string::operator=(v45 + 17, &v42);
if ( (*(_BYTE *)&v42.__r_.__value_.__s.0 & 1) != 0 )
operator delete(v42.__r_.__value_.__l.__data_);
if ( (v46[0] & 1) != 0 )
operator delete(__p);
LOBYTE(v46[0]) = 4;
strcpy((char *)v46 + 1, "10");
v25 = cocos2d::CCDictionary::valueForKey(a1, (__int64)v46);
LODWORD(v24[14].__r_.__value_.__r.__words[2]) = cocos2d::CCString::intValue(v25);
if ( (v46[0] & 1) != 0 )
operator delete(__p);
LOBYTE(v46[0]) = 4;
strcpy((char *)v46 + 1, "14");
v26 = cocos2d::CCDictionary::valueForKey(a1, (__int64)v46);
HIDWORD(v24[14].__r_.__value_.__r.__words[2]) = cocos2d::CCString::intValue(v26);
if ( (v46[0] & 1) != 0 )
operator delete(__p);
v46[0] = 14082;
LOBYTE(v46[1]) = 0;
v27 = cocos2d::CCDictionary::valueForKey(a1, (__int64)v46);
*(_DWORD *)&v24[15].__r_.__value_.__l.0 = cocos2d::CCString::intValue(v27);
if ( (v46[0] & 1) != 0 )
operator delete(__p);
LOBYTE(v46[0]) = 4;
strcpy((char *)v46 + 1, "28");
v28 = cocos2d::CCDictionary::valueForKey(a1, (__int64)v46);
*(_DWORD *)&v24[22].__r_.__value_.__l.0 = cocos2d::CCString::intValue(v28);
if ( (v46[0] & 1) != 0 )
operator delete(__p);
LOBYTE(v46[0]) = 4;
strcpy((char *)v46 + 1, "29");
v29 = cocos2d::CCDictionary::valueForKey(a1, (__int64)v46);
HIDWORD(v24[22].__r_.__value_.__r.__words[0]) = cocos2d::CCString::intValue(v29);
if ( (v46[0] & 1) != 0 )
operator delete(__p);
LOBYTE(v46[0]) = 4;
strcpy((char *)v46 + 1, "55");
v30 = cocos2d::CCDictionary::valueForKey(a1, (__int64)v46);
*(_DWORD *)&v24[16].__r_.__value_.__l.0 = cocos2d::CCString::intValue(v30);
if ( (v46[0] & 1) != 0 )
operator delete(__p);
LOBYTE(v46[0]) = 4;
strcpy((char *)v46 + 1, "56");
v31 = cocos2d::CCDictionary::valueForKey(a1, (__int64)v46);
HIDWORD(v24[16].__r_.__value_.__r.__words[0]) = cocos2d::CCString::intValue(v31);
if ( (v46[0] & 1) != 0 )
operator delete(__p);
LOBYTE(v46[0]) = 4;
strcpy((char *)v46 + 1, "19");
v32 = cocos2d::CCDictionary::valueForKey(a1, (__int64)v46);
v24[16].__r_.__value_.__s.__data_[12] = cocos2d::CCString::boolValue(v32);
if ( (v46[0] & 1) != 0 )
operator delete(__p);
LOBYTE(v46[0]) = 4;
strcpy((char *)v46 + 1, "51");
v33 = cocos2d::CCDictionary::valueForKey(a1, (__int64)v46);
v34 = (const char *)cocos2d::CCString::getCString(v33);
v35 = strlen(v34);
if ( v35 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100003630();
v36 = v35;
if ( v35 >= 0x17 )
{
v38 = 26;
if ( (v35 | 7) != 0x17 )
v38 = (v35 | 7) + 1;
v37 = (char *)operator new(v38);
v44 = v37;
v43[0] = v38 | 1;
v43[1] = v36;
goto LABEL_66;
}
LOBYTE(v43[0]) = 2 * v35;
v37 = (char *)v43 + 1;
if ( v35 )
LABEL_66:
memmove(v37, v34, v36);
v37[v36] = 0;
GJLevelList::parseListLevels(v24, v43);
if ( (v43[0] & 1) != 0 )
operator delete(v44);
if ( (v46[0] & 1) != 0 )
operator delete(__p);
return v24;
}