// // GJGarageLayer::onRewardedVideo from 0x8bb39c to 0x8bb734 (920 bytes) // // 1 xrefs: // > @ 0xfee18 // // This function is hookable on this platform (idp: arm, 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:56:27 +0000 // __int64 __fastcall GJGarageLayer::onRewardedVideo(GJGarageLayer *this, cocos2d::CCObject *a2) { AdToolbox *v3; // x0 _BOOL8 hasCachedRewardedVideo; // x0 GameManager *v6; // x0 _BOOL8 canShowRewardedVideo; // x0 GameStatsManager *v8; // x0 cocos2d::CCArray *v9; // x0 AdToolbox *v10; // x0 cocos2d::CCArray *v11; // x22 cocos2d::CCObject *v12; // x0 cocos2d::CCObject *v13; // x0 cocos2d::CCObject *v14; // x0 int v15; // w2 DialogLayer *v16; // x21 __int64 v17; // [xsp+50h] [xbp+50h] BYREF cocos2d::CCArray *v18; // [xsp+58h] [xbp+58h] void *v19; // [xsp+60h] [xbp+60h] __int64 v20[2]; // [xsp+68h] [xbp+68h] BYREF void *v21; // [xsp+78h] [xbp+78h] __int64 v22[2]; // [xsp+80h] [xbp+80h] BYREF void *v23; // [xsp+90h] [xbp+90h] __int64 v24[2]; // [xsp+98h] [xbp+98h] BYREF void *v25; // [xsp+A8h] [xbp+A8h] __int64 v26[2]; // [xsp+B0h] [xbp+B0h] BYREF void *v27; // [xsp+C0h] [xbp+C0h] __int64 v28[2]; // [xsp+C8h] [xbp+C8h] BYREF void *v29; // [xsp+D8h] [xbp+D8h] __int64 v30[2]; // [xsp+E0h] [xbp+E0h] BYREF void *v31; // [xsp+F0h] [xbp+F0h] v3 = (AdToolbox *)*((unsigned __int8 *)this + 608); if ( !(_DWORD)v3 ) { hasCachedRewardedVideo = AdToolbox::hasCachedRewardedVideo(v3); if ( hasCachedRewardedVideo ) { v6 = (GameManager *)GameManager::sharedState((GameManager *)hasCachedRewardedVideo); canShowRewardedVideo = GameManager::canShowRewardedVideo(v6); if ( canShowRewardedVideo ) { *((_BYTE *)this + 608) = (unsigned __int8)&dword_0 + 1; v10 = (AdToolbox *)GameManager::sharedState((GameManager *)((char *)&dword_0 + 1)); *((_QWORD *)v10 + 162) = (char *)this + 456; AdToolbox::showRewardedVideo(v10); return _stack_chk_guard; } v8 = (GameStatsManager *)GameStatsManager::sharedState((GameStatsManager *)canShowRewardedVideo); GameStatsManager::getNextVideoAdReward(&v17, v8); if ( (v17 & 1) != 0 ) { v9 = v18; if ( v18 ) { LABEL_7: operator delete(v19); return _stack_chk_guard; } } else { v9 = (cocos2d::CCArray *)((int)(unsigned __int8)v17 >> 1); if ( (_DWORD)v9 ) return _stack_chk_guard; } v11 = (cocos2d::CCArray *)cocos2d::CCArray::create(v9); v20[0] = 0; v20[1] = 0; v21 = nullptr; std::string::__init(v20, "Scratch", 7u); v22[0] = 0; v22[1] = 0; v23 = nullptr; std::string::__init(v22, "I don't have any chests left...", 0x39u); v12 = (cocos2d::CCObject *)DialogObject::create(v20, v22, 12, 0, 0xFFFFFF, 1.0); cocos2d::CCArray::addObject(v11, v12); if ( (v22[0] & 1) != 0 ) operator delete(v23); if ( (v20[0] & 1) != 0 ) operator delete(v21); v24[0] = 0; v24[1] = 0; v25 = nullptr; std::string::__init(v24, "Scratch", 7u); v26[0] = 0; v26[1] = 0; v27 = nullptr; std::string::__init(v26, "You took EVERYTHING I had!", 0x22u); v13 = (cocos2d::CCObject *)DialogObject::create(v24, v26, 14, 0, 0xFFFFFF, 1.0); cocos2d::CCArray::addObject(v11, v13); if ( (v26[0] & 1) != 0 ) operator delete(v27); if ( (v24[0] & 1) != 0 ) operator delete(v25); v28[0] = 0; v28[1] = 0; v29 = nullptr; std::string::__init(v28, "Scratch", 7u); v30[0] = 0; v30[1] = 0; v31 = nullptr; std::string::__init(v30, "I need to find new stuff...", 0x23u); v14 = (cocos2d::CCObject *)DialogObject::create(v28, v30, 13, 0, 0xFFFFFF, 1.0); cocos2d::CCArray::addObject(v11, v14); if ( (v30[0] & 1) != 0 ) operator delete(v31); if ( (v28[0] & 1) != 0 ) operator delete(v29); v16 = (DialogLayer *)DialogLayer::createWithObjects(v11, (cocos2d::CCArray *)((char *)&dword_0 + 2), v15); (*(void (__fastcall **)(GJGarageLayer *, DialogLayer *, __int64))(*(_QWORD *)this + 464LL))(this, v16, 100); DialogLayer::updateChatPlacement(v16, 0); DialogLayer::animateInRandomSide(v16); if ( (v17 & 1) != 0 ) goto LABEL_7; } } return _stack_chk_guard; }
GD Web Decomp Icon

GD Web Decomp

Raw Source