// // GameManager::firstLoad from 0x140284d80 to 0x1402858f9 (2937 bytes) // // 2 xrefs: // > @ 0x14075e178 // > @ 0x14091d0d8 // // 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:29:02 +0000 // // Hidden C++ exception states: #wind=9 void __fastcall GameManager::firstLoad(__int64 a1) { __int64 v2; // rcx cocos2d::CCDictionary *v3; // r12 int i; // esi cocos2d::CCString *v5; // rax char *CString; // rbx __int64 v7; // rcx int IntGameVariable; // r14d size_t v9; // r8 cocos2d::CCString *v10; // rax const char *v11; // rax size_t v12; // r8 __int64 v13; // rax void *v14; // rcx void *v15; // rcx bool UGV; // r13 cocos2d::CCObject *v17; // rax cocos2d::CCObject *v18; // rcx cocos2d::CCObject *v19; // rbx cocos2d::CCObject *v20; // rax cocos2d::CCObject *v21; // rcx cocos2d::CCObject *v22; // rbx cocos2d::CCObject *v23; // rax cocos2d::CCObject *v24; // rcx cocos2d::CCObject *v25; // rbx cocos2d::CCObject *v26; // rax cocos2d::CCObject *v27; // rbx cocos2d::CCObject *v28; // rcx __int64 UniqueUserID; // rax int v30; // eax float v31; // xmm0_4 __int64 v32; // rdx __int64 v33; // rcx __int64 v34; // r8 __int64 v35; // rbx __int64 v36; // rcx __int64 v37; // rcx __int64 v38; // rsi __int64 v39; // rcx cocos2d::CCObject *v40; // rax cocos2d::CCObject *v41; // rbx cocos2d::CCObject *v42; // rcx _QWORD *v43; // rcx cocos2d::CCObject *v44; // rcx __int64 v45; // rbx cocos2d::CCObject *v46; // rax cocos2d::CCObject *v47; // rsi __int64 v48; // rbx _QWORD *v49; // rax cocos2d::CCArray *v50; // rcx cocos2d::CCArray *v51; // rcx __int64 v52; // rbx struct cocos2d::CCString *v53; // rax void *v54; // rcx __int64 v55; // rbx struct cocos2d::CCString *v56; // rax void *v57; // rcx cocos2d::CCArray *v58; // r15 unsigned int j; // r14d cocos2d::CCString *v60; // rax const char *v61; // rax char *v62; // rsi size_t v63; // r8 cocos2d::CCString *v64; // rax unsigned int v65; // ebx void *v66; // [rsp+38h] [rbp-29h] void *v67; // [rsp+38h] [rbp-29h] void *v68; // [rsp+38h] [rbp-29h] void *v69; // [rsp+38h] [rbp-29h] void *v70; // [rsp+38h] [rbp-29h] void *v71; // [rsp+38h] [rbp-29h] void *Block[2]; // [rsp+40h] [rbp-21h] BYREF __int64 v73; // [rsp+50h] [rbp-11h] unsigned __int64 v74; // [rsp+58h] [rbp-9h] __int128 v75; // [rsp+60h] [rbp-1h] BYREF __int64 v76; // [rsp+70h] [rbp+Fh] unsigned __int64 v77; // [rsp+78h] [rbp+17h] *(_QWORD *)(a1 + 728) = 0; *(_DWORD *)(a1 + 718) = 0; *(_BYTE *)(a1 + 717) = 0; *(_WORD *)(a1 + 722) = 0; UIButtonConfig::reset(a1 + 1308); UIButtonConfig::reset(a1 + 1348); UIButtonConfig::reset(a1 + 1388); UIButtonConfig::resetOneBtn(a1 + 1428); UIButtonConfig::resetOneBtn(a1 + 1468); v3 = nullptr; if ( *(_BYTE *)(a1 + 1058) && *(_QWORD *)(a1 + 432) ) { v3 = (cocos2d::CCDictionary *)cocos2d::CCDictionary::create(v2); for ( i = 1; i <= 249; ++i ) { v5 = cocos2d::CCString::createWithFormat("%04i", i); CString = (char *)cocos2d::CCString::getCString(v5); v7 = qword_14090BFD0; if ( !qword_14090BFD0 ) { v66 = operator new(0x6E8u); qword_14090BFD0 = GameManager::GameManager((__int64)v66); (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0); v7 = qword_14090BFD0; } IntGameVariable = GameManager::getIntGameVariable(v7, CString); if ( IntGameVariable > 0 ) { v75 = 0; v76 = 0; v77 = 0; v9 = -1; do ++v9; while ( CString[v9] ); sub_14003D230(&v75, CString, v9); v10 = cocos2d::CCString::createWithFormat((const char *)&word_1406ED6F8, (unsigned int)IntGameVariable); v11 = cocos2d::CCString::getCString(v10); *(_OWORD *)Block = 0; v73 = 0; v74 = 0; v12 = -1; do ++v12; while ( v11[v12] ); sub_14003D230(Block, v11, v12); v13 = cocos2d::CCString::create(Block); cocos2d::CCDictionary::setObject(v3, v13, &v75); if ( v74 > 0xF ) { v14 = Block[0]; if ( v74 + 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(v14); } v73 = 0; v74 = 15; LOBYTE(Block[0]) = 0; if ( v77 > 0xF ) { v15 = (void *)v75; if ( v77 + 1 >= 0x1000 ) { v15 = *(void **)(v75 - 8); if ( (unsigned __int64)(v75 - (_QWORD)v15 - 8) > 0x1F ) invoke_watson(nullptr, nullptr, nullptr, 0, 0); } j_j_free(v15); } } } } UGV = 0; if ( *(_BYTE *)(a1 + 1058) && *(_QWORD *)(a1 + 456) ) UGV = GameManager::getUGV(a1, &word_14075A9D0); v17 = (cocos2d::CCObject *)cocos2d::CCDictionary::create(v2); v19 = v17; if ( *(cocos2d::CCObject **)(a1 + 432) != v17 ) { if ( v17 ) cocos2d::CCObject::retain(v17); v18 = *(cocos2d::CCObject **)(a1 + 432); if ( v18 ) cocos2d::CCObject::release(v18); *(_QWORD *)(a1 + 432) = v19; } v20 = (cocos2d::CCObject *)cocos2d::CCDictionary::create(v18); v22 = v20; if ( *(cocos2d::CCObject **)(a1 + 440) != v20 ) { if ( v20 ) cocos2d::CCObject::retain(v20); v21 = *(cocos2d::CCObject **)(a1 + 440); if ( v21 ) cocos2d::CCObject::release(v21); *(_QWORD *)(a1 + 440) = v22; } v23 = (cocos2d::CCObject *)cocos2d::CCDictionary::create(v21); v25 = v23; if ( *(cocos2d::CCObject **)(a1 + 456) != v23 ) { if ( v23 ) cocos2d::CCObject::retain(v23); v24 = *(cocos2d::CCObject **)(a1 + 456); if ( v24 ) cocos2d::CCObject::release(v24); *(_QWORD *)(a1 + 456) = v25; } if ( !*(_QWORD *)(a1 + 464) ) { v26 = (cocos2d::CCObject *)cocos2d::CCDictionary::create(v24); v27 = v26; if ( *(cocos2d::CCObject **)(a1 + 464) != v26 ) { if ( v26 ) cocos2d::CCObject::retain(v26); v28 = *(cocos2d::CCObject **)(a1 + 464); if ( v28 ) cocos2d::CCObject::release(v28); *(_QWORD *)(a1 + 464) = v27; } } if ( !*(_BYTE *)(a1 + 1058) ) { UniqueUserID = PlatformToolbox::getUniqueUserID((__int64)&v75); sub_140059C40(a1 + 624, UniqueUserID); sub_14003D310((__int64)&v75); } sub_1400405A0((void **)(a1 + 656), "Player", 6u); *(_DWORD *)(a1 + 700) = 0; v30 = (int)(float)((float)((float)rand() / 32767.0) * 1000.0); *(_DWORD *)(a1 + 696) = v30; *(_DWORD *)(a1 + 692) = v30; *(_DWORD *)(a1 + 1072) = 0; v31 = (float)((float)rand() / 32767.0) * 1000.0; *(_DWORD *)(a1 + 1068) = (int)v31; *(_DWORD *)(a1 + 1064) = (int)v31; *(_BYTE *)(a1 + 1076) = 0; *(_DWORD *)(a1 + 1080) = 0; if ( !*(_BYTE *)(a1 + 1058) ) { *(_WORD *)(a1 + 616) = 257; *(_BYTE *)(a1 + 618) = 1; } GameManager::resetAllIcons(a1); if ( !*(_BYTE *)(a1 + 1058) ) { v35 = qword_14090BF60; if ( !qword_14090BF60 ) { v67 = operator new(0x8A8u); qword_14090BF60 = FMODAudioEngine::FMODAudioEngine((__int64)v67); (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BF60 + 72LL))(qword_14090BF60); v35 = qword_14090BF60; } *(_DWORD *)(v35 + 524) = 0; *(_DWORD *)(v35 + 512) = 1065353216; v36 = *(_QWORD *)(v35 + 552); if ( v36 ) { FMOD::ChannelControl::setVolume(v36); v35 = qword_14090BF60; } if ( !v35 ) { v68 = operator new(0x8A8u); qword_14090BF60 = FMODAudioEngine::FMODAudioEngine((__int64)v68); (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BF60 + 72LL))(qword_14090BF60); v35 = qword_14090BF60; } *(_DWORD *)(v35 + 516) = 1065353216; v37 = *(_QWORD *)(v35 + 584); if ( v37 ) FMOD::ChannelControl::setVolume(v37); v33 = *(_QWORD *)(v35 + 600); if ( v33 ) FMOD::ChannelControl::setVolume(v33); } v38 = AchievementManager::sharedState(v33, v32, v34); v40 = (cocos2d::CCObject *)cocos2d::CCDictionary::create(v39); v41 = v40; if ( *(cocos2d::CCObject **)(v38 + 352) != v40 ) { if ( v40 ) cocos2d::CCObject::retain(v40); v42 = *(cocos2d::CCObject **)(v38 + 352); if ( v42 ) cocos2d::CCObject::release(v42); *(_QWORD *)(v38 + 352) = v41; } v43 = *(_QWORD **)&qword_14090BFB0; if ( !*(_QWORD *)&qword_14090BFB0 ) { v69 = operator new(0x690u); *(_QWORD *)&qword_14090BFB0 = GameLevelManager::GameLevelManager((__int64)v69); (*(void (__fastcall **)(_QWORD))(**(_QWORD **)&qword_14090BFB0 + 72LL))(*(_QWORD *)&qword_14090BFB0); v43 = *(_QWORD **)&qword_14090BFB0; } GameLevelManager::firstSetup(v43); if ( !qword_14090BFE0 ) { v70 = operator new(0x3E8u); qword_14090BFE0 = sub_1402D6480(v70); (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFE0 + 72LL))(qword_14090BFE0); } GameStatsManager::firstSetup(); v45 = qword_14090C070; if ( !qword_14090C070 ) { v71 = operator new(0x3D0u); qword_14090C070 = MusicDownloadManager::MusicDownloadManager(v71); (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090C070 + 72LL))(qword_14090C070); v45 = qword_14090C070; } if ( !*(_QWORD *)(v45 + 344) ) { v46 = (cocos2d::CCObject *)cocos2d::CCDictionary::create(v44); v47 = v46; if ( *(cocos2d::CCObject **)(v45 + 344) != v46 ) { if ( v46 ) cocos2d::CCObject::retain(v46); v44 = *(cocos2d::CCObject **)(v45 + 344); if ( v44 ) cocos2d::CCObject::release(v44); *(_QWORD *)(v45 + 344) = v47; } } *(_DWORD *)(v45 + 360) = 0; GJAccountManager::sharedState(v44); GJMultiplayerManager::sharedState(); v48 = EditorSFXManager::sharedState(); EditorSFXManager::clearAll((_QWORD *)v48); v49 = (_QWORD *)(v48 + 232); *(_QWORD *)(v48 + 248) = 0; if ( *(_QWORD *)(v48 + 256) > 0xFu ) v49 = (_QWORD *)*v49; *(_BYTE *)v49 = 0; v50 = *(cocos2d::CCArray **)(v48 + 208); if ( v50 ) cocos2d::CCArray::removeAllObjects(v50); v51 = *(cocos2d::CCArray **)(v48 + 216); if ( v51 ) cocos2d::CCArray::removeAllObjects(v51); *(_DWORD *)(v48 + 224) = 1; sub_140066610((_QWORD *)(v48 + 64)); sub_14003EB60((_QWORD *)(v48 + 128)); *(_DWORD *)(v48 + 264) = 1065353216; if ( *(_BYTE *)(a1 + 1058) ) { if ( v3 ) { v58 = cocos2d::CCDictionary::allKeys(v3); for ( j = 0; j < cocos2d::CCArray::count(v58); ++j ) { v60 = cocos2d::CCArray::stringAtIndex(v58, j); v61 = cocos2d::CCString::getCString(v60); v62 = (char *)v61; v75 = 0; v76 = 0; v77 = 0; v63 = -1; do ++v63; while ( v61[v63] ); sub_14003D230(&v75, v61, v63); v64 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(v3, &v75); v65 = cocos2d::CCString::intValue(v64); sub_14003D310((__int64)&v75); GameManager::setIntGameVariable(a1, v62, v65); } } } else { *(_DWORD *)(a1 + 1088) = -1; *(_WORD *)(a1 + 953) = 1; *(_WORD *)(a1 + 956) = 0; *(_BYTE *)(a1 + 431) = 1; *(_WORD *)(a1 + 964) = 0; *(_BYTE *)(a1 + 966) = 0; *(_BYTE *)(a1 + 955) = 0; GameManager::setGameVariable(a1, "0002", 1u); GameManager::setGameVariable(a1, "0001", 1u); GameManager::setGameVariable(a1, "0026", 1u); GameManager::setGameVariable(a1, "0027", 1u); GameManager::setGameVariable(a1, "0200", 1u); GameManager::setGameVariable(a1, "0202", 1u); GameManager::setGameVariable(a1, "0038", 1u); GameManager::setGameVariable(a1, "0043", 1u); GameManager::setGameVariable(a1, "0044", 1u); *(_OWORD *)Block = 0; v73 = 3; v74 = 15; LODWORD(Block[0]) = 6256231; sub_140044D80(Block, "0050", 4u); v52 = *(_QWORD *)(a1 + 432); v53 = cocos2d::CCString::createWithFormat((const char *)&word_1406ED6F8, 2); cocos2d::CCDictionary::setObject(v52, v53, Block); if ( v74 > 0xF ) { v54 = Block[0]; if ( v74 + 1 >= 0x1000 ) { v54 = *((void **)Block[0] - 1); if ( (unsigned __int64)((char *)Block[0] - (char *)v54 - 8) > 0x1F ) invoke_watson(nullptr, nullptr, nullptr, 0, 0); } j_j_free(v54); } *(_OWORD *)Block = 0; v73 = 3; v74 = 15; LODWORD(Block[0]) = 6256231; sub_140044D80(Block, "0049", 4u); v55 = *(_QWORD *)(a1 + 432); v56 = cocos2d::CCString::createWithFormat((const char *)&word_1406ED6F8, 6); cocos2d::CCDictionary::setObject(v55, v56, Block); if ( v74 > 0xF ) { v57 = Block[0]; if ( v74 + 1 >= 0x1000 ) { v57 = *((void **)Block[0] - 1); if ( (unsigned __int64)((char *)Block[0] - (char *)v57 - 8) > 0x1F ) invoke_watson(nullptr, nullptr, nullptr, 0, 0); } j_j_free(v57); } GameManager::setGameVariable(a1, "0046", 1u); GameManager::setGameVariable(a1, "0044", 1u); GameManager::setGameVariable(a1, "0036", 1u); GameManager::setGameVariable(a1, "0118", 1u); GameManager::setGameVariable(a1, "0117", 1u); GameManager::setGameVariable(a1, "0158", 1u); GameManager::setGameVariable(a1, "0121", 1u); GameManager::setGameVariable(a1, "0037", 1u); GameManager::setGameVariable(a1, "0184", 1u); GameManager::setGameVariable(a1, "0030", 1u); GameManager::setGameVariable(a1, "0013", 1u); GameManager::setGameVariable(a1, "0018", 1u); } if ( *(_BYTE *)(a1 + 1058) && UGV ) GameManager::setUGV(a1, &word_14075A9D0, 1u); *(_BYTE *)(a1 + 512) = 1; }
GD Web Decomp Icon

GD Web Decomp

Raw Source