{"type": "func", "start": 6442762512, "end": 6442762872, "name": "cocos2d::CCBMFontConfiguration::purgeFontDefDictionary", "pseudocode": "// \n// cocos2d::CCBMFontConfiguration::purgeFontDefDictionary from 0x18004c110 to 0x18004c278 (360 bytes)\n// \n// 5 xrefs:\n// > cocos2d::CCBMFontConfiguration::~CCBMFontConfiguration @ 0x1800472cd\n// > <???> @ 0x18013771c\n// > <???> @ 0x18013772c\n// > <???> @ 0x1801438a8\n// > <???> @ 0x1801b19c8\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::CCBMFontConfiguration::purgeFontDefDictionary(cocos2d::CCBMFontConfiguration *this)\n{\n  cocos2d::tCCFontDefHashElement *m_pFontDefDictionary; // rdi\n  cocos2d::tCCFontDefHashElement *i; // rsi\n  char *prev; // r8\n  cocos2d::tCCFontDefHashElement *v5; // r10\n  UT_hash_table *tbl; // r9\n  std::ptrdiff_t hho; // r11\n  char *v8; // r9\n  cocos2d::tCCFontDefHashElement *next; // r8\n  char *v10; // r9\n  UT_hash_table *v11; // rdx\n  __int64 v12; // r9\n  UT_hash_table *v13; // rdx\n  UT_hash_handle *hh_prev; // rdx\n  UT_hash_handle *hh_next; // rcx\n\n  m_pFontDefDictionary = this->m_pFontDefDictionary;\n  if ( m_pFontDefDictionary )\n  {\n    for ( i = (cocos2d::tCCFontDefHashElement *)m_pFontDefDictionary->hh.next;\n          ;\n          i = (cocos2d::tCCFontDefHashElement *)i->hh.next )\n    {\n      prev = (char *)m_pFontDefDictionary->hh.prev;\n      if ( prev || m_pFontDefDictionary->hh.next )\n      {\n        v5 = this->m_pFontDefDictionary;\n        tbl = v5->hh.tbl;\n        hho = tbl->hho;\n        if ( m_pFontDefDictionary == (cocos2d::tCCFontDefHashElement *)((char *)tbl->tail - hho) )\n        {\n          tbl->tail = (UT_hash_handle *)&prev[hho];\n          v5 = this->m_pFontDefDictionary;\n        }\n        v8 = (char *)m_pFontDefDictionary->hh.prev;\n        next = (cocos2d::tCCFontDefHashElement *)m_pFontDefDictionary->hh.next;\n        if ( v8 )\n        {\n          *(_QWORD *)&v8[v5->hh.tbl->hho + 16] = next;\n          next = this->m_pFontDefDictionary;\n        }\n        else\n        {\n          this->m_pFontDefDictionary = next;\n        }\n        v10 = (char *)m_pFontDefDictionary->hh.next;\n        if ( v10 )\n          *(_QWORD *)&v10[next->hh.tbl->hho + 8] = m_pFontDefDictionary->hh.prev;\n        v11 = this->m_pFontDefDictionary->hh.tbl;\n        v12 = m_pFontDefDictionary->hh.hashv & (v11->num_buckets - 1);\n        --v11->buckets[v12].count;\n        v13 = this->m_pFontDefDictionary->hh.tbl;\n        if ( v13->buckets[v12].hh_head == &m_pFontDefDictionary->hh )\n          v13->buckets[v12].hh_head = m_pFontDefDictionary->hh.hh_next;\n        hh_prev = m_pFontDefDictionary->hh.hh_prev;\n        if ( hh_prev )\n          hh_prev->hh_next = m_pFontDefDictionary->hh.hh_next;\n        hh_next = m_pFontDefDictionary->hh.hh_next;\n        if ( hh_next )\n          hh_next->hh_prev = m_pFontDefDictionary->hh.hh_prev;\n        --this->m_pFontDefDictionary->hh.tbl->num_items;\n      }\n      else\n      {\n        free(this->m_pFontDefDictionary->hh.tbl->buckets);\n        free(this->m_pFontDefDictionary->hh.tbl);\n        this->m_pFontDefDictionary = nullptr;\n      }\n      free(m_pFontDefDictionary);\n      m_pFontDefDictionary = i;\n      if ( !i )\n        break;\n    }\n  }\n}", "assembly": "; \n; cocos2d::CCBMFontConfiguration::purgeFontDefDictionary from 0x18004c110 to 0x18004c278 (360 bytes)\n; \n; 5 xrefs:\n; > cocos2d::CCBMFontConfiguration::~CCBMFontConfiguration @ 0x1800472cd\n; > <???> @ 0x18013771c\n; > <???> @ 0x18013772c\n; > <???> @ 0x1801438a8\n; > <???> @ 0x1801b19c8\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_10], rbx                                              ; +0x0, 0x18004c110\npush    rdi                                                            ; +0x5, 0x18004c115\nsub     rsp, 20h                                                       ; +0x6, 0x18004c116\nmov     rdi, [rcx+38h]                                                 ; +0xa, 0x18004c11a\nmov     rbx, rcx                                                       ; +0xe, 0x18004c11e\ntest    rdi, rdi                                                       ; +0x11, 0x18004c121\njz      loc_18004C26D                                                  ; +0x14, 0x18004c124\nmov     [rsp+28h+arg_0], rbp                                           ; +0x1a, 0x18004c12a\nxor     ebp, ebp                                                       ; +0x1f, 0x18004c12f\nmov     [rsp+28h+arg_8], rsi                                           ; +0x21, 0x18004c131\nmov     rsi, [rdi+30h]                                                 ; +0x26, 0x18004c136\nnop     word ptr [rax+rax+00h]                                         ; +0x2a, 0x18004c13a\nmov     r8, [rdi+28h]                                                  ; +0x30, 0x18004c140\ntest    r8, r8                                                         ; +0x34, 0x18004c144\njnz     short loc_18004C177                                            ; +0x37, 0x18004c147\ncmp     [rdi+30h], rbp                                                 ; +0x39, 0x18004c149\njnz     short loc_18004C177                                            ; +0x3d, 0x18004c14d\nmov     rax, [rbx+38h]                                                 ; +0x3f, 0x18004c14f\nmov     rcx, [rax+20h]                                                 ; +0x43, 0x18004c153\nmov     rcx, [rcx]; Block                                              ; +0x47, 0x18004c157\ncall    cs:__imp_free                                                  ; +0x4a, 0x18004c15a\nmov     rcx, [rbx+38h]                                                 ; +0x50, 0x18004c160\nmov     rcx, [rcx+20h]; Block                                          ; +0x54, 0x18004c164\ncall    cs:__imp_free                                                  ; +0x58, 0x18004c168\nmov     [rbx+38h], rbp                                                 ; +0x5e, 0x18004c16e\njmp     loc_18004C249                                                  ; +0x62, 0x18004c172\nmov     r10, [rbx+38h]                                                 ; +0x67, 0x18004c177\nlea     rax, [rdi+20h]                                                 ; +0x6b, 0x18004c17b\nmov     r9, [r10+20h]                                                  ; +0x6f, 0x18004c17f\nmov     r11, [r9+20h]                                                  ; +0x73, 0x18004c183\nmov     rcx, [r9+18h]                                                  ; +0x77, 0x18004c187\nsub     rcx, r11                                                       ; +0x7b, 0x18004c18b\ncmp     rdi, rcx                                                       ; +0x7e, 0x18004c18e\njnz     short loc_18004C19F                                            ; +0x81, 0x18004c191\nlea     rcx, [r11+r8]                                                  ; +0x83, 0x18004c193\nmov     [r9+18h], rcx                                                  ; +0x87, 0x18004c197\nmov     r10, [rbx+38h]                                                 ; +0x8b, 0x18004c19b\nmov     r9, [rdi+28h]                                                  ; +0x8f, 0x18004c19f\nmov     r8, [rdi+30h]                                                  ; +0x93, 0x18004c1a3\ntest    r9, r9                                                         ; +0x97, 0x18004c1a7\njz      short loc_18004C1BF                                            ; +0x9a, 0x18004c1aa\nmov     rcx, [r10+20h]                                                 ; +0x9c, 0x18004c1ac\nmov     rdx, [rcx+20h]                                                 ; +0xa0, 0x18004c1b0\nmov     [rdx+r9+10h], r8                                               ; +0xa4, 0x18004c1b4\nmov     r8, [rbx+38h]                                                  ; +0xa9, 0x18004c1b9\njmp     short loc_18004C1C3                                            ; +0xad, 0x18004c1bd\nmov     [rbx+38h], r8                                                  ; +0xaf, 0x18004c1bf\nmov     r9, [rax+10h]                                                  ; +0xb3, 0x18004c1c3\ntest    r9, r9                                                         ; +0xb7, 0x18004c1c7\njz      short loc_18004C1DD                                            ; +0xba, 0x18004c1ca\nmov     rcx, [r8+20h]                                                  ; +0xbc, 0x18004c1cc\nmov     rdx, [rcx+20h]                                                 ; +0xc0, 0x18004c1d0\nmov     rcx, [rax+8]                                                   ; +0xc4, 0x18004c1d4\nmov     [rdx+r9+8], rcx                                                ; +0xc8, 0x18004c1d8\nmov     rcx, [rbx+38h]                                                 ; +0xcd, 0x18004c1dd\nmov     rdx, [rcx+20h]                                                 ; +0xd1, 0x18004c1e1\nmov     ecx, [rax+34h]                                                 ; +0xd5, 0x18004c1e5\nmov     r9d, [rdx+8]                                                   ; +0xd8, 0x18004c1e8\ndec     r9d                                                            ; +0xdc, 0x18004c1ec\nand     r9, rcx                                                        ; +0xdf, 0x18004c1ef\nmov     rcx, [rdx]                                                     ; +0xe2, 0x18004c1f2\nmov     r8, r9                                                         ; +0xe5, 0x18004c1f5\nadd     r8, r8                                                         ; +0xe8, 0x18004c1f8\ndec     dword ptr [rcx+r8*8+8]                                         ; +0xeb, 0x18004c1fb\nmov     rcx, [rbx+38h]                                                 ; +0xf0, 0x18004c200\nmov     rdx, [rcx+20h]                                                 ; +0xf4, 0x18004c204\nmov     r10, [rdx]                                                     ; +0xf8, 0x18004c208\ncmp     [r10+r8*8], rax                                                ; +0xfb, 0x18004c20b\njnz     short loc_18004C21C                                            ; +0xff, 0x18004c20f\nmov     rcx, [rax+20h]                                                 ; +0x101, 0x18004c211\nadd     r9, r9                                                         ; +0x105, 0x18004c215\nmov     [r10+r9*8], rcx                                                ; +0x108, 0x18004c218\nmov     rdx, [rax+18h]                                                 ; +0x10c, 0x18004c21c\ntest    rdx, rdx                                                       ; +0x110, 0x18004c220\njz      short loc_18004C22D                                            ; +0x113, 0x18004c223\nmov     rcx, [rax+20h]                                                 ; +0x115, 0x18004c225\nmov     [rdx+20h], rcx                                                 ; +0x119, 0x18004c229\nmov     rcx, [rax+20h]                                                 ; +0x11d, 0x18004c22d\ntest    rcx, rcx                                                       ; +0x121, 0x18004c231\njz      short loc_18004C23E                                            ; +0x124, 0x18004c234\nmov     rdx, [rax+18h]                                                 ; +0x126, 0x18004c236\nmov     [rcx+18h], rdx                                                 ; +0x12a, 0x18004c23a\nmov     rax, [rbx+38h]                                                 ; +0x12e, 0x18004c23e\nmov     rdx, [rax+20h]                                                 ; +0x132, 0x18004c242\ndec     dword ptr [rdx+10h]                                            ; +0x136, 0x18004c246\nmov     rcx, rdi; Block                                                ; +0x139, 0x18004c249\ncall    cs:__imp_free                                                  ; +0x13c, 0x18004c24c\nmov     rdi, rsi                                                       ; +0x142, 0x18004c252\ntest    rsi, rsi                                                       ; +0x145, 0x18004c255\njz      short loc_18004C263                                            ; +0x148, 0x18004c258\nmov     rsi, [rsi+30h]                                                 ; +0x14a, 0x18004c25a\njmp     loc_18004C140                                                  ; +0x14e, 0x18004c25e\nmov     rbp, [rsp+28h+arg_0]                                           ; +0x153, 0x18004c263\nmov     rsi, [rsp+28h+arg_8]                                           ; +0x158, 0x18004c268\nmov     rbx, [rsp+28h+arg_10]                                          ; +0x15d, 0x18004c26d\nadd     rsp, 20h                                                       ; +0x162, 0x18004c272\npop     rdi                                                            ; +0x166, 0x18004c276\nretn                                                                   ; +0x167, 0x18004c277", "xrefs": ["cocos2d::CCBMFontConfiguration::~CCBMFontConfiguration @ 0x1800472cd", "<???> @ 0x18013771c", "<???> @ 0x18013772c", "<???> @ 0x1801438a8", "<???> @ 0x1801b19c8"], "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"}