// // GameStatsManager::createReward from 0x1401e15f0 to 0x1401e18da (746 bytes) // // 4 xrefs: // > GameLevelManager::onGetGJSecretRewardCompleted @ 0x140165b64 // > GameLevelManager::onGetGJDailyLevelStateCompleted @ 0x140169704 // > @ 0x1406cc504 // > @ 0x1406cc510 // // This function is hookable on this platform! // // Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA // Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings // // Hidden C++ exception states: #wind=3 __int64 __fastcall GameStatsManager::createReward(__int64 a1, int a2, int a3, __int64 *a4) { __int64 v4; // rsi int v5; // ebx int v6; // r15d __int64 v7; // rcx cocos2d::CCArray *v8; // r13 unsigned __int64 v9; // r12 void *v10; // r14 _BYTE *v11; // rbp signed __int64 v12; // rdx char *v13; // rsi const char *v14; // rcx SpecialRewardItem v15; // edi const char *v16; // rcx int v17; // r15d GJRewardObject *v18; // rbx __int64 v19; // rdi cocos2d::CCObject *v20; // rcx __int64 i; // rbx _BYTE *v22; // rax __int64 j; // rbx _BYTE *v25; // rax void *Block[2]; // [rsp+28h] [rbp-90h] BYREF __int64 v29; // [rsp+38h] [rbp-80h] unsigned __int64 v30; // [rsp+40h] [rbp-78h] __int64 *v31; // [rsp+48h] [rbp-70h] GJRewardObject *v32; // [rsp+50h] [rbp-68h] __int128 v33; // [rsp+58h] [rbp-60h] BYREF __int64 v34; // [rsp+68h] [rbp-50h] __int64 v35; // [rsp+70h] [rbp-48h] __int64 *v36; // [rsp+78h] [rbp-40h] v4 = (__int64)a4; v31 = a4; v5 = a3; v6 = a2; v36 = a4; *(_OWORD *)Block = 0; v29 = 0; sub_1400DE660(a4, ",", (__int64 *)Block); v8 = (cocos2d::CCArray *)cocos2d::CCArray::create(v7); v9 = 0; v10 = Block[1]; v11 = Block[0]; v12 = ((char *)Block[1] - (char *)Block[0]) >> 5; if ( v12 != 1 ) { v30 = v12 - 1; v13 = (char *)Block[0] + 32; while ( 1 ) { v14 = v13 - 32; if ( *((_QWORD *)v13 - 1) > 0xFu ) v14 = *(const char **)v14; v15 = atoi(v14); v16 = v13; if ( *((_QWORD *)v13 + 3) > 0xFu ) v16 = *(const char **)v13; v17 = atoi(v16); if ( v15 > 1000 ) break; if ( (unsigned int)(v15 - 1) <= 0xE && v15 != CustomItem ) { v18 = GJRewardObject::create(v15, v17, 0); LABEL_12: if ( v18 ) cocos2d::CCArray::addObject(v8, v18); } v9 += 2LL; v13 += 64; if ( v9 >= v30 ) { v10 = Block[1]; v4 = (__int64)v31; v5 = a3; v6 = a2; goto LABEL_16; } } v18 = (GJRewardObject *)operator new(0x48u); v32 = v18; cocos2d::CCObject::CCObject(v18); v18->__vftable = (GJRewardObject_vtbl *)&GJRewardObject::`vftable'; v18->m_specialRewardItem = CustomItem; v18->m_itemID = v17; v18->m_total = 1; cocos2d::CCObject::autorelease(v18); v18->m_unlockType = v15 - 1000; goto LABEL_12; } LABEL_16: if ( cocos2d::CCArray::count(v8) ) { v33 = 0; v34 = 0; v35 = 15; LOBYTE(v33) = 0; v19 = GJRewardItem::create(0, 0, &v33); *(_DWORD *)(v19 + 64) = v6; if ( *(cocos2d::CCArray **)(v19 + 72) != v8 ) { if ( v8 ) cocos2d::CCObject::retain(v8); v20 = *(cocos2d::CCObject **)(v19 + 72); if ( v20 ) cocos2d::CCObject::release(v20); *(_QWORD *)(v19 + 72) = v8; } *(_DWORD *)(v19 + 56) = v5; if ( !v11 ) goto LABEL_29; for ( i = (__int64)v11; (void *)i != v10; i += 32 ) sub_14003A830(i); v22 = v11; if ( ((v29 - (_QWORD)v11) & 0xFFFFFFFFFFFFFFE0uLL) < 0x1000 || (v11 = *((_BYTE **)v11 - 1), (unsigned __int64)(v22 - v11 - 8) <= 0x1F) ) { j_j_free(v11); LABEL_29: sub_14003A830(v4); return v19; } LABEL_35: invalid_parameter_noinfo_noreturn(); } if ( v11 ) { for ( j = (__int64)v11; (void *)j != v10; j += 32 ) sub_14003A830(j); v25 = v11; if ( ((v29 - (_QWORD)v11) & 0xFFFFFFFFFFFFFFE0uLL) >= 0x1000 ) { v11 = *((_BYTE **)v11 - 1); if ( (unsigned __int64)(v25 - v11 - 8) > 0x1F ) goto LABEL_35; } j_j_free(v11); } sub_14003A830(v4); return 0; }
GD Web Decomp Icon

GD Web Decomp

Raw Source