{"type": "func", "start": 5371301936, "end": 5371302348, "name": "GJGarageLayer::onBack", "pseudocode": "// \n// GJGarageLayer::onBack from 0x140279030 to 0x1402791cc (412 bytes)\n// \n// 3 xrefs:\n// > GJGarageLayer::keyBackClicked @ 0x1402791d9\n// > GJGarageLayer::init @ 0x140273c5b\n// > <???> @ 0x1406d104c\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// Hidden C++ exception states: #wind=2\nvoid GJGarageLayer::onBack(GJGarageLayer *a1, cocos2d::CCObject *a2)\n{\n  float v2; // xmm0_4\n  float v3; // xmm3_4\n  __int64 v5; // rax\n  struct cocos2d::CCScene *v6; // rax\n  struct cocos2d::CCTransitionFade *v7; // rbx\n  __int64 v8; // rcx\n  cocos2d::CCDirector *v9; // rax\n  __int64 v10; // rcx\n  cocos2d::CCDirector *v11; // rax\n  __int64 v12; // rcx\n  __int64 v13; // rcx\n  __int64 v14; // rcx\n  cocos2d::CCDirector *v15; // rax\n  const struct cocos2d::CCPoint *v16; // rax\n  struct cocos2d::CCMoveTo *v17; // rax\n  struct cocos2d::CCEaseIn *v18; // rbx\n  __int64 v19; // rax\n  struct cocos2d::CCSequence *v20; // rax\n  cocos2d::ccColor3B *v21; // r8\n  float v22; // [rsp+20h] [rbp-8h]\n  void *v23; // [rsp+30h] [rbp+8h]\n\n  if ( !a1->m_hasClosed )\n  {\n    a1->setKeypadEnabled(a1, 0);\n    v5 = qword_1406C2ED8;\n    if ( !qword_1406C2ED8 )\n    {\n      v23 = operator new(0x668u);\n      qword_1406C2ED8 = sub_14017AB00((__int64)v23);\n      (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);\n      v5 = qword_1406C2ED8;\n    }\n    if ( *(_BYTE *)(v5 + 1048) )\n    {\n      *(_BYTE *)(v5 + 1048) = 0;\n      cocos2d::CCObject::retain(a1);\n      a1->removeFromParent(a1);\n      a1->setKeypadEnabled(a1, 0);\n      v11 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v10);\n      cocos2d::CCDirector::popScene(v11);\n      v13 = *(_QWORD *)(cocos2d::CCDirector::sharedDirector(v12) + 272);\n      if ( v13 )\n      {\n        a1->m_hasClosed = 1;\n        (*(void (__fastcall **)(__int64, GJGarageLayer *, __int64))(*(_QWORD *)v13 + 440LL))(v13, a1, 1000);\n        cocos2d::CCObject::release(a1);\n        v15 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v14);\n        cocos2d::CCDirector::getWinSize(v15);\n        cocos2d::CCPoint::CCPoint(v2, 0.0);\n        v17 = cocos2d::CCMoveTo::create(0.30000001, v16);\n        v18 = cocos2d::CCEaseIn::create(v17, 2.0);\n        v19 = cocos2d::CCCallFunc::create(a1, sub_14003BE70);\n        v20 = cocos2d::CCSequence::create(v18, v19, 0);\n        cocos2d::CCNode::runAction((CCLightFlash *)a1, (cocos2d::CCPoint)v20, v21, v3, v22);\n      }\n    }\n    else\n    {\n      a1->m_hasClosed = 1;\n      v6 = MenuLayer::scene(0);\n      v7 = cocos2d::CCTransitionFade::create(0.5, v6);\n      v9 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v8);\n      cocos2d::CCDirector::replaceScene(v9, v7);\n    }\n  }\n}", "assembly": "; \n; GJGarageLayer::onBack from 0x140279030 to 0x1402791cc (412 bytes)\n; \n; 3 xrefs:\n; > GJGarageLayer::keyBackClicked @ 0x1402791d9\n; > GJGarageLayer::init @ 0x140273c5b\n; > <???> @ 0x1406d104c\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_8], rbx                                               ; +0x0, 0x140279030\npush    rdi                                                            ; +0x5, 0x140279035\nsub     rsp, 20h                                                       ; +0x6, 0x140279036\nmov     rdi, rcx                                                       ; +0xa, 0x14027903a\ncmp     byte ptr [rcx+200h], 0                                         ; +0xd, 0x14027903d\njnz     loc_1402791C1                                                  ; +0x14, 0x140279044\nmov     rax, [rcx]                                                     ; +0x1a, 0x14027904a\nxor     edx, edx                                                       ; +0x1d, 0x14027904d\ncall    qword ptr [rax+3D0h]                                           ; +0x1f, 0x14027904f\nmov     rax, cs:qword_1406C2ED8                                        ; +0x25, 0x140279055\ntest    rax, rax                                                       ; +0x2c, 0x14027905c\njnz     short loc_140279090                                            ; +0x2f, 0x14027905f\nmov     ecx, 668h; Size                                                ; +0x31, 0x140279061\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x36, 0x140279066\nmov     [rsp+28h+arg_0], rax                                           ; +0x3b, 0x14027906b\nmov     rcx, rax                                                       ; +0x40, 0x140279070\ncall    sub_14017AB00                                                  ; +0x43, 0x140279073\nnop                                                                    ; +0x48, 0x140279078\nmov     cs:qword_1406C2ED8, rax                                        ; +0x49, 0x140279079\nmov     rdx, [rax]                                                     ; +0x50, 0x140279080\nmov     rcx, rax                                                       ; +0x53, 0x140279083\ncall    qword ptr [rdx+48h]                                            ; +0x56, 0x140279086\nmov     rax, cs:qword_1406C2ED8                                        ; +0x59, 0x140279089\ncmp     byte ptr [rax+418h], 0                                         ; +0x60, 0x140279090\njnz     short loc_1402790D8                                            ; +0x67, 0x140279097\nmov     byte ptr [rdi+200h], 1                                         ; +0x69, 0x140279099\nxor     ecx, ecx                                                       ; +0x70, 0x1402790a0\ncall    MenuLayer__scene                                               ; +0x72, 0x1402790a2\nmov     rdx, rax                                                       ; +0x77, 0x1402790a7\nmovss   xmm0, cs:dword_140622B08                                       ; +0x7a, 0x1402790aa\ncall    cs:?create@CCTransitionFade@cocos2d@@SAPEAV12@MPEAVCCScene@2@@Z; cocos2d::CCTransitionFade::create(float,cocos2d::CCScene *) ; +0x82, 0x1402790b2\nmov     rbx, rax                                                       ; +0x88, 0x1402790b8\ncall    cs:?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0x8b, 0x1402790bb\nmov     rcx, rax                                                       ; +0x91, 0x1402790c1\nmov     rdx, rbx                                                       ; +0x94, 0x1402790c4\nmov     rbx, [rsp+28h+arg_8]                                           ; +0x97, 0x1402790c7\nadd     rsp, 20h                                                       ; +0x9c, 0x1402790cc\npop     rdi                                                            ; +0xa0, 0x1402790d0\njmp     cs:?replaceScene@CCDirector@cocos2d@@QEAA_NPEAVCCScene@2@@Z; cocos2d::CCDirector::replaceScene(cocos2d::CCScene *) ; +0xa1, 0x1402790d1\nmov     byte ptr [rax+418h], 0                                         ; +0xa8, 0x1402790d8\nmov     rcx, rdi                                                       ; +0xaf, 0x1402790df\ncall    cs:?retain@CCObject@cocos2d@@QEAAXXZ; cocos2d::CCObject::retain(void) ; +0xb2, 0x1402790e2\nmov     rax, [rdi]                                                     ; +0xb8, 0x1402790e8\nmov     rcx, rdi                                                       ; +0xbb, 0x1402790eb\ncall    qword ptr [rax+1F0h]                                           ; +0xbe, 0x1402790ee\nmov     rax, [rdi]                                                     ; +0xc4, 0x1402790f4\nxor     edx, edx                                                       ; +0xc7, 0x1402790f7\nmov     rcx, rdi                                                       ; +0xc9, 0x1402790f9\ncall    qword ptr [rax+3D0h]                                           ; +0xcc, 0x1402790fc\ncall    cs:?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0xd2, 0x140279102\nmov     rcx, rax                                                       ; +0xd8, 0x140279108\ncall    cs:?popScene@CCDirector@cocos2d@@QEAAXXZ; cocos2d::CCDirector::popScene(void) ; +0xdb, 0x14027910b\ncall    cs:?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0xe1, 0x140279111\nmov     rcx, [rax+110h]                                                ; +0xe7, 0x140279117\ntest    rcx, rcx                                                       ; +0xee, 0x14027911e\njz      loc_1402791C1                                                  ; +0xf1, 0x140279121\nmov     byte ptr [rdi+200h], 1                                         ; +0xf7, 0x140279127\nmov     rax, [rcx]                                                     ; +0xfe, 0x14027912e\nmov     r8d, 3E8h                                                      ; +0x101, 0x140279131\nmov     rdx, rdi                                                       ; +0x107, 0x140279137\ncall    qword ptr [rax+1B8h]                                           ; +0x10a, 0x14027913a\nmov     rcx, rdi                                                       ; +0x110, 0x140279140\ncall    cs:?release@CCObject@cocos2d@@QEAAXXZ; cocos2d::CCObject::release(void) ; +0x113, 0x140279143\ncall    cs:?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0x119, 0x140279149\nmov     rcx, rax                                                       ; +0x11f, 0x14027914f\nlea     rdx, [rsp+28h+arg_0]                                           ; +0x122, 0x140279152\ncall    cs:?getWinSize@CCDirector@cocos2d@@QEAA?AVCCSize@2@XZ; cocos2d::CCDirector::getWinSize(void) ; +0x127, 0x140279157\nmovss   xmm2, dword ptr [rsp+28h+arg_0+4]                              ; +0x12d, 0x14027915d\nxorps   xmm1, xmm1                                                     ; +0x133, 0x140279163\nlea     rcx, [rsp+28h+arg_10]                                          ; +0x136, 0x140279166\ncall    cs:??0CCPoint@cocos2d@@QEAA@MM@Z; cocos2d::CCPoint::CCPoint(float,float) ; +0x13b, 0x14027916b\nmov     rdx, rax                                                       ; +0x141, 0x140279171\nmovss   xmm0, cs:dword_140622AA0                                       ; +0x144, 0x140279174\ncall    cs:?create@CCMoveTo@cocos2d@@SAPEAV12@MAEBVCCPoint@2@@Z; cocos2d::CCMoveTo::create(float,cocos2d::CCPoint const &) ; +0x14c, 0x14027917c\nmovss   xmm1, cs:width                                                 ; +0x152, 0x140279182\nmov     rcx, rax                                                       ; +0x15a, 0x14027918a\ncall    cs:?create@CCEaseIn@cocos2d@@SAPEAV12@PEAVCCActionInterval@2@M@Z; cocos2d::CCEaseIn::create(cocos2d::CCActionInterval *,float) ; +0x15d, 0x14027918d\nmov     rbx, rax                                                       ; +0x163, 0x140279193\nlea     rdx, sub_14003BE70                                             ; +0x166, 0x140279196\nmov     rcx, rdi                                                       ; +0x16d, 0x14027919d\ncall    cs:?create@CCCallFunc@cocos2d@@SAPEAV12@PEAVCCObject@2@P832@EAAXXZ@Z; cocos2d::CCCallFunc::create(cocos2d::CCObject *,void (cocos2d::CCObject::*)(void)) ; +0x170, 0x1402791a0\nxor     r8d, r8d                                                       ; +0x176, 0x1402791a6\nmov     rdx, rax                                                       ; +0x179, 0x1402791a9\nmov     rcx, rbx                                                       ; +0x17c, 0x1402791ac\ncall    cs:?create@CCSequence@cocos2d@@SAPEAV12@PEAVCCFiniteTimeAction@2@ZZ; cocos2d::CCSequence::create(cocos2d::CCFiniteTimeAction *,...) ; +0x17f, 0x1402791af\nmov     rdx, rax                                                       ; +0x185, 0x1402791b5\nmov     rcx, rdi                                                       ; +0x188, 0x1402791b8\ncall    cs:?runAction@CCNode@cocos2d@@QEAAPEAVCCAction@2@PEAV32@@Z; cocos2d::CCNode::runAction(cocos2d::CCAction *) ; +0x18b, 0x1402791bb\nmov     rbx, [rsp+28h+arg_8]                                           ; +0x191, 0x1402791c1\nadd     rsp, 20h                                                       ; +0x196, 0x1402791c6\npop     rdi                                                            ; +0x19a, 0x1402791ca\nretn                                                                   ; +0x19b, 0x1402791cb", "xrefs": ["GJGarageLayer::keyBackClicked @ 0x1402791d9", "GJGarageLayer::init @ 0x140273c5b", "<???> @ 0x1406d104c"], "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"}