// // GJPathsLayer::init from 0x140392930 to 0x140392e6f (1343 bytes) // // 5 xrefs: // > GJPathsLayer::create @ 0x1403928f0 // > GJPathsLayer::create @ 0x1403928f7 // > GJPathsLayer::create @ 0x1403928e1 // > @ 0x140773e10 // > @ 0x140923060 // // 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:31:11 +0000 // // Hidden C++ exception states: #wind=2 bool __fastcall GJPathsLayer::init(__int64 a1) { cocos2d::CCTextureCache *v2; // rax __int64 v3; // rdx __int64 v4; // rcx cocos2d::CCSpriteFrameCache *v5; // rax __int64 v6; // rcx bool result; // al __int64 v8; // rdx __int64 v9; // rdx __int64 v10; // rcx __int64 v11; // rax __int64 v12; // rax struct cocos2d::CCSprite *v13; // rdi __int64 v14; // rbx __int64 v15; // rax struct cocos2d::CCSprite *v16; // rax cocos2d::CCObject *v17; // rax struct cocos2d::CCMenu *v18; // rax __int64 v19; // rdi struct cocos2d::CCMenu *v20; // rbx __int64 v21; // rax struct cocos2d::CCSprite *v22; // rdi __int64 v23; // rbx __int64 v24; // rax struct cocos2d::CCSprite *v25; // rdi __int64 v26; // rbx __int64 v27; // rax struct cocos2d::CCSprite *v28; // rdi __int64 v29; // rbx __int64 v30; // rax int v31; // ebx int v32; // r14d __int64 *v33; // r15 __int64 *v34; // rax cocos2d::CCObject *v35; // rdi float v36; // xmm6_4 float v37; // xmm7_4 float v38; // xmm0_4 __int64 v39; // rax __int64 v40; // rbx __int64 v41; // rax _BYTE v42[8]; // [rsp+38h] [rbp-49h] BYREF __int128 v43; // [rsp+40h] [rbp-41h] BYREF void *v44; // [rsp+E8h] [rbp+67h] BYREF float v45; // [rsp+F0h] [rbp+6Fh] BYREF float v46; // [rsp+F4h] [rbp+73h] char v47; // [rsp+F8h] [rbp+77h] BYREF void *v48; // [rsp+100h] [rbp+7Fh] v2 = (cocos2d::CCTextureCache *)cocos2d::CCTextureCache::sharedTextureCache(); cocos2d::CCTextureCache::addImage(v2, "GJ_PathSheet.png", 0); v5 = (cocos2d::CCSpriteFrameCache *)cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(v4, v3); cocos2d::CCSpriteFrameCache::addSpriteFramesWithFile(v5, "GJ_PathSheet.plist"); *(_BYTE *)(a1 + 680) = 1; v6 = qword_14090BFE0; if ( !qword_14090BFE0 ) { v44 = operator new(0x3E8u); qword_14090BFE0 = sub_1402D6480((__int64)v44); (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFE0 + 72LL))(qword_14090BFE0); v6 = qword_14090BFE0; } GameStatsManager::trySelectActivePath(v6); FLAlertLayer::incrementForcePrio((struct cocos2d::CCObject *)a1); LODWORD(v44) = -1358954496; result = cocos2d::CCLayerColor::initWithColor((cocos2d::CCLayerColor *)a1, (const struct cocos2d::_ccColor4B *)&v44); if ( result ) { LOBYTE(v8) = 1; (*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)a1 + 920LL))(a1, v8); LOBYTE(v9) = 1; (*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)a1 + 992LL))(a1, v9); v11 = cocos2d::CCDirector::sharedDirector(v10); cocos2d::CCDirector::getWinSize(v11, &v45); v12 = cocos2d::CCLayer::create(); *(_QWORD *)(a1 + 584) = v12; (*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)a1 + 464LL))(a1, v12); v13 = cocos2d::CCSprite::createWithSpriteFrameName("pathSelectBG_001.png"); (*(void (__fastcall **)(_QWORD, struct cocos2d::CCSprite *, __int64))(**(_QWORD **)(a1 + 584) + 456LL))( *(_QWORD *)(a1 + 584), v13, 0xFFFFFFFFLL); (*(void (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v13 + 160LL))(v13); v14 = *(_QWORD *)v13; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v44, v45 * 0.5, v46 * 0.5); (*(void (__fastcall **)(struct cocos2d::CCSprite *, __int64))(v14 + 184))(v13, v15); *(_DWORD *)(a1 + 640) = -1; v16 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_closeBtn_001.png"); *(_QWORD *)(a1 + 672) = v16; v17 = CCMenuItemSpriteExtra::create((int)v16, 0, a1, (__int64)GJPathRewardPopup::closePopup); *((_DWORD *)v17 + 93) = 1070386381; v18 = cocos2d::CCMenu::create(v17, 0); *(_QWORD *)(a1 + 552) = v18; v19 = *(_QWORD *)v18; v20 = v18; cocos2d::CCPoint::CCPoint( (cocos2d::CCPoint *)&v44, (float)((float)(v45 * 0.5) - 130.0) + 10.0, (float)((float)(v46 * 0.5) + 130.0) - 10.0); (*(void (__fastcall **)(struct cocos2d::CCMenu *, __int64))(v19 + 184))(v20, v21); (*(void (__fastcall **)(_QWORD, _QWORD, __int64))(**(_QWORD **)(a1 + 584) + 456LL))( *(_QWORD *)(a1 + 584), *(_QWORD *)(a1 + 552), 10); v22 = cocos2d::CCSprite::createWithSpriteFrameName("label_paths_001.png"); (*(void (__fastcall **)(_QWORD, struct cocos2d::CCSprite *, __int64))(**(_QWORD **)(a1 + 584) + 456LL))( *(_QWORD *)(a1 + 584), v22, 20); v23 = *(_QWORD *)v22; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v44, v45 * 0.5, (float)(v46 * 0.5) + 29.0); (*(void (__fastcall **)(struct cocos2d::CCSprite *, __int64))(v23 + 184))(v22, v24); (*(void (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v22 + 160LL))(v22); v25 = cocos2d::CCSprite::createWithSpriteFrameName("label_of_001.png"); (*(void (__fastcall **)(_QWORD, struct cocos2d::CCSprite *, __int64))(**(_QWORD **)(a1 + 584) + 456LL))( *(_QWORD *)(a1 + 584), v25, 20); v26 = *(_QWORD *)v25; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v44, v45 * 0.5, v46 * 0.5); (*(void (__fastcall **)(struct cocos2d::CCSprite *, __int64))(v26 + 184))(v25, v27); (*(void (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v25 + 160LL))(v25); v28 = cocos2d::CCSprite::createWithSpriteFrameName("label_power_001.png"); (*(void (__fastcall **)(_QWORD, struct cocos2d::CCSprite *, __int64))(**(_QWORD **)(a1 + 584) + 456LL))( *(_QWORD *)(a1 + 584), v28, 20); v29 = *(_QWORD *)v28; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v44, v45 * 0.5, (float)(v46 * 0.5) - 34.0); (*(void (__fastcall **)(struct cocos2d::CCSprite *, __int64))(v29 + 184))(v28, v30); (*(void (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v28 + 160LL))(v28); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v47, v45 * 0.5, v46 * 0.5); v31 = 0; while ( 1 ) { v32 = v31 + 1; v33 = (__int64 *)GJPathSprite::create((unsigned int)(v31 + 1)); GJPathSprite::updateState(v33); v48 = operator new(0x208u); v34 = (__int64 *)CCMenuItemSpriteExtra::CCMenuItemSpriteExtra((__int64)v48); v35 = (cocos2d::CCObject *)v34; if ( !v34 ) goto LABEL_9; if ( !CCMenuItemSpriteExtra::init(v34, v33, 0, a1, (__int64)GJPathsLayer::onPath) ) break; cocos2d::CCObject::autorelease(v35); LABEL_10: (*(void (__fastcall **)(cocos2d::CCObject *, _QWORD))(*(_QWORD *)v35 + 64LL))(v35, (unsigned int)v32); (*(void (__fastcall **)(_QWORD, cocos2d::CCObject *))(**(_QWORD **)(a1 + 552) + 464LL))( *(_QWORD *)(a1 + 552), v35); v36 = (float)(90.0 - (float)((float)v31 * 36.0)) * 0.0174532925199433; v37 = sinf(v36) * 100.0; v38 = cosf(v36) * 100.0; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v42, v38, v37); cocos2d::CCPoint::operator+(&v47, &v44, v39); v40 = *(_QWORD *)v35; cocos2d::CCNode::convertToNodeSpace(*(_QWORD *)(a1 + 552), &v43, &v44); (*(void (__fastcall **)(cocos2d::CCObject *, __int64))(v40 + 184))(v35, v41); v31 = v32; if ( v32 >= 10 ) return 1; } (*(void (__fastcall **)(cocos2d::CCObject *, __int64))(*(_QWORD *)v35 + 8LL))(v35, 1); LABEL_9: v35 = nullptr; goto LABEL_10; } return result; }
GD Web Decomp Icon

GD Web Decomp

Raw Source