{"type": "func", "start": 4297065360, "end": 4297065529, "name": "GJChestSprite::create", "pseudocode": "// \n// GJChestSprite::create from 0x100200390 to 0x100200439 (169 bytes)\n// \n// 17 xrefs:\n// > RewardUnlockLayer::init @ 0x1001ffc47\n// > DailyLevelNode::init @ 0x1002175ae\n// > GJNotificationCell::loadFromNotification @ 0x1002348c5\n// > LevelCell::loadCustomLevelCell @ 0x100237c5c\n// > GJPathRewardPopup::init @ 0x1002edf22\n// > GJPathRewardPopup::init @ 0x1002edf8e\n// > SecretLayer4::init @ 0x10039aac0\n// > FollowRewardPage::init @ 0x10040ced4\n// > SecretLayer3::init @ 0x10049d60d\n// > SecretLayer3::init @ 0x10049d870\n// > GauntletNode::generateNode @ 0x1005a2753\n// > GauntletNode::generateNode @ 0x1005a27c5\n// > GauntletNode::generateNode @ 0x1005a29fc\n// > GauntletNode::generateNode @ 0x1005a2a6e\n// > SecretRewardsLayer::init @ 0x10070da47\n// > SecretRewardsLayer::init @ 0x10070e066\n// > SecretRewardsLayer::generateChestItems @ 0x100711064\n// \n// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\n// \n// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n// Generated at Fri, 27 Nov 2026 12:26:51 +0000\n// \n\n_QWORD *__fastcall GJChestSprite::create(int a1)\n{\n  _QWORD *v1; // rbx\n\n  v1 = operator new(0x260u);\n  cocos2d::CCSprite::CCSprite(v1);\n  *v1 = off_100AE4C80;\n  v1[40] = off_100AE5168;\n  v1[43] = off_100AE51E8;\n  *(_QWORD *)((char *)v1 + 596) = 0;\n  *((_BYTE *)v1 + 604) = 0;\n  if ( (unsigned __int8)cocos2d::CCSprite::init(v1) )\n  {\n    *((_DWORD *)v1 + 149) = a1;\n    (*(void (__fastcall **)(_QWORD *, void *))(*v1 + 320LL))(v1, &unk_100BE1670);\n    GJChestSprite::switchToState(v1, 2, 0);\n    cocos2d::CCObject::autorelease(v1);\n  }\n  else\n  {\n    (*(void (__fastcall **)(_QWORD *))(*v1 + 16LL))(v1);\n    return nullptr;\n  }\n  return v1;\n}", "assembly": "; \n; GJChestSprite::create from 0x100200390 to 0x100200439 (169 bytes)\n; \n; 17 xrefs:\n; > RewardUnlockLayer::init @ 0x1001ffc47\n; > DailyLevelNode::init @ 0x1002175ae\n; > GJNotificationCell::loadFromNotification @ 0x1002348c5\n; > LevelCell::loadCustomLevelCell @ 0x100237c5c\n; > GJPathRewardPopup::init @ 0x1002edf22\n; > GJPathRewardPopup::init @ 0x1002edf8e\n; > SecretLayer4::init @ 0x10039aac0\n; > FollowRewardPage::init @ 0x10040ced4\n; > SecretLayer3::init @ 0x10049d60d\n; > SecretLayer3::init @ 0x10049d870\n; > GauntletNode::generateNode @ 0x1005a2753\n; > GauntletNode::generateNode @ 0x1005a27c5\n; > GauntletNode::generateNode @ 0x1005a29fc\n; > GauntletNode::generateNode @ 0x1005a2a6e\n; > SecretRewardsLayer::init @ 0x10070da47\n; > SecretRewardsLayer::init @ 0x10070e066\n; > SecretRewardsLayer::generateChestItems @ 0x100711064\n; \n; This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\n; \n; Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n; Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n; Generated at Fri, 27 Nov 2026 12:26:51 +0000\n; \npush    rbp                                                            ; +0x0, 0x100200390\nmov     rbp, rsp                                                       ; +0x1, 0x100200391\npush    r14                                                            ; +0x4, 0x100200394\npush    rbx                                                            ; +0x6, 0x100200396\nmov     r14d, edi                                                      ; +0x7, 0x100200397\nmov     edi, 260h; __sz                                                ; +0xa, 0x10020039a\ncall    __Znwm; operator new(ulong)                                    ; +0xf, 0x10020039f\nmov     rbx, rax                                                       ; +0x14, 0x1002003a4\nmov     rdi, rax                                                       ; +0x17, 0x1002003a7\ncall    cocos2d__CCSprite__CCSprite                                    ; +0x1a, 0x1002003aa\nlea     rax, off_100AE4C80                                             ; +0x1f, 0x1002003af\nmov     [rbx], rax                                                     ; +0x26, 0x1002003b6\nlea     rax, off_100AE5168                                             ; +0x29, 0x1002003b9\nmov     [rbx+140h], rax                                                ; +0x30, 0x1002003c0\nlea     rax, off_100AE51E8                                             ; +0x37, 0x1002003c7\nmov     [rbx+158h], rax                                                ; +0x3e, 0x1002003ce\nmov     qword ptr [rbx+254h], 0                                        ; +0x45, 0x1002003d5\nmov     byte ptr [rbx+25Ch], 0                                         ; +0x50, 0x1002003e0\nmov     rdi, rbx                                                       ; +0x57, 0x1002003e7\ncall    cocos2d__CCSprite__init                                        ; +0x5a, 0x1002003ea\ntest    al, al                                                         ; +0x5f, 0x1002003ef\njz      short loc_100200426                                            ; +0x61, 0x1002003f1\nmov     [rbx+254h], r14d                                               ; +0x63, 0x1002003f3\nmov     rax, [rbx]                                                     ; +0x6a, 0x1002003fa\nlea     rsi, unk_100BE1670                                             ; +0x6d, 0x1002003fd\nmov     rdi, rbx                                                       ; +0x74, 0x100200404\ncall    qword ptr [rax+140h]                                           ; +0x77, 0x100200407\nmov     rdi, rbx                                                       ; +0x7d, 0x10020040d\nmov     esi, 2                                                         ; +0x80, 0x100200410\nxor     edx, edx                                                       ; +0x85, 0x100200415\ncall    GJChestSprite__switchToState                                   ; +0x87, 0x100200417\nmov     rdi, rbx                                                       ; +0x8c, 0x10020041c\ncall    cocos2d__CCObject__autorelease                                 ; +0x8f, 0x10020041f\njmp     short loc_100200431                                            ; +0x94, 0x100200424\nmov     rax, [rbx]                                                     ; +0x96, 0x100200426\nmov     rdi, rbx                                                       ; +0x99, 0x100200429\ncall    qword ptr [rax+10h]                                            ; +0x9c, 0x10020042c\nxor     ebx, ebx                                                       ; +0x9f, 0x10020042f\nmov     rax, rbx                                                       ; +0xa1, 0x100200431\npop     rbx                                                            ; +0xa4, 0x100200434\npop     r14                                                            ; +0xa5, 0x100200435\npop     rbp                                                            ; +0xa7, 0x100200437\nretn                                                                   ; +0xa8, 0x100200438", "xrefs": ["RewardUnlockLayer::init @ 0x1001ffc47", "DailyLevelNode::init @ 0x1002175ae", "GJNotificationCell::loadFromNotification @ 0x1002348c5", "LevelCell::loadCustomLevelCell @ 0x100237c5c", "GJPathRewardPopup::init @ 0x1002edf22", "GJPathRewardPopup::init @ 0x1002edf8e", "SecretLayer4::init @ 0x10039aac0", "FollowRewardPage::init @ 0x10040ced4", "SecretLayer3::init @ 0x10049d60d", "SecretLayer3::init @ 0x10049d870", "GauntletNode::generateNode @ 0x1005a2753", "GauntletNode::generateNode @ 0x1005a27c5", "GauntletNode::generateNode @ 0x1005a29fc", "GauntletNode::generateNode @ 0x1005a2a6e", "SecretRewardsLayer::init @ 0x10070da47", "SecretRewardsLayer::init @ 0x10070e066", "SecretRewardsLayer::generateChestItems @ 0x100711064"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "pc", "bida_info": "8.3.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings"}