{"type": "func", "start": 4297182336, "end": 4297182505, "name": "GJChestSprite::create", "pseudocode": "// \n// GJChestSprite::create from 0x10021cc80 to 0x10021cd29 (169 bytes)\n// \n// 15 xrefs:\n// > RewardUnlockLayer::init @ 0x10021c537\n// > DailyLevelNode::init @ 0x100232f5c\n// > GJPathRewardPopup::init @ 0x100303242\n// > GJPathRewardPopup::init @ 0x1003032ae\n// > SecretLayer4::init @ 0x1003b16c0\n// > FollowRewardPage::init @ 0x100420393\n// > SecretLayer3::init @ 0x1004a463d\n// > SecretLayer3::init @ 0x1004a48a0\n// > GauntletNode::generateNode @ 0x100575388\n// > GauntletNode::generateNode @ 0x1005753fa\n// > GauntletNode::generateNode @ 0x100575631\n// > GauntletNode::generateNode @ 0x1005756a3\n// > SecretRewardsLayer::init @ 0x100630e17\n// > SecretRewardsLayer::init @ 0x100631436\n// > SecretRewardsLayer::generateChestItems @ 0x100634434\n// \n// This function is hookable on this platform!\n// \n// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings\n// \n\nGJChestSprite *__fastcall GJChestSprite::create(int a1)\n{\n  GJChestSprite *v1; // rbx\n\n  v1 = (GJChestSprite *)operator new(0x260u);\n  cocos2d::CCSprite::CCSprite(v1);\n  v1->cocos2d::CCSprite::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable = (GJChestSprite_vtbl *)off_1008E06A0;\n  v1->cocos2d::CCSprite::cocos2d::CCNodeRGBA::cocos2d::CCRGBAProtocol::__vftable = (cocos2d::CCRGBAProtocol_vtbl *)off_1008E0B78;\n  v1->cocos2d::CCSprite::cocos2d::CCTextureProtocol::cocos2d::CCBlendProtocol::__vftable = (cocos2d::CCTextureProtocol_vtbl *)off_1008E0BF8;\n  *(_QWORD *)&v1->m_chestType = 0;\n  v1->m_dark = 0;\n  if ( cocos2d::CCSprite::init(v1) )\n  {\n    v1->m_chestType = a1;\n    ((void (__fastcall *)(GJChestSprite *, void *))v1->setContentSize)(v1, &unk_10099F3F8);\n    GJChestSprite::switchToState(v1, Closed, 0);\n    cocos2d::CCObject::autorelease(v1);\n  }\n  else\n  {\n    ((void (__fastcall *)(GJChestSprite *))v1->~GJChestSprite_0)(v1);\n    return nullptr;\n  }\n  return v1;\n}", "assembly": "; \n; GJChestSprite::create from 0x10021cc80 to 0x10021cd29 (169 bytes)\n; \n; 15 xrefs:\n; > RewardUnlockLayer::init @ 0x10021c537\n; > DailyLevelNode::init @ 0x100232f5c\n; > GJPathRewardPopup::init @ 0x100303242\n; > GJPathRewardPopup::init @ 0x1003032ae\n; > SecretLayer4::init @ 0x1003b16c0\n; > FollowRewardPage::init @ 0x100420393\n; > SecretLayer3::init @ 0x1004a463d\n; > SecretLayer3::init @ 0x1004a48a0\n; > GauntletNode::generateNode @ 0x100575388\n; > GauntletNode::generateNode @ 0x1005753fa\n; > GauntletNode::generateNode @ 0x100575631\n; > GauntletNode::generateNode @ 0x1005756a3\n; > SecretRewardsLayer::init @ 0x100630e17\n; > SecretRewardsLayer::init @ 0x100631436\n; > SecretRewardsLayer::generateChestItems @ 0x100634434\n; \n; This function is hookable on this platform!\n; \n; Using BromaIDA 8.0.0 @ https:;github.com/Stazzical/BromaIDA\n; Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https:;github.com/geode-sdk/bindings\n; \n\npush    rbp                                                            ; +0x0, 0x10021cc80\nmov     rbp, rsp                                                       ; +0x1, 0x10021cc81\npush    r14                                                            ; +0x4, 0x10021cc84\npush    rbx                                                            ; +0x6, 0x10021cc86\nmov     r14d, edi                                                      ; +0x7, 0x10021cc87\nmov     edi, 260h; __sz                                                ; +0xa, 0x10021cc8a\ncall    __Znwm; operator new(ulong)                                    ; +0xf, 0x10021cc8f\nmov     rbx, rax                                                       ; +0x14, 0x10021cc94\nmov     rdi, rax                                                       ; +0x17, 0x10021cc97\ncall    cocos2d__CCSprite__CCSprite                                    ; +0x1a, 0x10021cc9a\nlea     rax, off_1008E06A0                                             ; +0x1f, 0x10021cc9f\nmov     [rbx], rax                                                     ; +0x26, 0x10021cca6\nlea     rax, off_1008E0B78                                             ; +0x29, 0x10021cca9\nmov     [rbx+140h], rax                                                ; +0x30, 0x10021ccb0\nlea     rax, off_1008E0BF8                                             ; +0x37, 0x10021ccb7\nmov     [rbx+158h], rax                                                ; +0x3e, 0x10021ccbe\nmov     qword ptr [rbx+254h], 0                                        ; +0x45, 0x10021ccc5\nmov     byte ptr [rbx+25Ch], 0                                         ; +0x50, 0x10021ccd0\nmov     rdi, rbx                                                       ; +0x57, 0x10021ccd7\ncall    cocos2d__CCSprite__init                                        ; +0x5a, 0x10021ccda\ntest    al, al                                                         ; +0x5f, 0x10021ccdf\njz      short loc_10021CD16                                            ; +0x61, 0x10021cce1\nmov     [rbx+254h], r14d                                               ; +0x63, 0x10021cce3\nmov     rax, [rbx]                                                     ; +0x6a, 0x10021ccea\nlea     rsi, unk_10099F3F8                                             ; +0x6d, 0x10021cced\nmov     rdi, rbx                                                       ; +0x74, 0x10021ccf4\ncall    qword ptr [rax+130h]                                           ; +0x77, 0x10021ccf7\nmov     rdi, rbx                                                       ; +0x7d, 0x10021ccfd\nmov     esi, 2                                                         ; +0x80, 0x10021cd00\nxor     edx, edx                                                       ; +0x85, 0x10021cd05\ncall    GJChestSprite__switchToState                                   ; +0x87, 0x10021cd07\nmov     rdi, rbx                                                       ; +0x8c, 0x10021cd0c\ncall    cocos2d__CCObject__autorelease                                 ; +0x8f, 0x10021cd0f\njmp     short loc_10021CD21                                            ; +0x94, 0x10021cd14\nmov     rax, [rbx]                                                     ; +0x96, 0x10021cd16\nmov     rdi, rbx                                                       ; +0x99, 0x10021cd19\ncall    qword ptr [rax+10h]                                            ; +0x9c, 0x10021cd1c\nxor     ebx, ebx                                                       ; +0x9f, 0x10021cd1f\nmov     rax, rbx                                                       ; +0xa1, 0x10021cd21\npop     rbx                                                            ; +0xa4, 0x10021cd24\npop     r14                                                            ; +0xa5, 0x10021cd25\npop     rbp                                                            ; +0xa7, 0x10021cd27\nretn                                                                   ; +0xa8, 0x10021cd28", "xrefs": ["RewardUnlockLayer::init @ 0x10021c537", "DailyLevelNode::init @ 0x100232f5c", "GJPathRewardPopup::init @ 0x100303242", "GJPathRewardPopup::init @ 0x1003032ae", "SecretLayer4::init @ 0x1003b16c0", "FollowRewardPage::init @ 0x100420393", "SecretLayer3::init @ 0x1004a463d", "SecretLayer3::init @ 0x1004a48a0", "GauntletNode::generateNode @ 0x100575388", "GauntletNode::generateNode @ 0x1005753fa", "GauntletNode::generateNode @ 0x100575631", "GauntletNode::generateNode @ 0x1005756a3", "SecretRewardsLayer::init @ 0x100630e17", "SecretRewardsLayer::init @ 0x100631436", "SecretRewardsLayer::generateChestItems @ 0x100634434"], "is_objc": false, "is_arm32": false, "is_arm64": false, "bida_info": "8.0.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings"}