{"type": "func", "start": 6443021088, "end": 6443021283, "name": "sub_18008B320", "pseudocode": "// \n// sub_18008B320 from 0x18008b320 to 0x18008b3e3 (195 bytes)\n// \n// 2 xrefs:\n// > <???> @ 0x180103798\n// > <???> @ 0x1801b5ae4\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\ncocos2d::CCNodeRGBA *__fastcall sub_18008B320(cocos2d::CCNodeRGBA *this, char a2)\n{\n  cocos2d::CCObject *v5; // rcx\n\n  if ( (a2 & 2) != 0 )\n  {\n    `eh vector destructor iterator'(this, 0x258u, *((_QWORD *)this - 1), (void (*)(void *))cocos2d::CCSprite::~CCSprite);\n    if ( (a2 & 1) != 0 )\n      j_j_j_free_0((char *)this - 8);\n    return (cocos2d::CCNodeRGBA *)((char *)this - 8);\n  }\n  else\n  {\n    this->cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable = (cocos2d::CCNodeRGBA_vtbl *)&cocos2d::CCSprite::`vftable'{for `cocos2d::CCNode'};\n    this->cocos2d::CCRGBAProtocol::__vftable = (cocos2d::CCRGBAProtocol_vtbl *)&cocos2d::CCSprite::`vftable'{for `cocos2d::CCRGBAProtocol'};\n    *((_QWORD *)this + 43) = &cocos2d::CCSprite::`vftable';\n    v5 = *((cocos2d::CCObject **)this + 52);\n    if ( v5 )\n      cocos2d::CCObject::release(v5);\n    cocos2d::CCNodeRGBA::~CCNodeRGBA(this);\n    if ( (a2 & 1) != 0 )\n      j_j_free_0(this);\n    return this;\n  }\n}", "assembly": "; \n; sub_18008B320 from 0x18008b320 to 0x18008b3e3 (195 bytes)\n; \n; 2 xrefs:\n; > <???> @ 0x180103798\n; > <???> @ 0x1801b5ae4\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_0], rbx                                               ; +0x0, 0x18008b320\nmov     [rsp+arg_8], rsi                                               ; +0x5, 0x18008b325\npush    rdi                                                            ; +0xa, 0x18008b32a\nsub     rsp, 20h                                                       ; +0xb, 0x18008b32b\nmov     esi, edx                                                       ; +0xf, 0x18008b32f\nmov     rbx, rcx                                                       ; +0x11, 0x18008b331\ntest    dl, 2                                                          ; +0x14, 0x18008b334\njz      short loc_18008B37D                                            ; +0x17, 0x18008b337\nlea     r9, ??1CCSprite@cocos2d@@UEAA@XZ; void (*)(void *)             ; +0x19, 0x18008b339\nmov     r8, [rcx-8]; unsigned __int64                                  ; +0x20, 0x18008b340\nmov     edx, 258h; unsigned __int64                                    ; +0x24, 0x18008b344\ncall    ??_M@YAXPEAX_K1P6AX0@Z@Z; `eh vector destructor iterator'(void *,unsigned __int64,unsigned __int64,void (*)(void *)) ; +0x29, 0x18008b349\ntest    sil, 1                                                         ; +0x2e, 0x18008b34e\njz      short loc_18008B369                                            ; +0x32, 0x18008b352\nimul    rdx, [rbx-8], 258h                                             ; +0x34, 0x18008b354\nadd     rdx, 8                                                         ; +0x3c, 0x18008b35c\nlea     rcx, [rbx-8]; Block                                            ; +0x40, 0x18008b360\ncall    j_j_j_free_0                                                   ; +0x44, 0x18008b364\nlea     rax, [rbx-8]                                                   ; +0x49, 0x18008b369\nmov     rbx, [rsp+28h+arg_0]                                           ; +0x4d, 0x18008b36d\nmov     rsi, [rsp+28h+arg_8]                                           ; +0x52, 0x18008b372\nadd     rsp, 20h                                                       ; +0x57, 0x18008b377\npop     rdi                                                            ; +0x5b, 0x18008b37b\nretn                                                                   ; +0x5c, 0x18008b37c\nlea     rax, ??_7CCSprite@cocos2d@@6BCCNode@1@@; const cocos2d::CCSprite::`vftable'{for `cocos2d::CCNode'} ; +0x5d, 0x18008b37d\nmov     [rcx], rax                                                     ; +0x64, 0x18008b384\nlea     rax, ??_7CCSprite@cocos2d@@6BCCRGBAProtocol@1@@; const cocos2d::CCSprite::`vftable'{for `cocos2d::CCRGBAProtocol'} ; +0x67, 0x18008b387\nmov     [rcx+140h], rax                                                ; +0x6e, 0x18008b38e\nlea     rax, ??_7CCSprite@cocos2d@@6B@; const cocos2d::CCSprite::`vftable' ; +0x75, 0x18008b395\nmov     [rcx+158h], rax                                                ; +0x7c, 0x18008b39c\nmov     rcx, [rcx+1A0h]; this                                          ; +0x83, 0x18008b3a3\ntest    rcx, rcx                                                       ; +0x8a, 0x18008b3aa\njz      short loc_18008B3B4                                            ; +0x8d, 0x18008b3ad\ncall    ?release@CCObject@cocos2d@@QEAAXXZ; cocos2d::CCObject::release(void) ; +0x8f, 0x18008b3af\nmov     rcx, rbx; this                                                 ; +0x94, 0x18008b3b4\ncall    ??1CCNodeRGBA@cocos2d@@UEAA@XZ; cocos2d::CCNodeRGBA::~CCNodeRGBA(void) ; +0x97, 0x18008b3b7\nnop                                                                    ; +0x9c, 0x18008b3bc\ntest    sil, 1                                                         ; +0x9d, 0x18008b3bd\njz      short loc_18008B3D0                                            ; +0xa1, 0x18008b3c1\nmov     edx, 258h                                                      ; +0xa3, 0x18008b3c3\nmov     rcx, rbx; Block                                                ; +0xa8, 0x18008b3c8\ncall    j_j_free_0                                                     ; +0xab, 0x18008b3cb\nmov     rax, rbx                                                       ; +0xb0, 0x18008b3d0\nmov     rbx, [rsp+28h+arg_0]                                           ; +0xb3, 0x18008b3d3\nmov     rsi, [rsp+28h+arg_8]                                           ; +0xb8, 0x18008b3d8\nadd     rsp, 20h                                                       ; +0xbd, 0x18008b3dd\npop     rdi                                                            ; +0xc1, 0x18008b3e1\nretn                                                                   ; +0xc2, 0x18008b3e2", "xrefs": ["<???> @ 0x180103798", "<???> @ 0x1801b5ae4"], "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"}