{"type": "func", "start": 5372360192, "end": 5372360636, "name": "GJGarageLayer::scene", "pseudocode": "// \n// GJGarageLayer::scene from 0x14037b600 to 0x14037b7bc (444 bytes)\n// \n// 5 xrefs:\n// > GJShopLayer::onBack @ 0x1403b3126\n// > GJShopLayer::dialogClosed @ 0x1403b4b6c\n// > LevelInfoLayer::onGarage @ 0x14041ee9f\n// > MenuLayer::onGarage @ 0x140474fe9\n// > <???> @ 0x1409227fc\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 11:31:03 +0000\n// \n\n// Hidden C++ exception states: #wind=2\n__int64 __fastcall GJGarageLayer::scene(__int64 a1, __int64 a2, __int64 a3, __int64 a4)\n{\n  __int64 v4; // rsi\n  __int64 v5; // rcx\n  cocos2d::CCLayer *v6; // rdi\n  _QWORD *v7; // rax\n  __int64 (__fastcall *v8)(cocos2d::CCLayer *); // rdx\n  char v9; // al\n\n  v4 = cocos2d::CCScene::create(a1, a2, a3, a4);\n  *(_QWORD *)(cocos2d::CCApplication::sharedApplication(v5) + 232) = v4;\n  v6 = (cocos2d::CCLayer *)operator new(0x260u);\n  cocos2d::CCLayer::CCLayer(v6);\n  *(_QWORD *)v6 = &GJGarageLayer::`vftable';\n  *((_QWORD *)v6 + 40) = &GJGarageLayer::`vftable';\n  *((_QWORD *)v6 + 41) = &GJGarageLayer::`vftable';\n  *((_QWORD *)v6 + 42) = &GJGarageLayer::`vftable';\n  *((_QWORD *)v6 + 43) = &GJGarageLayer::`vftable';\n  *((_QWORD *)v6 + 44) = &GJGarageLayer::`vftable';\n  *((_QWORD *)v6 + 51) = &GJGarageLayer::`vftable';\n  *((_QWORD *)v6 + 52) = &GJGarageLayer::`vftable';\n  *((_QWORD *)v6 + 53) = &GJGarageLayer::`vftable';\n  *((_QWORD *)v6 + 54) = &GJGarageLayer::`vftable';\n  *((_QWORD *)v6 + 55) = &GJGarageLayer::`vftable';\n  *((_QWORD *)v6 + 56) = &GJGarageLayer::`vftable';\n  *((_QWORD *)v6 + 57) = &GJGarageLayer::`vftable';\n  *((_QWORD *)v6 + 59) = 0;\n  *((_QWORD *)v6 + 62) = 0;\n  *((_QWORD *)v6 + 63) = 0;\n  *((_BYTE *)v6 + 512) = 0;\n  *((_QWORD *)v6 + 65) = 0;\n  *((_QWORD *)v6 + 66) = 0;\n  v7 = operator new(0x28u);\n  *v7 = v7;\n  v7[1] = v7;\n  v7[2] = v7;\n  *((_WORD *)v7 + 12) = 257;\n  *((_QWORD *)v6 + 65) = v7;\n  *((_QWORD *)v6 + 68) = 0;\n  *((_QWORD *)v6 + 69) = 0;\n  *((_QWORD *)v6 + 70) = 0;\n  *((_QWORD *)v6 + 74) = 0;\n  *((_BYTE *)v6 + 600) = 0;\n  v8 = *(__int64 (__fastcall **)(cocos2d::CCLayer *))(*(_QWORD *)v6 + 72LL);\n  if ( (char *)v8 == (char *)GJGarageLayer::init )\n    v9 = GJGarageLayer::init(v6);\n  else\n    v9 = v8(v6);\n  if ( v9 )\n  {\n    cocos2d::CCObject::autorelease(v6);\n  }\n  else\n  {\n    (*(void (__fastcall **)(cocos2d::CCLayer *, __int64))(*(_QWORD *)v6 + 8LL))(v6, 1);\n    v6 = nullptr;\n  }\n  (*(void (__fastcall **)(__int64, cocos2d::CCLayer *))(*(_QWORD *)v4 + 464LL))(v4, v6);\n  return v4;\n}", "assembly": "; \n; GJGarageLayer::scene from 0x14037b600 to 0x14037b7bc (444 bytes)\n; \n; 5 xrefs:\n; > GJShopLayer::onBack @ 0x1403b3126\n; > GJShopLayer::dialogClosed @ 0x1403b4b6c\n; > LevelInfoLayer::onGarage @ 0x14041ee9f\n; > MenuLayer::onGarage @ 0x140474fe9\n; > <???> @ 0x1409227fc\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 11:31:03 +0000\n; \nmov     [rsp+arg_10], rbx                                              ; +0x0, 0x14037b600\npush    rbp                                                            ; +0x5, 0x14037b605\npush    rsi                                                            ; +0x6, 0x14037b606\npush    rdi                                                            ; +0x7, 0x14037b607\nsub     rsp, 20h                                                       ; +0x8, 0x14037b608\ncall    cs:?create@CCScene@cocos2d@@SAPEAV12@XZ; cocos2d::CCScene::create(void) ; +0xc, 0x14037b60c\nmov     rsi, rax                                                       ; +0x12, 0x14037b612\ncall    cs:?sharedApplication@CCApplication@cocos2d@@SAPEAV12@XZ; cocos2d::CCApplication::sharedApplication(void) ; +0x15, 0x14037b615\nmov     [rax+0E8h], rsi                                                ; +0x1b, 0x14037b61b\nmov     ecx, 260h; Size                                                ; +0x22, 0x14037b622\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x27, 0x14037b627\nmov     rdi, rax                                                       ; +0x2c, 0x14037b62c\nmov     [rsp+38h+arg_0], rax                                           ; +0x2f, 0x14037b62f\nmov     rcx, rax                                                       ; +0x34, 0x14037b634\ncall    cs:??0CCLayer@cocos2d@@QEAA@XZ; cocos2d::CCLayer::CCLayer(void) ; +0x37, 0x14037b637\nnop                                                                    ; +0x3d, 0x14037b63d\nlea     rax, ??_7GJGarageLayer@@6B@; const GJGarageLayer::`vftable'    ; +0x3e, 0x14037b63e\nmov     [rdi], rax                                                     ; +0x45, 0x14037b645\nlea     rax, ??_7GJGarageLayer@@6B@_0; const GJGarageLayer::`vftable'  ; +0x48, 0x14037b648\nmov     [rdi+140h], rax                                                ; +0x4f, 0x14037b64f\nlea     rax, ??_7GJGarageLayer@@6B@_1; const GJGarageLayer::`vftable'  ; +0x56, 0x14037b656\nmov     [rdi+148h], rax                                                ; +0x5d, 0x14037b65d\nlea     rax, ??_7GJGarageLayer@@6B@_2; const GJGarageLayer::`vftable'  ; +0x64, 0x14037b664\nmov     [rdi+150h], rax                                                ; +0x6b, 0x14037b66b\nlea     rax, ??_7GJGarageLayer@@6B@_3; const GJGarageLayer::`vftable'  ; +0x72, 0x14037b672\nmov     [rdi+158h], rax                                                ; +0x79, 0x14037b679\nlea     rax, ??_7GJGarageLayer@@6B@_4; const GJGarageLayer::`vftable'  ; +0x80, 0x14037b680\nmov     [rdi+160h], rax                                                ; +0x87, 0x14037b687\nlea     rax, ??_7GJGarageLayer@@6B@_5; const GJGarageLayer::`vftable'  ; +0x8e, 0x14037b68e\nmov     [rdi+198h], rax                                                ; +0x95, 0x14037b695\nlea     rax, ??_7GJGarageLayer@@6B@_6; const GJGarageLayer::`vftable'  ; +0x9c, 0x14037b69c\nmov     [rdi+1A0h], rax                                                ; +0xa3, 0x14037b6a3\nlea     rax, ??_7GJGarageLayer@@6B@_7; const GJGarageLayer::`vftable'  ; +0xaa, 0x14037b6aa\nmov     [rdi+1A8h], rax                                                ; +0xb1, 0x14037b6b1\nlea     rax, ??_7GJGarageLayer@@6B@_8; const GJGarageLayer::`vftable'  ; +0xb8, 0x14037b6b8\nmov     [rdi+1B0h], rax                                                ; +0xbf, 0x14037b6bf\nlea     rax, ??_7GJGarageLayer@@6B@_9; const GJGarageLayer::`vftable'  ; +0xc6, 0x14037b6c6\nmov     [rdi+1B8h], rax                                                ; +0xcd, 0x14037b6cd\nlea     rax, ??_7GJGarageLayer@@6B@_10; const GJGarageLayer::`vftable' ; +0xd4, 0x14037b6d4\nmov     [rdi+1C0h], rax                                                ; +0xdb, 0x14037b6db\nlea     rax, ??_7GJGarageLayer@@6B@_11; const GJGarageLayer::`vftable' ; +0xe2, 0x14037b6e2\nmov     [rdi+1C8h], rax                                                ; +0xe9, 0x14037b6e9\nxor     ebp, ebp                                                       ; +0xf0, 0x14037b6f0\nmov     [rdi+1D8h], rbp                                                ; +0xf2, 0x14037b6f2\nmov     [rdi+1F0h], rbp                                                ; +0xf9, 0x14037b6f9\nmov     [rdi+1F8h], rbp                                                ; +0x100, 0x14037b700\nmov     [rdi+200h], bpl                                                ; +0x107, 0x14037b707\nmov     [rdi+208h], rbp                                                ; +0x10e, 0x14037b70e\nmov     [rdi+210h], rbp                                                ; +0x115, 0x14037b715\nmov     ecx, 28h ; '('; Size                                           ; +0x11c, 0x14037b71c\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x121, 0x14037b721\nmov     [rax], rax                                                     ; +0x126, 0x14037b726\nmov     [rax+8], rax                                                   ; +0x129, 0x14037b729\nmov     [rax+10h], rax                                                 ; +0x12d, 0x14037b72d\nmov     word ptr [rax+18h], 101h                                       ; +0x131, 0x14037b731\nmov     [rdi+208h], rax                                                ; +0x137, 0x14037b737\nmov     [rdi+220h], rbp                                                ; +0x13e, 0x14037b73e\nmov     [rdi+228h], rbp                                                ; +0x145, 0x14037b745\nmov     [rdi+230h], rbp                                                ; +0x14c, 0x14037b74c\nmov     [rdi+250h], rbp                                                ; +0x153, 0x14037b753\nmov     [rdi+258h], bpl                                                ; +0x15a, 0x14037b75a\nmov     rax, [rdi]                                                     ; +0x161, 0x14037b761\nmov     rdx, [rax+48h]                                                 ; +0x164, 0x14037b764\nlea     rax, GJGarageLayer__init                                       ; +0x168, 0x14037b768\nmov     rcx, rdi                                                       ; +0x16f, 0x14037b76f\ncmp     rdx, rax                                                       ; +0x172, 0x14037b772\njnz     short loc_14037B77E                                            ; +0x175, 0x14037b775\ncall    GJGarageLayer__init                                            ; +0x177, 0x14037b777\njmp     short loc_14037B780                                            ; +0x17c, 0x14037b77c\ncall    rdx                                                            ; +0x17e, 0x14037b77e\nmov     rcx, rdi                                                       ; +0x180, 0x14037b780\ntest    al, al                                                         ; +0x183, 0x14037b783\njz      short loc_14037B78F                                            ; +0x185, 0x14037b785\ncall    cs:?autorelease@CCObject@cocos2d@@QEAAPEAV12@XZ; cocos2d::CCObject::autorelease(void) ; +0x187, 0x14037b787\njmp     short loc_14037B79D                                            ; +0x18d, 0x14037b78d\nmov     rax, [rdi]                                                     ; +0x18f, 0x14037b78f\nmov     edx, 1                                                         ; +0x192, 0x14037b792\ncall    qword ptr [rax+8]                                              ; +0x197, 0x14037b797\nmov     rdi, rbp                                                       ; +0x19a, 0x14037b79a\nmov     rax, [rsi]                                                     ; +0x19d, 0x14037b79d\nmov     rdx, rdi                                                       ; +0x1a0, 0x14037b7a0\nmov     rcx, rsi                                                       ; +0x1a3, 0x14037b7a3\ncall    qword ptr [rax+1D0h]                                           ; +0x1a6, 0x14037b7a6\nmov     rax, rsi                                                       ; +0x1ac, 0x14037b7ac\nmov     rbx, [rsp+38h+arg_10]                                          ; +0x1af, 0x14037b7af\nadd     rsp, 20h                                                       ; +0x1b4, 0x14037b7b4\npop     rdi                                                            ; +0x1b8, 0x14037b7b8\npop     rsi                                                            ; +0x1b9, 0x14037b7b9\npop     rbp                                                            ; +0x1ba, 0x14037b7ba\nretn                                                                   ; +0x1bb, 0x14037b7bb", "xrefs": ["GJShopLayer::onBack @ 0x1403b3126", "GJShopLayer::dialogClosed @ 0x1403b4b6c", "LevelInfoLayer::onGarage @ 0x14041ee9f", "MenuLayer::onGarage @ 0x140474fe9", "<???> @ 0x1409227fc"], "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"}