{"type": "func", "start": 6443248000, "end": 6443248264, "name": "cocos2d::CCDirector::replaceScene", "pseudocode": "// \n// cocos2d::CCDirector::replaceScene from 0x1800c2980 to 0x1800c2a88 (264 bytes)\n// \n// 5 xrefs:\n// > cocos2d::CCTransitionScene::setNewScene @ 0x18005888f\n// > <???> @ 0x18014b28c\n// > <???> @ 0x18014b29c\n// > <???> @ 0x18014cf68\n// > <???> @ 0x1801c354c\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\nchar __fastcall cocos2d::CCDirector::replaceScene(cocos2d::CCDirector *this, struct cocos2d::CCScene *a2)\n{\n  __int64 v4; // rax\n  __int64 v5; // rsi\n  bool v6; // bp\n  int v8; // eax\n  bool v9; // zf\n  int v10; // r14d\n  void (__fastcall ***v11)(_QWORD, struct cocos2d::CCScene *); // rcx\n  void (__fastcall ***v12)(_QWORD); // rcx\n\n  v4 = _RTDynamicCast(\n         a2,\n         0,\n         &cocos2d::CCScene `RTTI Type Descriptor',\n         &cocos2d::CCTransitionScene `RTTI Type Descriptor',\n         0);\n  v5 = v4;\n  v6 = v4 != 0;\n  if ( *((_BYTE *)this + 176) && v4 )\n    return 0;\n  v8 = cocos2d::CCArray::count(*((cocos2d::CCArray **)this + 37));\n  v9 = *((_QWORD *)this + 12) == 0;\n  v10 = v8;\n  *((_BYTE *)this + 288) = 1;\n  if ( !v9\n    && *((struct cocos2d::CCObject **)this + 12) == cocos2d::CCArray::lastObject(*((cocos2d::CCArray **)this + 37)) )\n  {\n    *((_QWORD *)this + 12) = 0;\n  }\n  cocos2d::CCArray::replaceObjectAtIndex(*((cocos2d::CCArray **)this + 37), v10 - 1, a2);\n  *((_QWORD *)this + 35) = a2;\n  if ( !v5 && !*((_BYTE *)this + 404) )\n  {\n    v11 = *((void (__fastcall ****)(_QWORD, struct cocos2d::CCScene *))this + 45);\n    if ( v11 )\n      (**v11)(v11, a2);\n    v12 = *((void (__fastcall ****)(_QWORD))a2 + 40);\n    if ( v12 )\n      (**v12)(v12);\n  }\n  *((_BYTE *)this + 176) = v6;\n  return 1;\n}", "assembly": "; \n; cocos2d::CCDirector::replaceScene from 0x1800c2980 to 0x1800c2a88 (264 bytes)\n; \n; 5 xrefs:\n; > cocos2d::CCTransitionScene::setNewScene @ 0x18005888f\n; > <???> @ 0x18014b28c\n; > <???> @ 0x18014b29c\n; > <???> @ 0x18014cf68\n; > <???> @ 0x1801c354c\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     [rsp+arg_8], rbx                                               ; +0x0, 0x1800c2980\nmov     [rsp+arg_10], rbp                                              ; +0x5, 0x1800c2985\nmov     [rsp+arg_18], rsi                                              ; +0xa, 0x1800c298a\npush    rdi                                                            ; +0xf, 0x1800c298f\nsub     rsp, 30h                                                       ; +0x10, 0x1800c2990\nmov     rdi, rdx                                                       ; +0x14, 0x1800c2994\nmov     [rsp+38h+var_18], 0                                            ; +0x17, 0x1800c2997\nmov     rbx, rcx                                                       ; +0x1f, 0x1800c299f\nlea     r9, ??_R0?AVCCTransitionScene@cocos2d@@@8; cocos2d::CCTransitionScene `RTTI Type Descriptor' ; +0x22, 0x1800c29a2\nmov     rcx, rdi                                                       ; +0x29, 0x1800c29a9\nlea     r8, ??_R0?AVCCScene@cocos2d@@@8; cocos2d::CCScene `RTTI Type Descriptor' ; +0x2c, 0x1800c29ac\nxor     edx, edx                                                       ; +0x33, 0x1800c29b3\ncall    __RTDynamicCast                                                ; +0x35, 0x1800c29b5\ntest    rax, rax                                                       ; +0x3a, 0x1800c29ba\nmov     rsi, rax                                                       ; +0x3d, 0x1800c29bd\nsetnz   bpl                                                            ; +0x40, 0x1800c29c0\ncmp     byte ptr [rbx+0B0h], 0                                         ; +0x44, 0x1800c29c4\njz      short loc_1800C29D9                                            ; +0x4b, 0x1800c29cb\ntest    rax, rax                                                       ; +0x4d, 0x1800c29cd\njz      short loc_1800C29D9                                            ; +0x50, 0x1800c29d0\nxor     al, al                                                         ; +0x52, 0x1800c29d2\njmp     loc_1800C2A73                                                  ; +0x54, 0x1800c29d4\nmov     rcx, [rbx+128h]; this                                          ; +0x59, 0x1800c29d9\nmov     [rsp+38h+arg_0], r14                                           ; +0x60, 0x1800c29e0\ncall    ?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x65, 0x1800c29e5\ncmp     qword ptr [rbx+60h], 0                                         ; +0x6a, 0x1800c29ea\nmov     r14d, eax                                                      ; +0x6f, 0x1800c29ef\nmov     byte ptr [rbx+120h], 1                                         ; +0x72, 0x1800c29f2\njz      short loc_1800C2A15                                            ; +0x79, 0x1800c29f9\nmov     rcx, [rbx+128h]; this                                          ; +0x7b, 0x1800c29fb\ncall    ?lastObject@CCArray@cocos2d@@QEAAPEAVCCObject@2@XZ; cocos2d::CCArray::lastObject(void) ; +0x82, 0x1800c2a02\ncmp     [rbx+60h], rax                                                 ; +0x87, 0x1800c2a07\njnz     short loc_1800C2A15                                            ; +0x8b, 0x1800c2a0b\nmov     qword ptr [rbx+60h], 0                                         ; +0x8d, 0x1800c2a0d\nmov     rcx, [rbx+128h]; this                                          ; +0x95, 0x1800c2a15\nlea     edx, [r14-1]; unsigned int                                     ; +0x9c, 0x1800c2a1c\nmov     r9b, 1; bool                                                   ; +0xa0, 0x1800c2a20\nmov     r8, rdi; struct cocos2d::CCObject *                            ; +0xa3, 0x1800c2a23\ncall    ?replaceObjectAtIndex@CCArray@cocos2d@@QEAAXIPEAVCCObject@2@_N@Z; cocos2d::CCArray::replaceObjectAtIndex(uint,cocos2d::CCObject *,bool) ; +0xa6, 0x1800c2a26\nmov     r14, [rsp+38h+arg_0]                                           ; +0xab, 0x1800c2a2b\nmov     [rbx+118h], rdi                                                ; +0xb0, 0x1800c2a30\ntest    rsi, rsi                                                       ; +0xb7, 0x1800c2a37\njnz     short loc_1800C2A6A                                            ; +0xba, 0x1800c2a3a\ncmp     [rbx+194h], sil                                                ; +0xbc, 0x1800c2a3c\njnz     short loc_1800C2A6A                                            ; +0xc3, 0x1800c2a43\nmov     rcx, [rbx+168h]                                                ; +0xc5, 0x1800c2a45\ntest    rcx, rcx                                                       ; +0xcc, 0x1800c2a4c\njz      short loc_1800C2A59                                            ; +0xcf, 0x1800c2a4f\nmov     rax, [rcx]                                                     ; +0xd1, 0x1800c2a51\nmov     rdx, rdi                                                       ; +0xd4, 0x1800c2a54\ncall    qword ptr [rax]                                                ; +0xd7, 0x1800c2a57\nmov     rcx, [rdi+140h]                                                ; +0xd9, 0x1800c2a59\ntest    rcx, rcx                                                       ; +0xe0, 0x1800c2a60\njz      short loc_1800C2A6A                                            ; +0xe3, 0x1800c2a63\nmov     rax, [rcx]                                                     ; +0xe5, 0x1800c2a65\ncall    qword ptr [rax]                                                ; +0xe8, 0x1800c2a68\nmov     [rbx+0B0h], bpl                                                ; +0xea, 0x1800c2a6a\nmov     al, 1                                                          ; +0xf1, 0x1800c2a71\nmov     rbx, [rsp+38h+arg_8]                                           ; +0xf3, 0x1800c2a73\nmov     rbp, [rsp+38h+arg_10]                                          ; +0xf8, 0x1800c2a78\nmov     rsi, [rsp+38h+arg_18]                                          ; +0xfd, 0x1800c2a7d\nadd     rsp, 30h                                                       ; +0x102, 0x1800c2a82\npop     rdi                                                            ; +0x106, 0x1800c2a86\nretn                                                                   ; +0x107, 0x1800c2a87", "xrefs": ["cocos2d::CCTransitionScene::setNewScene @ 0x18005888f", "<???> @ 0x18014b28c", "<???> @ 0x18014b29c", "<???> @ 0x18014cf68", "<???> @ 0x1801c354c"], "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"}