{"type": "func", "start": 6442494928, "end": 6442495297, "name": "cocos2d::CCDictionary::removeObjectForElememt", "pseudocode": "// \n// cocos2d::CCDictionary::removeObjectForElememt from 0x18000abd0 to 0x18000ad41 (369 bytes)\n// \n// 7 xrefs:\n// > cocos2d::CCDictionary::removeObjectForKey @ 0x18000b0d1\n// > cocos2d::CCDictionary::removeObjectForKey @ 0x18000b286\n// > cocos2d::CCDictionary::removeObjectForKey @ 0x18000b299\n// > cocos2d::CCSpriteFrameCache::removeUnusedSpriteFrames @ 0x18009274b\n// > cocos2d::CCTextureCache::removeUnusedTextures @ 0x1800a9a18\n// > <???> @ 0x1801438a8\n// > <???> @ 0x1801add50\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\nvoid __fastcall cocos2d::CCDictionary::removeObjectForElememt(\n        cocos2d::CCDictionary *this,\n        struct cocos2d::CCDictElement *a2)\n{\n  char *prev; // rdx\n  UT_hash_table *tbl; // r9\n  std::ptrdiff_t hho; // r10\n  char *v7; // r9\n  cocos2d::CCDictElement *next; // rdx\n  char *v9; // r9\n  UT_hash_table *v10; // rcx\n  __int64 v11; // r9\n  UT_hash_table *v12; // rcx\n  UT_hash_handle *hh_prev; // rcx\n  UT_hash_handle *hh_next; // rcx\n\n  if ( a2 )\n  {\n    prev = (char *)a2->hh.prev;\n    if ( __PAIR128__(a2->hh.next, (unsigned __int64)prev) == 0 )\n    {\n      free(this->m_pElements->hh.tbl->buckets);\n      free(this->m_pElements->hh.tbl);\n      this->m_pElements = nullptr;\n    }\n    else\n    {\n      tbl = this->m_pElements->hh.tbl;\n      hho = tbl->hho;\n      if ( a2 == (struct cocos2d::CCDictElement *)((char *)tbl->tail - hho) )\n        tbl->tail = (UT_hash_handle *)&prev[hho];\n      v7 = (char *)a2->hh.prev;\n      next = (cocos2d::CCDictElement *)a2->hh.next;\n      if ( v7 )\n        *(_QWORD *)&v7[this->m_pElements->hh.tbl->hho + 16] = next;\n      else\n        this->m_pElements = next;\n      v9 = (char *)a2->hh.next;\n      if ( v9 )\n        *(_QWORD *)&v9[this->m_pElements->hh.tbl->hho + 8] = a2->hh.prev;\n      v10 = this->m_pElements->hh.tbl;\n      v11 = a2->hh.hashv & (v10->num_buckets - 1);\n      --v10->buckets[v11].count;\n      v12 = this->m_pElements->hh.tbl;\n      if ( v12->buckets[v11].hh_head == &a2->hh )\n        v12->buckets[v11].hh_head = a2->hh.hh_next;\n      hh_prev = a2->hh.hh_prev;\n      if ( hh_prev )\n        hh_prev->hh_next = a2->hh.hh_next;\n      hh_next = a2->hh.hh_next;\n      if ( hh_next )\n        hh_next->hh_prev = a2->hh.hh_prev;\n      --this->m_pElements->hh.tbl->num_items;\n    }\n    cocos2d::CCObject::release(a2->m_pObject);\n    j_j_free_0(a2);\n  }\n}", "assembly": "; \n; cocos2d::CCDictionary::removeObjectForElememt from 0x18000abd0 to 0x18000ad41 (369 bytes)\n; \n; 7 xrefs:\n; > cocos2d::CCDictionary::removeObjectForKey @ 0x18000b0d1\n; > cocos2d::CCDictionary::removeObjectForKey @ 0x18000b286\n; > cocos2d::CCDictionary::removeObjectForKey @ 0x18000b299\n; > cocos2d::CCSpriteFrameCache::removeUnusedSpriteFrames @ 0x18009274b\n; > cocos2d::CCTextureCache::removeUnusedTextures @ 0x1800a9a18\n; > <???> @ 0x1801438a8\n; > <???> @ 0x1801add50\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\ntest    rdx, rdx                                                       ; +0x0, 0x18000abd0\njz      locret_18000AD40                                               ; +0x3, 0x18000abd3\nmov     [rsp+arg_0], rbx                                               ; +0x9, 0x18000abd9\npush    rdi                                                            ; +0xe, 0x18000abde\nsub     rsp, 20h                                                       ; +0xf, 0x18000abdf\nmov     rdi, rdx                                                       ; +0x13, 0x18000abe3\nmov     rbx, rcx                                                       ; +0x16, 0x18000abe6\nmov     rdx, [rdx+118h]                                                ; +0x19, 0x18000abe9\ntest    rdx, rdx                                                       ; +0x20, 0x18000abf0\njnz     short loc_18000AC30                                            ; +0x23, 0x18000abf3\ncmp     [rdi+120h], rdx                                                ; +0x25, 0x18000abf5\njnz     short loc_18000AC30                                            ; +0x2c, 0x18000abfc\nmov     rax, [rcx+38h]                                                 ; +0x2e, 0x18000abfe\nmov     rcx, [rax+110h]                                                ; +0x32, 0x18000ac02\nmov     rcx, [rcx]; Block                                              ; +0x39, 0x18000ac09\ncall    cs:__imp_free                                                  ; +0x3c, 0x18000ac0c\nmov     rcx, [rbx+38h]                                                 ; +0x42, 0x18000ac12\nmov     rcx, [rcx+110h]; Block                                         ; +0x46, 0x18000ac16\ncall    cs:__imp_free                                                  ; +0x4d, 0x18000ac1d\nmov     qword ptr [rbx+38h], 0                                         ; +0x53, 0x18000ac23\njmp     loc_18000AD1D                                                  ; +0x5b, 0x18000ac2b\nmov     rax, [rcx+38h]                                                 ; +0x60, 0x18000ac30\nlea     r8, [rdi+110h]                                                 ; +0x64, 0x18000ac34\nmov     r9, [rax+110h]                                                 ; +0x6b, 0x18000ac3b\nmov     r10, [r9+20h]                                                  ; +0x72, 0x18000ac42\nmov     rax, [r9+18h]                                                  ; +0x76, 0x18000ac46\nsub     rax, r10                                                       ; +0x7a, 0x18000ac4a\ncmp     rdi, rax                                                       ; +0x7d, 0x18000ac4d\njnz     short loc_18000AC5A                                            ; +0x80, 0x18000ac50\nlea     rax, [r10+rdx]                                                 ; +0x82, 0x18000ac52\nmov     [r9+18h], rax                                                  ; +0x86, 0x18000ac56\nmov     r9, [rdi+118h]                                                 ; +0x8a, 0x18000ac5a\nmov     rdx, [rdi+120h]                                                ; +0x91, 0x18000ac61\ntest    r9, r9                                                         ; +0x98, 0x18000ac68\njz      short loc_18000AC83                                            ; +0x9b, 0x18000ac6b\nmov     rax, [rcx+38h]                                                 ; +0x9d, 0x18000ac6d\nmov     rcx, [rax+110h]                                                ; +0xa1, 0x18000ac71\nmov     rax, [rcx+20h]                                                 ; +0xa8, 0x18000ac78\nmov     [rax+r9+10h], rdx                                              ; +0xac, 0x18000ac7c\njmp     short loc_18000AC87                                            ; +0xb1, 0x18000ac81\nmov     [rcx+38h], rdx                                                 ; +0xb3, 0x18000ac83\nmov     r9, [r8+10h]                                                   ; +0xb7, 0x18000ac87\ntest    r9, r9                                                         ; +0xbb, 0x18000ac8b\njz      short loc_18000ACA8                                            ; +0xbe, 0x18000ac8e\nmov     rax, [rbx+38h]                                                 ; +0xc0, 0x18000ac90\nmov     rcx, [rax+110h]                                                ; +0xc4, 0x18000ac94\nmov     rax, [r8+8]                                                    ; +0xcb, 0x18000ac9b\nmov     rdx, [rcx+20h]                                                 ; +0xcf, 0x18000ac9f\nmov     [rdx+r9+8], rax                                                ; +0xd3, 0x18000aca3\nmov     rax, [rbx+38h]                                                 ; +0xd8, 0x18000aca8\nmov     rcx, [rax+110h]                                                ; +0xdc, 0x18000acac\nmov     eax, [r8+34h]                                                  ; +0xe3, 0x18000acb3\nmov     r9d, [rcx+8]                                                   ; +0xe7, 0x18000acb7\ndec     r9d                                                            ; +0xeb, 0x18000acbb\nand     r9, rax                                                        ; +0xee, 0x18000acbe\nmov     rax, [rcx]                                                     ; +0xf1, 0x18000acc1\nmov     rdx, r9                                                        ; +0xf4, 0x18000acc4\nadd     rdx, rdx                                                       ; +0xf7, 0x18000acc7\ndec     dword ptr [rax+rdx*8+8]                                        ; +0xfa, 0x18000acca\nmov     rax, [rbx+38h]                                                 ; +0xfe, 0x18000acce\nmov     rcx, [rax+110h]                                                ; +0x102, 0x18000acd2\nmov     r10, [rcx]                                                     ; +0x109, 0x18000acd9\ncmp     [r10+rdx*8], r8                                                ; +0x10c, 0x18000acdc\njnz     short loc_18000ACED                                            ; +0x110, 0x18000ace0\nmov     rax, [r8+20h]                                                  ; +0x112, 0x18000ace2\nadd     r9, r9                                                         ; +0x116, 0x18000ace6\nmov     [r10+r9*8], rax                                                ; +0x119, 0x18000ace9\nmov     rcx, [r8+18h]                                                  ; +0x11d, 0x18000aced\ntest    rcx, rcx                                                       ; +0x121, 0x18000acf1\njz      short loc_18000ACFE                                            ; +0x124, 0x18000acf4\nmov     rax, [r8+20h]                                                  ; +0x126, 0x18000acf6\nmov     [rcx+20h], rax                                                 ; +0x12a, 0x18000acfa\nmov     rcx, [r8+20h]                                                  ; +0x12e, 0x18000acfe\ntest    rcx, rcx                                                       ; +0x132, 0x18000ad02\njz      short loc_18000AD0F                                            ; +0x135, 0x18000ad05\nmov     rax, [r8+18h]                                                  ; +0x137, 0x18000ad07\nmov     [rcx+18h], rax                                                 ; +0x13b, 0x18000ad0b\nmov     rax, [rbx+38h]                                                 ; +0x13f, 0x18000ad0f\nmov     rcx, [rax+110h]                                                ; +0x143, 0x18000ad13\ndec     dword ptr [rcx+10h]                                            ; +0x14a, 0x18000ad1a\nmov     rcx, [rdi+108h]; this                                          ; +0x14d, 0x18000ad1d\ncall    ?release@CCObject@cocos2d@@QEAAXXZ; cocos2d::CCObject::release(void) ; +0x154, 0x18000ad24\nmov     edx, 148h                                                      ; +0x159, 0x18000ad29\nmov     rcx, rdi; Block                                                ; +0x15e, 0x18000ad2e\ncall    j_j_free_0                                                     ; +0x161, 0x18000ad31\nmov     rbx, [rsp+28h+arg_0]                                           ; +0x166, 0x18000ad36\nadd     rsp, 20h                                                       ; +0x16b, 0x18000ad3b\npop     rdi                                                            ; +0x16f, 0x18000ad3f\nretn                                                                   ; +0x170, 0x18000ad40", "xrefs": ["cocos2d::CCDictionary::removeObjectForKey @ 0x18000b0d1", "cocos2d::CCDictionary::removeObjectForKey @ 0x18000b286", "cocos2d::CCDictionary::removeObjectForKey @ 0x18000b299", "cocos2d::CCSpriteFrameCache::removeUnusedSpriteFrames @ 0x18009274b", "cocos2d::CCTextureCache::removeUnusedTextures @ 0x1800a9a18", "<???> @ 0x1801438a8", "<???> @ 0x1801add50"], "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"}