{"type": "func", "start": 4298555168, "end": 4298555515, "name": "GJGarageLayer::onBack", "pseudocode": "// \n// GJGarageLayer::onBack from 0x10036bf20 to 0x10036c07b (347 bytes)\n// \n// 3 xrefs:\n// > GJGarageLayer::keyBackClicked @ 0x10036fe75\n// > sub_10036FE80 @ 0x10036fe8c\n// > GJGarageLayer::init @ 0x100369f45\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\nvoid __fastcall GJGarageLayer::onBack(GJGarageLayer *a1, cocos2d::CCObject *a2)\n{\n  cocos2d::CCDirector *v3; // rax\n  cocos2d::CCScene *m_pNextScene; // rdi\n  cocos2d::CCMoveTo *v5; // rax\n  unsigned int v6; // r14d\n  unsigned int v7; // eax\n  int v8; // ecx\n  int v9; // r8d\n  int v10; // r9d\n  cocos2d::CCAction *v11; // rax\n  cocos2d::CCDirector *v12; // rbx\n  cocos2d::CCScene *v13; // rax\n  cocos2d::CCTransitionFade *v14; // rax\n  cocos2d::CCPoint v15; // [rsp+0h] [rbp-20h] BYREF\n  char v16; // [rsp+8h] [rbp-18h] BYREF\n  float v17; // [rsp+Ch] [rbp-14h]\n\n  if ( !a1->m_hasClosed )\n  {\n    ((void (__fastcall *)(GJGarageLayer *, _QWORD))a1->setKeypadEnabled)(a1, 0);\n    if ( GameManager::sharedState()->m_ropeGarageEnter )\n    {\n      GameManager::sharedState()->m_ropeGarageEnter = 0;\n      cocos2d::CCObject::retain(a1);\n      ((void (__fastcall *)(GJGarageLayer *))a1->removeFromParent)(a1);\n      ((void (__fastcall *)(GJGarageLayer *, _QWORD))a1->setKeypadEnabled)(a1, 0);\n      v3 = cocos2d::CCDirector::sharedDirector();\n      cocos2d::CCDirector::popScene(v3);\n      m_pNextScene = cocos2d::CCDirector::sharedDirector()->m_pNextScene;\n      if ( m_pNextScene )\n      {\n        a1->m_hasClosed = 1;\n        ((void (__fastcall *)(cocos2d::CCScene *, GJGarageLayer *, __int64))m_pNextScene->addChild_0)(\n          m_pNextScene,\n          a1,\n          1000);\n        cocos2d::CCObject::release(a1);\n        cocos2d::CCDirector::sharedDirector();\n        cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)&v16);\n        sub_10028CBE0((float *)&v15, 0.0, v17);\n        v5 = cocos2d::CCMoveTo::create(0.30000001, &v15);\n        v6 = (unsigned int)cocos2d::CCEaseIn::create(v5, 2.0);\n        v7 = (unsigned int)cocos2d::CCCallFunc::create(a1, (cocos2d::SEL_CallFunc)0x209uLL);\n        v11 = (cocos2d::CCAction *)sub_1003B5760(v6, v7, 0, v8, v9, v10);\n        cocos2d::CCNode::runAction(a1, v11);\n      }\n    }\n    else\n    {\n      a1->m_hasClosed = 1;\n      v12 = cocos2d::CCDirector::sharedDirector();\n      v13 = MenuLayer::scene(0);\n      v14 = cocos2d::CCTransitionFade::create_1(0.5, v13);\n      cocos2d::CCDirector::replaceScene(v12, v14);\n    }\n  }\n}", "assembly": "; \n; GJGarageLayer::onBack from 0x10036bf20 to 0x10036c07b (347 bytes)\n; \n; 3 xrefs:\n; > GJGarageLayer::keyBackClicked @ 0x10036fe75\n; > sub_10036FE80 @ 0x10036fe8c\n; > GJGarageLayer::init @ 0x100369f45\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, 0x10036bf20\nmov     rbp, rsp                                                       ; +0x1, 0x10036bf21\npush    r14                                                            ; +0x4, 0x10036bf24\npush    rbx                                                            ; +0x6, 0x10036bf26\nsub     rsp, 10h                                                       ; +0x7, 0x10036bf27\ncmp     byte ptr [rdi+200h], 0                                         ; +0xb, 0x10036bf2b\njnz     loc_10036C039                                                  ; +0x12, 0x10036bf32\nmov     rbx, rdi                                                       ; +0x18, 0x10036bf38\nmov     rax, [rdi]                                                     ; +0x1b, 0x10036bf3b\nxor     esi, esi                                                       ; +0x1e, 0x10036bf3e\ncall    qword ptr [rax+420h]                                           ; +0x20, 0x10036bf40\ncall    GameManager__sharedState                                       ; +0x26, 0x10036bf46\ncmp     byte ptr [rax+3F8h], 0                                         ; +0x2b, 0x10036bf4b\njz      loc_10036C042                                                  ; +0x32, 0x10036bf52\ncall    GameManager__sharedState                                       ; +0x38, 0x10036bf58\nmov     byte ptr [rax+3F8h], 0                                         ; +0x3d, 0x10036bf5d\nmov     rdi, rbx                                                       ; +0x44, 0x10036bf64\ncall    cocos2d__CCObject__retain                                      ; +0x47, 0x10036bf67\nmov     rax, [rbx]                                                     ; +0x4c, 0x10036bf6c\nmov     rdi, rbx                                                       ; +0x4f, 0x10036bf6f\ncall    qword ptr [rax+1F8h]                                           ; +0x52, 0x10036bf72\nmov     rax, [rbx]                                                     ; +0x58, 0x10036bf78\nmov     rdi, rbx                                                       ; +0x5b, 0x10036bf7b\nxor     esi, esi                                                       ; +0x5e, 0x10036bf7e\ncall    qword ptr [rax+420h]                                           ; +0x60, 0x10036bf80\ncall    cocos2d__CCDirector__sharedDirector                            ; +0x66, 0x10036bf86\nmov     rdi, rax                                                       ; +0x6b, 0x10036bf8b\ncall    cocos2d__CCDirector__popScene                                  ; +0x6e, 0x10036bf8e\ncall    cocos2d__CCDirector__sharedDirector                            ; +0x73, 0x10036bf93\nmov     rdi, [rax+110h]                                                ; +0x78, 0x10036bf98\ntest    rdi, rdi                                                       ; +0x7f, 0x10036bf9f\njz      loc_10036C039                                                  ; +0x82, 0x10036bfa2\nmov     byte ptr [rbx+200h], 1                                         ; +0x88, 0x10036bfa8\nmov     rax, [rdi]                                                     ; +0x8f, 0x10036bfaf\nmov     rsi, rbx                                                       ; +0x92, 0x10036bfb2\nmov     edx, 3E8h                                                      ; +0x95, 0x10036bfb5\ncall    qword ptr [rax+1C0h]                                           ; +0x9a, 0x10036bfba\nmov     rdi, rbx                                                       ; +0xa0, 0x10036bfc0\ncall    cocos2d__CCObject__release                                     ; +0xa3, 0x10036bfc3\ncall    cocos2d__CCDirector__sharedDirector                            ; +0xa8, 0x10036bfc8\nlea     rdi, [rbp+var_18]                                              ; +0xad, 0x10036bfcd\nmov     rsi, rax                                                       ; +0xb1, 0x10036bfd1\ncall    cocos2d__CCDirector__getWinSize                                ; +0xb4, 0x10036bfd4\nmovss   xmm1, [rbp+var_14]                                             ; +0xb9, 0x10036bfd9\nlea     r14, [rbp+var_20]                                              ; +0xbe, 0x10036bfde\nxorps   xmm0, xmm0                                                     ; +0xc2, 0x10036bfe2\nmov     rdi, r14                                                       ; +0xc5, 0x10036bfe5\ncall    sub_10028CBE0                                                  ; +0xc8, 0x10036bfe8\nmovss   xmm0, cs:dword_100815420                                       ; +0xcd, 0x10036bfed\nmov     rdi, r14                                                       ; +0xd5, 0x10036bff5\ncall    cocos2d__CCMoveTo__create                                      ; +0xd8, 0x10036bff8\nmovss   xmm0, cs:width                                                 ; +0xdd, 0x10036bffd\nmov     rdi, rax                                                       ; +0xe5, 0x10036c005\ncall    cocos2d__CCEaseIn__create                                      ; +0xe8, 0x10036c008\nmov     r14, rax                                                       ; +0xed, 0x10036c00d\nmov     esi, 209h                                                      ; +0xf0, 0x10036c010\nmov     rdi, rbx                                                       ; +0xf5, 0x10036c015\nxor     edx, edx                                                       ; +0xf8, 0x10036c018\ncall    cocos2d__CCCallFunc__create                                    ; +0xfa, 0x10036c01a\nmov     rdi, r14                                                       ; +0xff, 0x10036c01f\nmov     rsi, rax                                                       ; +0x102, 0x10036c022\nxor     edx, edx                                                       ; +0x105, 0x10036c025\nxor     eax, eax                                                       ; +0x107, 0x10036c027\ncall    sub_1003B5760                                                  ; +0x109, 0x10036c029\nmov     rdi, rbx                                                       ; +0x10e, 0x10036c02e\nmov     rsi, rax                                                       ; +0x111, 0x10036c031\ncall    cocos2d__CCNode__runAction                                     ; +0x114, 0x10036c034\nadd     rsp, 10h                                                       ; +0x119, 0x10036c039\npop     rbx                                                            ; +0x11d, 0x10036c03d\npop     r14                                                            ; +0x11e, 0x10036c03e\npop     rbp                                                            ; +0x120, 0x10036c040\nretn                                                                   ; +0x121, 0x10036c041\nmov     byte ptr [rbx+200h], 1                                         ; +0x122, 0x10036c042\ncall    cocos2d__CCDirector__sharedDirector                            ; +0x129, 0x10036c049\nmov     rbx, rax                                                       ; +0x12e, 0x10036c04e\nxor     edi, edi                                                       ; +0x131, 0x10036c051\ncall    MenuLayer__scene                                               ; +0x133, 0x10036c053\nmovss   xmm0, cs:dword_100814FA8                                       ; +0x138, 0x10036c058\nmov     rdi, rax                                                       ; +0x140, 0x10036c060\ncall    cocos2d__CCTransitionFade__create_1                            ; +0x143, 0x10036c063\nmov     rdi, rbx                                                       ; +0x148, 0x10036c068\nmov     rsi, rax                                                       ; +0x14b, 0x10036c06b\nadd     rsp, 10h                                                       ; +0x14e, 0x10036c06e\npop     rbx                                                            ; +0x152, 0x10036c072\npop     r14                                                            ; +0x153, 0x10036c073\npop     rbp                                                            ; +0x155, 0x10036c075\njmp     cocos2d__CCDirector__replaceScene                              ; +0x156, 0x10036c076", "xrefs": ["GJGarageLayer::keyBackClicked @ 0x10036fe75", "sub_10036FE80 @ 0x10036fe8c", "GJGarageLayer::init @ 0x100369f45"], "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"}