{"type": "func", "start": 6443034000, "end": 6443034224, "name": "cocos2d::CCSprite::addChild", "pseudocode": "// \n// cocos2d::CCSprite::addChild from 0x18008e590 to 0x18008e670 (224 bytes)\n// \n// 9 xrefs:\n// > <???> @ 0x1800f1b30\n// > <???> @ 0x1800f2018\n// > <???> @ 0x1800f2bc8\n// > <???> @ 0x18010a008\n// > <???> @ 0x18010d020\n// > <???> @ 0x180146698\n// > <???> @ 0x1801466a8\n// > <???> @ 0x18014cf68\n// > <???> @ 0x1801bfdc0\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:07 +0000\n// \n\nvoid __fastcall cocos2d::CCSprite::addChild(\n        cocos2d::CCSprite *this,\n        struct cocos2d::CCNode *a2,\n        unsigned int a3,\n        int a4)\n{\n  struct cocos2d::CCSprite *v8; // rbx\n  __int64 v9; // rax\n  __int64 v10; // rax\n\n  if ( *((_QWORD *)this + 46) )\n  {\n    v8 = (struct cocos2d::CCSprite *)_RTDynamicCast(\n                                       a2,\n                                       0,\n                                       &cocos2d::CCNode `RTTI Type Descriptor',\n                                       &cocos2d::CCSprite `RTTI Type Descriptor',\n                                       0);\n    v9 = (*(__int64 (__fastcall **)(_QWORD *))(*((_QWORD *)v8 + 43) + 16LL))((_QWORD *)v8 + 43);\n    (*(void (__fastcall **)(__int64))(*(_QWORD *)v9 + 96LL))(v9);\n    v10 = (*(__int64 (__fastcall **)(_QWORD))(**((_QWORD **)this + 44) + 88LL))(*((_QWORD *)this + 44));\n    (*(void (__fastcall **)(__int64))(*(_QWORD *)v10 + 96LL))(v10);\n    cocos2d::CCSpriteBatchNode::appendChild(*((cocos2d::CCSpriteBatchNode **)this + 46), v8);\n    if ( !*((_BYTE *)this + 288) )\n      (*(void (__fastcall **)(cocos2d::CCSprite *))(*(_QWORD *)this + 1072LL))(this);\n  }\n  cocos2d::CCNode::addChild(this, a2, a3, a4);\n  *((_BYTE *)this + 378) = 1;\n}", "assembly": "; \n; cocos2d::CCSprite::addChild from 0x18008e590 to 0x18008e670 (224 bytes)\n; \n; 9 xrefs:\n; > <???> @ 0x1800f1b30\n; > <???> @ 0x1800f2018\n; > <???> @ 0x1800f2bc8\n; > <???> @ 0x18010a008\n; > <???> @ 0x18010d020\n; > <???> @ 0x180146698\n; > <???> @ 0x1801466a8\n; > <???> @ 0x18014cf68\n; > <???> @ 0x1801bfdc0\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:07 +0000\n; \nmov     [rsp+arg_8], rbp                                               ; +0x0, 0x18008e590\nmov     [rsp+arg_10], rsi                                              ; +0x5, 0x18008e595\nmov     [rsp+arg_18], rdi                                              ; +0xa, 0x18008e59a\npush    r14                                                            ; +0xf, 0x18008e59f\nsub     rsp, 30h                                                       ; +0x11, 0x18008e5a1\ncmp     qword ptr [rcx+170h], 0                                        ; +0x15, 0x18008e5a5\nmov     ebp, r9d                                                       ; +0x1d, 0x18008e5ad\nmov     r14d, r8d                                                      ; +0x20, 0x18008e5b0\nmov     rsi, rdx                                                       ; +0x23, 0x18008e5b3\nmov     rdi, rcx                                                       ; +0x26, 0x18008e5b6\njz      loc_18008E642                                                  ; +0x29, 0x18008e5b9\nlea     r9, ??_R0?AVCCSprite@cocos2d@@@8; cocos2d::CCSprite `RTTI Type Descriptor' ; +0x2f, 0x18008e5bf\nmov     [rsp+38h+arg_0], rbx                                           ; +0x36, 0x18008e5c6\nlea     r8, ??_R0?AVCCNode@cocos2d@@@8; cocos2d::CCNode `RTTI Type Descriptor' ; +0x3b, 0x18008e5cb\nmov     [rsp+38h+var_18], 0                                            ; +0x42, 0x18008e5d2\nxor     edx, edx                                                       ; +0x4a, 0x18008e5da\nmov     rcx, rsi                                                       ; +0x4c, 0x18008e5dc\ncall    __RTDynamicCast                                                ; +0x4f, 0x18008e5df\nmov     rbx, rax                                                       ; +0x54, 0x18008e5e4\nlea     rcx, [rax+158h]                                                ; +0x57, 0x18008e5e7\nmov     rdx, [rcx]                                                     ; +0x5e, 0x18008e5ee\ncall    qword ptr [rdx+10h]                                            ; +0x61, 0x18008e5f1\nmov     rcx, [rax]                                                     ; +0x64, 0x18008e5f4\nmov     rdx, [rcx+60h]                                                 ; +0x67, 0x18008e5f7\nmov     rcx, rax                                                       ; +0x6b, 0x18008e5fb\ncall    rdx                                                            ; +0x6e, 0x18008e5fe\nmov     rcx, [rdi+160h]                                                ; +0x70, 0x18008e600\nmov     rdx, [rcx]                                                     ; +0x77, 0x18008e607\ncall    qword ptr [rdx+58h]                                            ; +0x7a, 0x18008e60a\nmov     rcx, [rax]                                                     ; +0x7d, 0x18008e60d\nmov     rdx, [rcx+60h]                                                 ; +0x80, 0x18008e610\nmov     rcx, rax                                                       ; +0x84, 0x18008e614\ncall    rdx                                                            ; +0x87, 0x18008e617\nmov     rcx, [rdi+170h]; this                                          ; +0x89, 0x18008e619\nmov     rdx, rbx; struct cocos2d::CCSprite *                           ; +0x90, 0x18008e620\ncall    ?appendChild@CCSpriteBatchNode@cocos2d@@QEAAXPEAVCCSprite@2@@Z; cocos2d::CCSpriteBatchNode::appendChild(cocos2d::CCSprite *) ; +0x93, 0x18008e623\ncmp     byte ptr [rdi+120h], 0                                         ; +0x98, 0x18008e628\nmov     rbx, [rsp+38h+arg_0]                                           ; +0x9f, 0x18008e62f\njnz     short loc_18008E642                                            ; +0xa4, 0x18008e634\nmov     rax, [rdi]                                                     ; +0xa6, 0x18008e636\nmov     rcx, rdi                                                       ; +0xa9, 0x18008e639\ncall    qword ptr [rax+430h]                                           ; +0xac, 0x18008e63c\nmov     r9d, ebp; int                                                  ; +0xb2, 0x18008e642\nmov     r8d, r14d; int                                                 ; +0xb5, 0x18008e645\nmov     rdx, rsi; struct cocos2d::CCNode *                             ; +0xb8, 0x18008e648\nmov     rcx, rdi; this                                                 ; +0xbb, 0x18008e64b\ncall    ?addChild@CCNode@cocos2d@@UEAAXPEAV12@HH@Z; cocos2d::CCNode::addChild(cocos2d::CCNode *,int,int) ; +0xbe, 0x18008e64e\nmov     rbp, [rsp+38h+arg_8]                                           ; +0xc3, 0x18008e653\nmov     rsi, [rsp+38h+arg_10]                                          ; +0xc8, 0x18008e658\nmov     byte ptr [rdi+17Ah], 1                                         ; +0xcd, 0x18008e65d\nmov     rdi, [rsp+38h+arg_18]                                          ; +0xd4, 0x18008e664\nadd     rsp, 30h                                                       ; +0xd9, 0x18008e669\npop     r14                                                            ; +0xdd, 0x18008e66d\nretn                                                                   ; +0xdf, 0x18008e66f", "xrefs": ["<???> @ 0x1800f1b30", "<???> @ 0x1800f2018", "<???> @ 0x1800f2bc8", "<???> @ 0x18010a008", "<???> @ 0x18010d020", "<???> @ 0x180146698", "<???> @ 0x1801466a8", "<???> @ 0x18014cf68", "<???> @ 0x1801bfdc0"], "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"}