{"type": "func", "start": 5371499952, "end": 5371500322, "name": "GJShopLayer::scene", "pseudocode": "// \n// GJShopLayer::scene from 0x1402a95b0 to 0x1402a9722 (370 bytes)\n// \n// 4 xrefs:\n// > GJGarageLayer::onShop @ 0x140278fdf\n// > SecretRewardsLayer::onShop @ 0x1403d688d\n// > SecretRewardsLayer::dialogClosed @ 0x1403d6a74\n// > <???> @ 0x1406d21f8\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\n// local variable allocation has failed, the output may be wrong!\n// Hidden C++ exception states: #wind=1\ncocos2d::CCScene *GJShopLayer::scene(ShopType a1)\n{\n  cocos2d::CCScene *v2; // rsi\n  __int64 v3; // rdx\n  __int64 v4; // rcx\n  GJShopLayer *v5; // rdi\n\n  v2 = (cocos2d::CCScene *)cocos2d::CCScene::create(*(_QWORD *)&a1);\n  *(_QWORD *)(cocos2d::CCApplication::sharedApplication(v4, v3) + 224) = v2;\n  v5 = (GJShopLayer *)operator new(0x218u);\n  cocos2d::CCLayer::CCLayer(v5);\n  v5->cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable = (GJShopLayer_vtbl *)&GJShopLayer::`vftable';\n  v5->cocos2d::CCLayer::cocos2d::CCTouchDelegate::__vftable = (cocos2d::CCTouchDelegate_vtbl *)&GJShopLayer::`vftable';\n  v5->cocos2d::CCLayer::cocos2d::CCAccelerometerDelegate::__vftable = (cocos2d::CCAccelerometerDelegate_vtbl *)&GJShopLayer::`vftable';\n  v5->cocos2d::CCLayer::cocos2d::CCKeypadDelegate::__vftable = (cocos2d::CCKeypadDelegate_vtbl *)&GJShopLayer::`vftable';\n  v5->cocos2d::CCLayer::cocos2d::CCKeyboardDelegate::__vftable = (cocos2d::CCKeyboardDelegate_vtbl *)&GJShopLayer::`vftable';\n  v5->cocos2d::CCLayer::cocos2d::CCMouseDelegate::__vftable = (cocos2d::CCMouseDelegate_vtbl *)&GJShopLayer::`vftable';\n  v5->GJPurchaseDelegate::__vftable = (GJPurchaseDelegate_vtbl *)&GJShopLayer::`vftable';\n  v5->DialogDelegate::__vftable = (DialogDelegate_vtbl *)&GJShopLayer::`vftable';\n  v5->RewardedVideoDelegate::__vftable = (RewardedVideoDelegate_vtbl *)&GJShopLayer::`vftable';\n  v5->m_closing = 0;\n  v5->m_currencyLabel = nullptr;\n  v5->m_shopItems = nullptr;\n  v5->m_type = 0;\n  v5->m_sheetName.m_data.0 = 0;\n  v5->m_sheetName.m_data.m_size = 0;\n  v5->m_sheetName.m_data.m_capacity = 15;\n  v5->m_sheetName.m_data.m_smallStorage._Elems[0] = 0;\n  v5->m_unkNode1 = nullptr;\n  v5->m_unkNode2 = nullptr;\n  *(_WORD *)&v5->m_videoPlaying = 0;\n  v5->m_shopKeeper = nullptr;\n  *(_QWORD *)&v5->m_zolgurothDialogIndex = 0;\n  if ( GJShopLayer::init(v5, a1) )\n  {\n    cocos2d::CCObject::autorelease(v5);\n  }\n  else\n  {\n    ((void (__fastcall *)(GJShopLayer *, __int64))v5->~GJShopLayer)(v5, 1);\n    v5 = nullptr;\n  }\n  v2->addChild_1(v2, v5);\n  return v2;\n}", "assembly": "; \n; GJShopLayer::scene from 0x1402a95b0 to 0x1402a9722 (370 bytes)\n; \n; 4 xrefs:\n; > GJGarageLayer::onShop @ 0x140278fdf\n; > SecretRewardsLayer::onShop @ 0x1403d688d\n; > SecretRewardsLayer::dialogClosed @ 0x1403d6a74\n; > <???> @ 0x1406d21f8\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\nmov     [rsp+arg_0], rbx                                               ; +0x0, 0x1402a95b0\nmov     [rsp+arg_10], rbp                                              ; +0x5, 0x1402a95b5\nmov     [rsp+arg_18], rsi                                              ; +0xa, 0x1402a95ba\npush    rdi                                                            ; +0xf, 0x1402a95bf\nsub     rsp, 20h                                                       ; +0x10, 0x1402a95c0\nmov     ebx, ecx                                                       ; +0x14, 0x1402a95c4\ncall    cs:?create@CCScene@cocos2d@@SAPEAV12@XZ; cocos2d::CCScene::create(void) ; +0x16, 0x1402a95c6\nmov     rsi, rax                                                       ; +0x1c, 0x1402a95cc\ncall    cs:?sharedApplication@CCApplication@cocos2d@@SAPEAV12@XZ; cocos2d::CCApplication::sharedApplication(void) ; +0x1f, 0x1402a95cf\nmov     [rax+0E0h], rsi                                                ; +0x25, 0x1402a95d5\nmov     ecx, 218h; Size                                                ; +0x2c, 0x1402a95dc\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x31, 0x1402a95e1\nmov     rdi, rax                                                       ; +0x36, 0x1402a95e6\nmov     [rsp+28h+arg_8], rax                                           ; +0x39, 0x1402a95e9\nmov     rcx, rax                                                       ; +0x3e, 0x1402a95ee\ncall    cs:??0CCLayer@cocos2d@@QEAA@XZ; cocos2d::CCLayer::CCLayer(void) ; +0x41, 0x1402a95f1\nlea     rax, ??_7GJShopLayer@@6B@; const GJShopLayer::`vftable'        ; +0x47, 0x1402a95f7\nmov     [rdi], rax                                                     ; +0x4e, 0x1402a95fe\nlea     rax, ??_7GJShopLayer@@6B@_0; const GJShopLayer::`vftable'      ; +0x51, 0x1402a9601\nmov     [rdi+140h], rax                                                ; +0x58, 0x1402a9608\nlea     rax, ??_7GJShopLayer@@6B@_1; const GJShopLayer::`vftable'      ; +0x5f, 0x1402a960f\nmov     [rdi+148h], rax                                                ; +0x66, 0x1402a9616\nlea     rax, ??_7GJShopLayer@@6B@_2; const GJShopLayer::`vftable'      ; +0x6d, 0x1402a961d\nmov     [rdi+150h], rax                                                ; +0x74, 0x1402a9624\nlea     rax, ??_7GJShopLayer@@6B@_3; const GJShopLayer::`vftable'      ; +0x7b, 0x1402a962b\nmov     [rdi+158h], rax                                                ; +0x82, 0x1402a9632\nlea     rax, ??_7GJShopLayer@@6B@_4; const GJShopLayer::`vftable'      ; +0x89, 0x1402a9639\nmov     [rdi+160h], rax                                                ; +0x90, 0x1402a9640\nlea     rax, ??_7GJShopLayer@@6B@_5; const GJShopLayer::`vftable'      ; +0x97, 0x1402a9647\nmov     [rdi+198h], rax                                                ; +0x9e, 0x1402a964e\nlea     rax, ??_7GJShopLayer@@6B@_6; const GJShopLayer::`vftable'      ; +0xa5, 0x1402a9655\nmov     [rdi+1A0h], rax                                                ; +0xac, 0x1402a965c\nlea     rax, ??_7GJShopLayer@@6B@_7; const GJShopLayer::`vftable'      ; +0xb3, 0x1402a9663\nmov     [rdi+1A8h], rax                                                ; +0xba, 0x1402a966a\nmov     byte ptr [rdi+1B0h], 0                                         ; +0xc1, 0x1402a9671\nxor     ebp, ebp                                                       ; +0xc8, 0x1402a9678\nmov     [rdi+1B8h], rbp                                                ; +0xca, 0x1402a967a\nmov     [rdi+1C0h], rbp                                                ; +0xd1, 0x1402a9681\nmov     [rdi+1C8h], ebp                                                ; +0xd8, 0x1402a9688\nxorps   xmm0, xmm0                                                     ; +0xde, 0x1402a968e\nmovups  xmmword ptr [rdi+1D0h], xmm0                                   ; +0xe1, 0x1402a9691\nmov     [rdi+1E0h], rbp                                                ; +0xe8, 0x1402a9698\nmov     qword ptr [rdi+1E8h], 0Fh                                      ; +0xef, 0x1402a969f\nmov     [rdi+1D0h], bpl                                                ; +0xfa, 0x1402a96aa\nmov     [rdi+1F0h], rbp                                                ; +0x101, 0x1402a96b1\nmov     [rdi+1F8h], rbp                                                ; +0x108, 0x1402a96b8\nmov     [rdi+200h], bp                                                 ; +0x10f, 0x1402a96bf\nmov     [rdi+208h], rbp                                                ; +0x116, 0x1402a96c6\nmov     [rdi+210h], rbp                                                ; +0x11d, 0x1402a96cd\nmov     edx, ebx                                                       ; +0x124, 0x1402a96d4\nmov     rcx, rdi                                                       ; +0x126, 0x1402a96d6\ncall    GJShopLayer__init                                              ; +0x129, 0x1402a96d9\nmov     rcx, rdi                                                       ; +0x12e, 0x1402a96de\ntest    al, al                                                         ; +0x131, 0x1402a96e1\njz      short loc_1402A96ED                                            ; +0x133, 0x1402a96e3\ncall    cs:?autorelease@CCObject@cocos2d@@QEAAPEAV12@XZ; cocos2d::CCObject::autorelease(void) ; +0x135, 0x1402a96e5\njmp     short loc_1402A96FB                                            ; +0x13b, 0x1402a96eb\nmov     rax, [rdi]                                                     ; +0x13d, 0x1402a96ed\nmov     edx, 1                                                         ; +0x140, 0x1402a96f0\ncall    qword ptr [rax+8]                                              ; +0x145, 0x1402a96f5\nmov     rdi, rbp                                                       ; +0x148, 0x1402a96f8\nmov     rax, [rsi]                                                     ; +0x14b, 0x1402a96fb\nmov     rdx, rdi                                                       ; +0x14e, 0x1402a96fe\nmov     rcx, rsi                                                       ; +0x151, 0x1402a9701\ncall    qword ptr [rax+1C0h]                                           ; +0x154, 0x1402a9704\nmov     rax, rsi                                                       ; +0x15a, 0x1402a970a\nmov     rbx, [rsp+28h+arg_0]                                           ; +0x15d, 0x1402a970d\nmov     rbp, [rsp+28h+arg_10]                                          ; +0x162, 0x1402a9712\nmov     rsi, [rsp+28h+arg_18]                                          ; +0x167, 0x1402a9717\nadd     rsp, 20h                                                       ; +0x16c, 0x1402a971c\npop     rdi                                                            ; +0x170, 0x1402a9720\nretn                                                                   ; +0x171, 0x1402a9721", "xrefs": ["GJGarageLayer::onShop @ 0x140278fdf", "SecretRewardsLayer::onShop @ 0x1403d688d", "SecretRewardsLayer::dialogClosed @ 0x1403d6a74", "<???> @ 0x1406d21f8"], "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"}