//
// cocos2d::CCConfiguration::init from 0x1800c0bf0 to 0x1800c0f12 (802 bytes)
//
// 4 xrefs:
// > cocos2d::CCConfiguration::sharedConfiguration @ 0x1800c1432
// > ??> @ 0x18014cf68
// > ??> @ 0x1801c3384
// > ??> @ 0x1801c3390
//
// 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:25 +0000
//
// Hidden C++ exception states: #wind=5
char __fastcall cocos2d::CCConfiguration::init(cocos2d::CCConfiguration *this)
{
struct cocos2d::CCDictionary *v2; // rax
cocos2d *v3; // rcx
char *v4; // rax
__int64 v5; // rbx
cocos2d::CCObject *v6; // rax
void *v7; // rcx
void *v8; // rcx
cocos2d::CCObject *v9; // rax
cocos2d::CCObject *v10; // rdi
void *v11; // rcx
cocos2d::CCObject *v12; // rax
cocos2d::CCObject *v13; // rdi
void *v14; // rcx
void *Block[2]; // [rsp+38h] [rbp-11h] BYREF
__m128i si128; // [rsp+48h] [rbp-1h]
void *v18[2]; // [rsp+58h] [rbp+Fh] BYREF
__m128i v19; // [rsp+68h] [rbp+1Fh]
v2 = cocos2d::CCDictionary::create();
*((_QWORD *)this + 11) = v2;
cocos2d::CCObject::retain(v2);
sub_180005A10(v18, "cocos2d.x.version");
v4 = (char *)cocos2d::cocos2dVersion(v3);
sub_180005A10(Block, v4);
v5 = *((_QWORD *)this + 11);
v6 = cocos2d::CCString::create((__int64)Block);
cocos2d::CCDictionary::setObject(v5, v6, (__int64)v18);
if ( si128.m128i_i64[1] > 0xFuLL )
{
v7 = Block[0];
if ( (unsigned __int64)(si128.m128i_i64[1] + 1) >= 0x1000 )
{
v7 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v7 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free_0(v7);
}
si128 = _mm_load_si128((const __m128i *)&xmmword_1800EC500);
LOBYTE(Block[0]) = 0;
if ( v19.m128i_i64[1] > 0xFuLL )
{
v8 = v18[0];
if ( (unsigned __int64)(v19.m128i_i64[1] + 1) >= 0x1000 )
{
v8 = *((void **)v18[0] - 1);
if ( (unsigned __int64)((char *)v18[0] - (char *)v8 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free_0(v8);
}
*(_OWORD *)v18 = 0;
v19 = 0;
v18[0] = (void *)sub_1800E4AC0(0x30u);
v19 = _mm_load_si128((const __m128i *)&xmmword_18010D9A0);
strcpy((char *)v18[0], "cocos2d.x.compiled_with_profiler");
v9 = (cocos2d::CCObject *)sub_1800E4AC0(0x40u);
v10 = v9;
if ( v9 )
{
cocos2d::CCObject::CCObject(v9);
*(_QWORD *)v10 = &cocos2d::CCBool::`vftable';
*((_BYTE *)v10 + 56) = 0;
}
else
{
v10 = nullptr;
}
if ( v10 )
cocos2d::CCObject::autorelease(v10);
cocos2d::CCDictionary::setObject(*((_QWORD *)this + 11), v10, (__int64)v18);
if ( v19.m128i_i64[1] > 0xFuLL )
{
v11 = v18[0];
if ( (unsigned __int64)(v19.m128i_i64[1] + 1) >= 0x1000 )
{
v11 = *((void **)v18[0] - 1);
if ( (unsigned __int64)((char *)v18[0] - (char *)v11 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free_0(v11);
}
*(_OWORD *)Block = 0;
si128 = 0;
Block[0] = (void *)sub_1800E4AC0(0x30u);
si128 = _mm_load_si128((const __m128i *)&xmmword_18010D9B0);
strcpy((char *)Block[0], "cocos2d.x.compiled_with_gl_state_cache");
v12 = (cocos2d::CCObject *)sub_1800E4AC0(0x40u);
v13 = v12;
if ( v12 )
{
cocos2d::CCObject::CCObject(v12);
*(_QWORD *)v13 = &cocos2d::CCBool::`vftable';
*((_BYTE *)v13 + 56) = 1;
}
else
{
v13 = nullptr;
}
if ( v13 )
cocos2d::CCObject::autorelease(v13);
cocos2d::CCDictionary::setObject(*((_QWORD *)this + 11), v13, (__int64)Block);
if ( si128.m128i_i64[1] > 0xFuLL )
{
v14 = Block[0];
if ( (unsigned __int64)(si128.m128i_i64[1] + 1) >= 0x1000 )
{
v14 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v14 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free_0(v14);
}
return 1;
}