{"type": "func", "start": 6443246192, "end": 6443246272, "name": "cocos2d::CCDirector::levelForSceneInStack", "pseudocode": "// \n// cocos2d::CCDirector::levelForSceneInStack from 0x1800c2270 to 0x1800c22c0 (80 bytes)\n// \n// 1 xrefs:\n// > <???> @ 0x18014cf68\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:22:25 +0000\n// \n\n__int64 __fastcall cocos2d::CCDirector::levelForSceneInStack(cocos2d::CCDirector *this, struct cocos2d::CCScene *a2)\n{\n  __int64 v2; // rax\n  unsigned int v3; // r8d\n  unsigned int *v5; // rax\n  __int64 v6; // rcx\n  struct cocos2d::CCScene **v7; // rax\n  struct cocos2d::CCScene **v8; // rdx\n\n  v2 = *((_QWORD *)this + 37);\n  v3 = 0;\n  if ( v2 )\n  {\n    v5 = *(unsigned int **)(v2 + 56);\n    v6 = *v5;\n    if ( (_DWORD)v6 )\n    {\n      v7 = *((struct cocos2d::CCScene ***)v5 + 2);\n      v8 = &v7[v6 - 1];\n      if ( v7 <= v8 )\n      {\n        while ( *v7 )\n        {\n          ++v3;\n          if ( *v7 == a2 )\n            return v3;\n          if ( ++v7 > v8 )\n            return 0;\n        }\n      }\n    }\n  }\n  return 0;\n}", "assembly": "; \n; cocos2d::CCDirector::levelForSceneInStack from 0x1800c2270 to 0x1800c22c0 (80 bytes)\n; \n; 1 xrefs:\n; > <???> @ 0x18014cf68\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:22:25 +0000\n; \nmov     rax, [rcx+128h]                                                ; +0x0, 0x1800c2270\nxor     r8d, r8d                                                       ; +0x7, 0x1800c2277\nmov     r9, rdx                                                        ; +0xa, 0x1800c227a\ntest    rax, rax                                                       ; +0xd, 0x1800c227d\njz      short loc_1800C22B9                                            ; +0x10, 0x1800c2280\nmov     rax, [rax+38h]                                                 ; +0x12, 0x1800c2282\nmov     ecx, [rax]                                                     ; +0x16, 0x1800c2286\ntest    ecx, ecx                                                       ; +0x18, 0x1800c2288\njz      short loc_1800C22B9                                            ; +0x1a, 0x1800c228a\nmov     rax, [rax+10h]                                                 ; +0x1c, 0x1800c228c\nlea     rdx, [rcx-1]                                                   ; +0x20, 0x1800c2290\nlea     rdx, [rax+rdx*8]                                               ; +0x24, 0x1800c2294\ncmp     rax, rdx                                                       ; +0x28, 0x1800c2298\nja      short loc_1800C22B9                                            ; +0x2b, 0x1800c229b\nnop     dword ptr [rax]                                                ; +0x2d, 0x1800c229d\nmov     rcx, [rax]                                                     ; +0x30, 0x1800c22a0\ntest    rcx, rcx                                                       ; +0x33, 0x1800c22a3\njz      short loc_1800C22B9                                            ; +0x36, 0x1800c22a6\ninc     r8d                                                            ; +0x38, 0x1800c22a8\ncmp     rcx, r9                                                        ; +0x3b, 0x1800c22ab\njz      short loc_1800C22BC                                            ; +0x3e, 0x1800c22ae\nadd     rax, 8                                                         ; +0x40, 0x1800c22b0\ncmp     rax, rdx                                                       ; +0x44, 0x1800c22b4\njbe     short loc_1800C22A0                                            ; +0x47, 0x1800c22b7\nxor     eax, eax                                                       ; +0x49, 0x1800c22b9\nretn                                                                   ; +0x4b, 0x1800c22bb\nmov     eax, r8d                                                       ; +0x4c, 0x1800c22bc\nretn                                                                   ; +0x4f, 0x1800c22bf", "xrefs": ["<???> @ 0x18014cf68"], "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"}