{"type": "func", "start": 6443198016, "end": 6443198157, "name": "sub_1800B6640", "pseudocode": "// \n// sub_1800B6640 from 0x1800b6640 to 0x1800b66cd (141 bytes)\n// \n// 2 xrefs:\n// > <???> @ 0x180106dd0\n// > <???> @ 0x1801b8b5c\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\n// Hidden C++ exception states: #wind=2\ncocos2d::CCObject *__fastcall sub_1800B6640(cocos2d::CCObject *this, char a2)\n{\n  _QWORD *v4; // rax\n\n  this->__vftable = (cocos2d::CCObject_vtbl *)&cocos2d::CCTouchScriptHandlerEntry::`vftable';\n  if ( *((_DWORD *)this + 14) )\n  {\n    v4 = qword_1801A9B00;\n    if ( !qword_1801A9B00 )\n    {\n      v4 = operator new(8u);\n      if ( v4 )\n        *v4 = 0;\n      qword_1801A9B00 = v4;\n    }\n    (*(void (__fastcall **)(_QWORD, _QWORD))(*(_QWORD *)*v4 + 24LL))(*v4, *((unsigned int *)this + 14));\n    *((_DWORD *)this + 14) = 0;\n  }\n  this->__vftable = (cocos2d::CCObject_vtbl *)&cocos2d::CCScriptHandlerEntry::`vftable';\n  cocos2d::CCObject::~CCObject(this);\n  if ( (a2 & 1) != 0 )\n    j_j_free_0(this);\n  return this;\n}", "assembly": "; \n; sub_1800B6640 from 0x1800b6640 to 0x1800b66cd (141 bytes)\n; \n; 2 xrefs:\n; > <???> @ 0x180106dd0\n; > <???> @ 0x1801b8b5c\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, 0x1800b6640\npush    rdi                                                            ; +0x5, 0x1800b6645\nsub     rsp, 20h                                                       ; +0x6, 0x1800b6646\nmov     edi, edx                                                       ; +0xa, 0x1800b664a\nmov     rbx, rcx                                                       ; +0xc, 0x1800b664c\nlea     rax, ??_7CCTouchScriptHandlerEntry@cocos2d@@6B@; const cocos2d::CCTouchScriptHandlerEntry::`vftable' ; +0xf, 0x1800b664f\nmov     [rcx], rax                                                     ; +0x16, 0x1800b6656\ncmp     dword ptr [rcx+38h], 0                                         ; +0x19, 0x1800b6659\njz      short loc_1800B6699                                            ; +0x1d, 0x1800b665d\nmov     rax, cs:qword_1801A9B00                                        ; +0x1f, 0x1800b665f\ntest    rax, rax                                                       ; +0x26, 0x1800b6666\njnz     short loc_1800B6686                                            ; +0x29, 0x1800b6669\nlea     ecx, [rax+8]; Size                                             ; +0x2b, 0x1800b666b\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x2e, 0x1800b666e\ntest    rax, rax                                                       ; +0x33, 0x1800b6673\njz      short loc_1800B667F                                            ; +0x36, 0x1800b6676\nmov     qword ptr [rax], 0                                             ; +0x38, 0x1800b6678\nmov     cs:qword_1801A9B00, rax                                        ; +0x3f, 0x1800b667f\nmov     rcx, [rax]                                                     ; +0x46, 0x1800b6686\nmov     rax, [rcx]                                                     ; +0x49, 0x1800b6689\nmov     edx, [rbx+38h]                                                 ; +0x4c, 0x1800b668c\ncall    qword ptr [rax+18h]                                            ; +0x4f, 0x1800b668f\nmov     dword ptr [rbx+38h], 0                                         ; +0x52, 0x1800b6692\nlea     rax, ??_7CCScriptHandlerEntry@cocos2d@@6B@; const cocos2d::CCScriptHandlerEntry::`vftable' ; +0x59, 0x1800b6699\nmov     [rbx], rax                                                     ; +0x60, 0x1800b66a0\nmov     rcx, rbx; this                                                 ; +0x63, 0x1800b66a3\ncall    ??1CCObject@cocos2d@@UEAA@XZ; cocos2d::CCObject::~CCObject(void) ; +0x66, 0x1800b66a6\nnop                                                                    ; +0x6b, 0x1800b66ab\ntest    dil, 1                                                         ; +0x6c, 0x1800b66ac\njz      short loc_1800B66BF                                            ; +0x70, 0x1800b66b0\nmov     edx, 50h ; 'P'                                                 ; +0x72, 0x1800b66b2\nmov     rcx, rbx; Block                                                ; +0x77, 0x1800b66b7\ncall    j_j_free_0                                                     ; +0x7a, 0x1800b66ba\nmov     rax, rbx                                                       ; +0x7f, 0x1800b66bf\nmov     rbx, [rsp+28h+arg_0]                                           ; +0x82, 0x1800b66c2\nadd     rsp, 20h                                                       ; +0x87, 0x1800b66c7\npop     rdi                                                            ; +0x8b, 0x1800b66cb\nretn                                                                   ; +0x8c, 0x1800b66cc", "xrefs": ["<???> @ 0x180106dd0", "<???> @ 0x1801b8b5c"], "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"}