// // GameLevelManager::onGetGJDailyLevelStateCompleted from 0x4ca45c to 0x4ca650 (500 bytes) // // 1 xrefs: // > GameLevelManager::handleIt @ 0x4daeea // // 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:50:37 +0000 // int __fastcall GameLevelManager::onGetGJDailyLevelStateCompleted(GameLevelManager *a1, unsigned __int8 *a2, int a3) { const char *v6; // r1 _BOOL4 v7; // r7 _BOOL4 v8; // r5 int v9; // r5 _BOOL4 v10; // r7 _BOOL4 v11; // r7 int result; // r0 int (*v13)(void); // r3 cocos2d::CCArray *v14; // r0 cocos2d::CCArray *v15; // r9 cocos2d::CCString *v17; // r0 int v18; // r11 cocos2d::CCString *v19; // r0 float v20; // r0 cocos2d::CCString *v21; // r0 size_t v22; // r0 cocos2d::CCString *v23; // r0 const char *v24; // r9 size_t v25; // r0 GJRewardItem *v26; // r7 GameStatsManager *v27; // r0 GameStatsManager *v28; // r0 const char *CString; // [sp+4h] [bp-28h] int v30[3]; // [sp+Ch] [bp-20h] BYREF int v31; // [sp+18h] [bp-14h] BYREF int v32; // [sp+1Ch] [bp-10h] int v33; // [sp+20h] [bp-Ch] if ( (*(_BYTE *)a3 & 1) != 0 ) v6 = *(const char **)(a3 + 8); else v6 = (const char *)(a3 + 1); GameLevelManager::removeDLFromActive(a1, v6); v31 = 0; v32 = 0; v33 = 0; std::string::__init(&v31, "weekly_state", 0xCu); v7 = sub_4A9CC4((unsigned __int8 *)a3, (unsigned __int8 *)&v31); std::string::~string((int)&v31); if ( v7 ) { v9 = 1; } else { v31 = 0; v32 = 0; v33 = 0; std::string::__init(&v31, "event_state", 0xBu); v8 = sub_4A9CC4((unsigned __int8 *)a3, (unsigned __int8 *)&v31); std::string::~string((int)&v31); if ( v8 ) v9 = 2; else v9 = 0; } v31 = 0; v32 = 0; v33 = 0; std::string::__init(&v31, "-1", 2u); v10 = sub_4A9CC4(a2, (unsigned __int8 *)&v31); std::string::~string((int)&v31); if ( v10 ) goto LABEL_26; v31 = 0; v32 = 0; v33 = 0; std::string::__init(&v31, "-2", 2u); v11 = sub_4A9CC4(a2, (unsigned __int8 *)&v31); std::string::~string((int)&v31); if ( v11 ) { result = *((_DWORD *)a1 + 231); if ( !result ) return result; v13 = *(int (**)(void))(*(_DWORD *)result + 4); return v13(); } v14 = sub_4C1A88(a2, "|"); v15 = v14; if ( v9 == 2 ? cocos2d::CCArray::count(v14) > 3u : cocos2d::CCArray::count(v14) > 1u ) { v17 = (cocos2d::CCString *)cocos2d::CCArray::stringAtIndex(v15, 0); v18 = cocos2d::CCString::intValue(v17); v19 = (cocos2d::CCString *)cocos2d::CCArray::stringAtIndex(v15, 1u); v20 = COERCE_FLOAT(cocos2d::CCString::intValue(v19)); GameLevelManager::storeDailyLevelState((int)a1, *(float *)&v18, v20, v9); if ( v9 == 2 ) { v21 = (cocos2d::CCString *)cocos2d::CCArray::stringAtIndex(v15, 2u); memset(v30, 0, sizeof(v30)); CString = (const char *)cocos2d::CCString::getCString(v21); v22 = strlen(CString); std::string::__init(v30, CString, v22); v23 = (cocos2d::CCString *)cocos2d::CCArray::stringAtIndex(v15, 3u); v24 = (const char *)cocos2d::CCString::getCString(v23); v31 = 0; v32 = 0; v33 = 0; v25 = strlen(v24); std::string::__init(&v31, v24, v25); v26 = (GJRewardItem *)GameLevelManager::parseEventReward((int)a1, (unsigned __int8 *)v30, (unsigned __int8 *)&v31); std::string::~string((int)&v31); v27 = (GameStatsManager *)std::string::~string((int)v30); if ( !v26 ) { result = *((_DWORD *)a1 + 231); if ( !result ) return result; v13 = *(int (**)(void))(*(_DWORD *)result + 4); return v13(); } v28 = (GameStatsManager *)GameStatsManager::sharedState(v27); GameStatsManager::storeEventChest(v28, v18, v26); } result = *((_DWORD *)a1 + 231); if ( result ) return (**(int (__fastcall ***)(int, int))result)(result, v9); } else { LABEL_26: result = *((_DWORD *)a1 + 231); if ( result ) { v13 = *(int (**)(void))(*(_DWORD *)result + 4); return v13(); } } return result; }
GD Web Decomp Icon

GD Web Decomp

Raw Source