{"type": "func", "start": 6442955536, "end": 6442955711, "name": "sub_18007B310", "pseudocode": "// \n// sub_18007B310 from 0x18007b310 to 0x18007b3bf (175 bytes)\n// \n// 2 xrefs:\n// > <???> @ 0x180101180\n// > <???> @ 0x1801b4d28\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::CCObject *__fastcall sub_18007B310(cocos2d::CCObject *this, char a2)\n{\n  void *v5; // rcx\n\n  if ( (a2 & 2) != 0 )\n  {\n    `eh vector destructor iterator'(this, 0x50u, *((_QWORD *)this - 1), (void (*)(void *))cocos2d::CCImage::~CCImage);\n    if ( (a2 & 1) != 0 )\n      j_j_j_free_0((char *)this - 8);\n    return (cocos2d::CCObject *)((char *)this - 8);\n  }\n  else\n  {\n    this->__vftable = (cocos2d::CCObject_vtbl *)&cocos2d::CCImage::`vftable';\n    v5 = *((void **)this + 8);\n    if ( v5 )\n    {\n      j_j_free_0(v5);\n      *((_QWORD *)this + 8) = 0;\n    }\n    cocos2d::CCObject::~CCObject(this);\n    if ( (a2 & 1) != 0 )\n      j_j_free_0(this);\n    return this;\n  }\n}", "assembly": "; \n; sub_18007B310 from 0x18007b310 to 0x18007b3bf (175 bytes)\n; \n; 2 xrefs:\n; > <???> @ 0x180101180\n; > <???> @ 0x1801b4d28\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, 0x18007b310\nmov     [rsp+arg_8], rsi                                               ; +0x5, 0x18007b315\npush    rdi                                                            ; +0xa, 0x18007b31a\nsub     rsp, 20h                                                       ; +0xb, 0x18007b31b\nmov     esi, edx                                                       ; +0xf, 0x18007b31f\nmov     rbx, rcx                                                       ; +0x11, 0x18007b321\ntest    dl, 2                                                          ; +0x14, 0x18007b324\njz      short loc_18007B371                                            ; +0x17, 0x18007b327\nlea     r9, ??1CCImage@cocos2d@@UEAA@XZ; void (*)(void *)              ; +0x19, 0x18007b329\nmov     r8, [rcx-8]; unsigned __int64                                  ; +0x20, 0x18007b330\nmov     edx, 50h ; 'P'; unsigned __int64                               ; +0x24, 0x18007b334\ncall    ??_M@YAXPEAX_K1P6AX0@Z@Z; `eh vector destructor iterator'(void *,unsigned __int64,unsigned __int64,void (*)(void *)) ; +0x29, 0x18007b339\ntest    sil, 1                                                         ; +0x2e, 0x18007b33e\njz      short loc_18007B35D                                            ; +0x32, 0x18007b342\nmov     rcx, [rbx-8]                                                   ; +0x34, 0x18007b344\nlea     rdx, [rcx+rcx*4]                                               ; +0x38, 0x18007b348\nshl     rdx, 4                                                         ; +0x3c, 0x18007b34c\nadd     rdx, 8                                                         ; +0x40, 0x18007b350\nlea     rcx, [rbx-8]; Block                                            ; +0x44, 0x18007b354\ncall    j_j_j_free_0                                                   ; +0x48, 0x18007b358\nlea     rax, [rbx-8]                                                   ; +0x4d, 0x18007b35d\nmov     rbx, [rsp+28h+arg_0]                                           ; +0x51, 0x18007b361\nmov     rsi, [rsp+28h+arg_8]                                           ; +0x56, 0x18007b366\nadd     rsp, 20h                                                       ; +0x5b, 0x18007b36b\npop     rdi                                                            ; +0x5f, 0x18007b36f\nretn                                                                   ; +0x60, 0x18007b370\nlea     rax, ??_7CCImage@cocos2d@@6B@; const cocos2d::CCImage::`vftable' ; +0x61, 0x18007b371\nmov     [rcx], rax                                                     ; +0x68, 0x18007b378\nmov     rcx, [rcx+40h]; Block                                          ; +0x6b, 0x18007b37b\ntest    rcx, rcx                                                       ; +0x6f, 0x18007b37f\njz      short loc_18007B391                                            ; +0x72, 0x18007b382\ncall    j_j_free_0                                                     ; +0x74, 0x18007b384\nmov     qword ptr [rbx+40h], 0                                         ; +0x79, 0x18007b389\nmov     rcx, rbx; this                                                 ; +0x81, 0x18007b391\ncall    ??1CCObject@cocos2d@@UEAA@XZ; cocos2d::CCObject::~CCObject(void) ; +0x84, 0x18007b394\ntest    sil, 1                                                         ; +0x89, 0x18007b399\njz      short loc_18007B3AC                                            ; +0x8d, 0x18007b39d\nmov     edx, 50h ; 'P'                                                 ; +0x8f, 0x18007b39f\nmov     rcx, rbx; Block                                                ; +0x94, 0x18007b3a4\ncall    j_j_free_0                                                     ; +0x97, 0x18007b3a7\nmov     rax, rbx                                                       ; +0x9c, 0x18007b3ac\nmov     rbx, [rsp+28h+arg_0]                                           ; +0x9f, 0x18007b3af\nmov     rsi, [rsp+28h+arg_8]                                           ; +0xa4, 0x18007b3b4\nadd     rsp, 20h                                                       ; +0xa9, 0x18007b3b9\npop     rdi                                                            ; +0xad, 0x18007b3bd\nretn                                                                   ; +0xae, 0x18007b3be", "xrefs": ["<???> @ 0x180101180", "<???> @ 0x1801b4d28"], "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"}