{"type": "func", "start": 6443232480, "end": 6443232585, "name": "cocos2d::CCDirector::popToSceneInStack", "pseudocode": "// \n// cocos2d::CCDirector::popToSceneInStack from 0x1800bece0 to 0x1800bed49 (105 bytes)\n// \n// 2 xrefs:\n// > <???> @ 0x1801438a8\n// > <???> @ 0x1801b9234\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 cocos2d::CCDirector::popToSceneInStack(cocos2d::CCDirector *this, struct cocos2d::CCScene *a2)\n{\n  cocos2d::CCArray *m_pobScenesStack; // rax\n  char v3; // r10\n  int v5; // edx\n  cocos2d::ccArray *data; // rax\n  __int64 num; // r8\n  struct cocos2d::CCScene **arr; // rax\n  struct cocos2d::CCScene **v9; // r8\n\n  m_pobScenesStack = this->m_pobScenesStack;\n  v3 = 0;\n  v5 = 0;\n  if ( m_pobScenesStack )\n  {\n    data = m_pobScenesStack->data;\n    num = data->num;\n    if ( (_DWORD)num )\n    {\n      arr = (struct cocos2d::CCScene **)data->arr;\n      v9 = &arr[num - 1];\n      if ( arr <= v9 )\n      {\n        while ( *arr )\n        {\n          ++v5;\n          if ( *arr == a2 )\n          {\n            v3 = 1;\n            break;\n          }\n          if ( ++arr > v9 )\n            return;\n        }\n      }\n    }\n  }\n  if ( !v3 )\n    v5 = 0;\n  if ( v5 > 0 )\n    cocos2d::CCDirector::popToSceneStackLevel(this, v5);\n}", "assembly": "; \n; cocos2d::CCDirector::popToSceneInStack from 0x1800bece0 to 0x1800bed49 (105 bytes)\n; \n; 2 xrefs:\n; > <???> @ 0x1801438a8\n; > <???> @ 0x1801b9234\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    rbx                                                            ; +0x0, 0x1800bece0\nmov     rax, [rcx+120h]                                                ; +0x2, 0x1800bece2\nxor     ebx, ebx                                                       ; +0x9, 0x1800bece9\nxor     r10b, r10b                                                     ; +0xb, 0x1800beceb\nmov     r9, rdx                                                        ; +0xe, 0x1800becee\nmov     r11, rcx                                                       ; +0x11, 0x1800becf1\nmov     edx, ebx                                                       ; +0x14, 0x1800becf4\ntest    rax, rax                                                       ; +0x16, 0x1800becf6\njz      short loc_1800BED34                                            ; +0x19, 0x1800becf9\nmov     rax, [rax+38h]                                                 ; +0x1b, 0x1800becfb\nmov     r8d, [rax]                                                     ; +0x1f, 0x1800becff\ntest    r8d, r8d                                                       ; +0x22, 0x1800bed02\njz      short loc_1800BED34                                            ; +0x25, 0x1800bed05\nmov     rax, [rax+10h]                                                 ; +0x27, 0x1800bed07\ndec     r8                                                             ; +0x2b, 0x1800bed0b\nlea     r8, [rax+r8*8]                                                 ; +0x2e, 0x1800bed0e\ncmp     rax, r8                                                        ; +0x32, 0x1800bed12\nja      short loc_1800BED34                                            ; +0x35, 0x1800bed15\nmov     rcx, [rax]                                                     ; +0x37, 0x1800bed17\ntest    rcx, rcx                                                       ; +0x3a, 0x1800bed1a\njz      short loc_1800BED34                                            ; +0x3d, 0x1800bed1d\ninc     edx                                                            ; +0x3f, 0x1800bed1f\ncmp     rcx, r9                                                        ; +0x41, 0x1800bed21\njz      short loc_1800BED31                                            ; +0x44, 0x1800bed24\nadd     rax, 8                                                         ; +0x46, 0x1800bed26\ncmp     rax, r8                                                        ; +0x4a, 0x1800bed2a\njbe     short loc_1800BED17                                            ; +0x4d, 0x1800bed2d\npop     rbx                                                            ; +0x4f, 0x1800bed2f\nretn                                                                   ; +0x50, 0x1800bed30\nmov     r10b, 1                                                        ; +0x51, 0x1800bed31\ntest    r10b, r10b                                                     ; +0x54, 0x1800bed34\ncmovz   edx, ebx; int                                                  ; +0x57, 0x1800bed37\ntest    edx, edx                                                       ; +0x5a, 0x1800bed3a\njle     short loc_1800BED47                                            ; +0x5c, 0x1800bed3c\nmov     rcx, r11; this                                                 ; +0x5e, 0x1800bed3e\npop     rbx                                                            ; +0x61, 0x1800bed41\njmp     ?popToSceneStackLevel@CCDirector@cocos2d@@QEAAXH@Z; cocos2d::CCDirector::popToSceneStackLevel(int) ; +0x62, 0x1800bed42\npop     rbx                                                            ; +0x67, 0x1800bed47\nretn                                                                   ; +0x68, 0x1800bed48", "xrefs": ["<???> @ 0x1801438a8", "<???> @ 0x1801b9234"], "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"}